This is the mail archive of the gdb-prs@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]

[Bug gdb/22979] gdb configured with target=x86_64-elf ends up with i386 machine description


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.

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