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 2/3] Add ILP32 support to gdb.


On Tue, Aug 30, 2016 at 12:44 AM, Andreas Schwab <schwab@suse.de> wrote:
> On Aug 30 2016, Andrew Pinski <apinski@cavium.com> wrote:
>
>> @@ -2695,6 +2696,11 @@ aarch64_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
>>        return NULL;
>>      }
>>
>> +  if (info.abfd
>> +      && bfd_get_flavour (info.abfd) == bfd_target_elf_flavour
>> +      && elf_elfheader (info.abfd)->e_ident[EI_CLASS] == ELFCLASS32)
>> +    ilp32 = TRUE;
>> +
>
> Shouldn't this use bfd_arch_bits_per_address?

That does not work as bfd_arch_bits_per_address is set to 64 still.
The same is true even on x86 and powerpc.  We actually need to check
the elf header here still.

Thanks,
Andrew


>
> Andreas.
>
> --
> Andreas Schwab, SUSE Labs, schwab@suse.de
> GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
> "And now for something completely different."


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