This is the mail archive of the gdb@sourceware.org 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]
Other format: [Raw text]

Re: guessing where address belongs to


On Tue, 2008-03-04 at 21:42 +0200, Eli Zaretskii wrote:
> > Date: Tue, 4 Mar 2008 10:15:42 +0200
> > From: "Yakov Lerner" <iler.ml@gmail.com>
> > 
> > Is there command to have gdb guess which memory object this
> > address belongs to (which function ... which stack frame .. which static
> > object .. which head object )?
> 
> I think you want "info symbol".

That will help -- if the address is associated with a symbol.
For stack and heap pointers it's not always helpful.

I don't think there is a single command to do what you want, 
but "info target" will be helpful -- it will show all loaded
sections and their memory ranges.  You can fit the address into
one of them (if it fits).  "info file" is an alias for this
(I think).

This shows the sections for shared libraries too, which is a plus.


Maybe if you can mock up a spec for what it is you want, 
it wouldn't be that difficult to implement a new command
for it...




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