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] bfd/: bfd_elf_bfd_from_remote_memory 32bit &= 0xffffffff


On Wed, 17 Feb 2010 19:50:42 +0100, Tom Tromey wrote:
> >>>>> "Jan" == Jan Kratochvil <jan.kratochvil@redhat.com> writes:
> 
> Tom> It seems like you could just call the struct CORE_ADDR.
> 
> Jan> I thought it would be good to have different type for _address_ vs. for
> Jan> _displacement_.  With this difference some math operations are no longer
> Jan> valid and I have discovered for example:
> 
> Ok, I see.  But in that case wouldn't you still need (or want) to make
> CORE_ADDR non-scalar, to avoid hidden errors?

Yes but that would be even much larger patch than just converting CORE_ADDRs
in use as a displacement into the non-scalar.

It is true this "displacement-only-CORE_ADDRs" has missed some usages of
CORE_ADDR as a displacement.  But it is enough to catch the variable/field
declaration over all the use points of it if it would be left as a scalar.


Thanks,
Jan


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