This is the mail archive of the gdb-patches@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: [patch] Fix a glitch in debugging 32-bit process with 64-bit GDB.


On Thu, Dec 11, 2008 at 12:57 AM, Andreas Schwab <schwab@suse.de> wrote:

> Paul Pluzhnikov <ppluzhnikov@google.com> writes:
...
>> -    if (bfd_get_sign_extend_vma (abfd))                                      \
>> +    if (sizeof (bfd_vma) > 4 || bfd_get_sign_extend_vma (abfd))              \
>
> I don't think this does the right thing for genuine addresses beyond
> 0x80000000.  You can do that only for values that are truely signed,
> which stabs has no way to express.

Hmm, I guess if a STABS executable is linked at above 0x80000000,
this could happen.

So, the choices appear to be:

- leave GDB broken and wait for newer glibc :(
- do sign extension, but only for N_LSYM and N_PSYM symbols as
 a heuristic.
- pre-scan the objfile to determine highest link address, and
 do sign extension if that address is (well) below 0x80000000

Suggestions?

Thanks,
--
Paul Pluzhnikov

[Andreas, sorry for the repeat: clicked reply instead of reply-all]


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