This is the mail archive of the gdb@sourceware.cygnus.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

scripting with section addresses


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]