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 Thu, Mar 6, 2008 at 12:05 PM, Andreas Schwab <schwab@suse.de> wrote:
> "Yakov Lerner" <iler.ml@gmail.com> writes:
>
>  > Gdb has no integration with malloc, correct ?
>  > Gdb has no  way of enumerating all malloced
>  >  pieces ("heap objects"), correct ?
>  >
>  > Or gdb does have a way of guessing which "heap
>  > object" some address X (that points inside the heap) belongs to ?
>
>  The details are highly dependent on the malloc implementation.  There is
>  no way to find that out without intimate knowledge of the
>  implementation.

You don't need details of malloc guts for that.

It's enough to hook to the entry and return  from malloc,free,realloc.

Yakov


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