This is the mail archive of the
gdb@sourceware.cygnus.com
mailing list for the GDB project.
scripting with section addresses
- To: gdb at sourceware dot cygnus dot com
- Subject: scripting with section addresses
- From: jtc at redback dot com (J.T. Conklin)
- Date: 11 Feb 2000 12:59:22 -0800
- Reply-To: jtc at redback dot com
While prototyping the memory region attribute UI (I'll be sending my
proposed UI shortly), I found that in many cases attributes might be
most naturally applied to the regions defined by program sections.
For example, declaring the .text section to be host-side cachable.
I skimmed the GDB docs, and couldn't find any commands that use
program sections or any way to obtain the addresses that define
program sections and store them in convience variables. Is
there anything I missed?
One way this could be addressed by accepting a 'section' keyword in
the mem command instead of an address range:
mem section .text ro,cache,hwbreak
But part of me thinks this is a cop-out. Other commands that take
address ranges (disassemble is one, can't think of any others at the
moment) should probably support sections as well.
On the other hand, if there were command(s) that returned the address
ranges of sections, users could extract them and use them in whatever
manner they could imagine. I haven't thought this through yet.
This isn't interfering with my work, but I thought I'd throw it open
for discussion.
--jtc
--
J.T. Conklin
RedBack Networks