This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [RFC]: patch #2 for Sun C compiled target programs
Date: Mon, 21 Jun 2004 17:04:33 +0200
From: Michael Mueller <m.mueller99@kay-mueller.de>
>
> The real problem is that dbxread.c was initially written as 32-bit
> only code. The sign-extension problem you're seeing here can also be
> interpreted as a 64-bit-dirty issue.
So how can it be fixed?
Not sure. As I said, it's not easy. As far as I understand things,
INTERNALIZE_SYMBOL() should look at n_type to decide whether n_value
should be treated as a signed or an unsigned value. The problem seems
to be that n_value can either be interpreted as an address or as an
offset. Addresses should be sign-extended based on what
bfd_get_sign_extend_vma() tells us. Offsets should probably always be
sign-extended.
Mark