From: Andreas Schwab <schwab@suse.de>
To: Andrew Pinski <pinskia@gmail.com>
Cc: Andrew Pinski <apinski@cavium.com>,
"gdb-patches\@sourceware.org" <gdb-patches@sourceware.org>,
binutils <binutils@sourceware.org>
Subject: Re: [PATCH 2/3] Add ILP32 support to gdb.
Date: Thu, 01 Sep 2016 07:41:00 -0000 [thread overview]
Message-ID: <mvmshtkgj93.fsf@hawking.suse.de> (raw)
In-Reply-To: <CA+=Sn1nVghgmfwfkxhMpkwUSNac9TCFxkEPCwB=OPv4Jztisww@mail.gmail.com> (Andrew Pinski's message of "Wed, 31 Aug 2016 21:20:55 -0700")
On Sep 01 2016, Andrew Pinski <pinskia@gmail.com> wrote:
> 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.
Actually I meant bfd_get_arch_size.
Does this fix the bits_per_address issue?
* cpu-aarch64.c (N): Add argument ADDRSIZE.
(bfd_aarch64_arch_ilp32): Pass 32 here.
(bfd_aarch64_arch): Pass 64 here.
---
bfd/cpu-aarch64.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/bfd/cpu-aarch64.c b/bfd/cpu-aarch64.c
index 6fb9133..ae0c8a9 100644
--- a/bfd/cpu-aarch64.c
+++ b/bfd/cpu-aarch64.c
@@ -78,16 +78,16 @@ scan (const struct bfd_arch_info *info, const char *string)
return FALSE;
}
-#define N(NUMBER, PRINT, DEFAULT, NEXT) \
- { 64, 64, 8, bfd_arch_aarch64, NUMBER, \
+#define N(NUMBER, PRINT, ADDRSIZE, DEFAULT, NEXT) \
+ { 64, ADDRSIZE, 8, bfd_arch_aarch64, NUMBER, \
"aarch64", PRINT, 4, DEFAULT, compatible, scan, \
bfd_arch_default_fill, NEXT }
static const bfd_arch_info_type bfd_aarch64_arch_ilp32 =
- N (bfd_mach_aarch64_ilp32, "aarch64:ilp32", FALSE, NULL);
+ N (bfd_mach_aarch64_ilp32, "aarch64:ilp32", 32, FALSE, NULL);
const bfd_arch_info_type bfd_aarch64_arch =
- N (0, "aarch64", TRUE, &bfd_aarch64_arch_ilp32);
+ N (0, "aarch64", 64, TRUE, &bfd_aarch64_arch_ilp32);
bfd_boolean
bfd_is_aarch64_special_symbol_name (const char *name, int type)
--
2.9.3
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."
next prev parent reply other threads:[~2016-09-01 7:41 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-30 0:26 [PATCH 0/3] Support AARCH64 ILP32 for gdb Andrew Pinski
2016-08-30 0:26 ` [PATCH 1/3] Move AARCH64 ILP32 rejection handling Andrew Pinski
2016-08-30 0:26 ` [PATCH 2/3] Add ILP32 support to gdb Andrew Pinski
2016-08-30 7:44 ` Andreas Schwab
2016-09-01 4:21 ` Andrew Pinski
2016-09-01 7:41 ` Andreas Schwab [this message]
2016-08-30 0:26 ` [PATCH 3/3] Handle ILP32 AARCH64 correctly for gdbserver Andrew Pinski
2016-08-30 8:01 ` Andreas Schwab
2016-08-31 10:42 ` Pedro Alves
2016-08-31 12:58 ` Yao Qi
2016-08-31 20:02 ` Andrew Pinski
2016-09-01 7:37 ` [PATCH v2 0/3] Support AARCH64 ILP32 for gdb Andrew Pinski
2016-09-01 7:36 ` [PATCH 2/3] Add ILP32 support to gdb Andrew Pinski
2016-09-01 9:50 ` Andreas Schwab
2016-09-01 13:13 ` Yao Qi
2016-09-01 7:37 ` [PATCH 3/3] Handle ILP32 AARCH64 correctly for gdbserver Andrew Pinski
2016-09-01 8:32 ` Andreas Schwab
2016-09-01 7:37 ` [PATCH 1/3] Move AARCH64 ILP32 rejection handling Andrew Pinski
2016-09-01 9:43 ` Richard Earnshaw (lists)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=mvmshtkgj93.fsf@hawking.suse.de \
--to=schwab@suse.de \
--cc=apinski@cavium.com \
--cc=binutils@sourceware.org \
--cc=gdb-patches@sourceware.org \
--cc=pinskia@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox