This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: cope with varying prelink base addresses
- From: Eli Zaretskii <eliz at gnu dot org>
- To: Alexandre Oliva <aoliva at redhat dot com>
- Cc: gdb-patches at sources dot redhat dot com, cagney at redhat dot com
- Date: Wed, 08 Feb 2006 08:25:02 +0200
- Subject: Re: cope with varying prelink base addresses
- References: <ormzh2zawm.fsf@livre.oliva.athome.lsd.ic.unicamp.br>
- Reply-to: Eli Zaretskii <eliz at gnu dot org>
> From: Alexandre Oliva <aoliva@redhat.com>
> Date: Wed, 08 Feb 2006 03:18:01 -0200
>
> The only piece of information available for this that I could find was
> the address of the dynamic table in the dynamic loader data
> structures. The heuristics I used was to check whether the dynamic
> table address changed but remained at the same position within a
> page. If so, I assume the difference is caused by prelinking, and
> then I adjust the load_addr that gdb is going to use for that binary.
> Otherwise, it will face the same problems you're expected to face when
> debugging a core file using a different binary.
Would it make sense to add a user command/variable that will tell GDB
the difference between the two base addresses? I guess it would be a
good idea if the user has a way of finding out this number by some
means that are unavailable to GDB (e.g., by gaining access to the
other machine or talking to someone sitting in front of it).
WDYT?