This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH 2/3] Add ILP32 support to gdb.
- From: Andrew Pinski <pinskia at gmail dot com>
- To: Andreas Schwab <schwab at suse dot de>
- Cc: Andrew Pinski <apinski at cavium dot com>, "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>, binutils <binutils at sourceware dot org>
- Date: Wed, 31 Aug 2016 21:20:55 -0700
- Subject: Re: [PATCH 2/3] Add ILP32 support to gdb.
- Authentication-results: sourceware.org; auth=none
- References: <1472516750-30743-1-git-send-email-apinski@cavium.com> <1472516750-30743-3-git-send-email-apinski@cavium.com> <mvminuiln0a.fsf@hawking.suse.de>
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."