This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug gdb/22979] gdb configured with target=x86_64-elf ends up with i386 machine description
- From: "simon.marchi at ericsson dot com" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: Mon, 19 Mar 2018 03:59:57 +0000
- Subject: [Bug gdb/22979] gdb configured with target=x86_64-elf ends up with i386 machine description
- Auto-submitted: auto-generated
- References: <bug-22979-4717@http.sourceware.org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=22979
--- Comment #3 from Simon Marchi <simon.marchi at ericsson dot com> ---
x86-64 gdbarches are first created as 32-bit gdbarches by i386_gdbarch_init.
Then, the call to gdbarch_init_osabi (info, gdbarch) is expected to call the
right osabi init function, which will convert it to a 64-bits gdbarch (e.g.
amd64_linux_init_abi).
When using no osabi (a bare-metal x86-64 arch), no osabi init function is ever
called, so the gdbarch (wrongfully) stays 32 bits.
The attached patch is a little hack that calls amd64_init_abi if the osabi is
none the arch is x86-64.
--
You are receiving this mail because:
You are on the CC list for the bug.