This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 4/5] Check bits_per_word instead of gdbarch_ptr_bit
- From: Mark Kettenis <mark dot kettenis at xs4all dot nl>
- To: hjl dot tools at gmail dot com
- Cc: gdb-patches at sourceware dot org
- Date: Sat, 16 Jun 2012 13:21:16 +0200 (CEST)
- Subject: Re: [PATCH 4/5] Check bits_per_word instead of gdbarch_ptr_bit
- References: <20120613230704.GD11434@intel.com>
> Date: Wed, 13 Jun 2012 16:07:04 -0700
> From: "H.J. Lu" <hongjiu.lu@intel.com>
>
> This is a repost of
>
> http://sourceware.org/ml/gdb-patches/2012-04/msg00195.html
>
> An x32 process is an x86-64 process with 32bit pointer. Checking
> gdbarch_ptr_bit is not sufficient to identify ia32 process. However,
> bits_per_word in bfd_arch_info is 32bits for ia32. This patch checks
> bits_per_word instead of gdbarch_ptr_bit for identifying ia32 process.
> Tested on Linux/x86-64. OK to install?
For now this is ok. I might be revisiting the i386 vs. amd64
vs. amd64_x32 checks at some point in the future when things have
settled a bit.
> H.J.
> ----
> * amd64-linux-nat.c (ps_get_thread_area): Check bits_per_word
> instead of gdbarch_ptr_bit.
> * amd64-nat.c (amd64_native_gregset_reg_offset): Likewise.
> (amd64_supply_native_gregset): Likewise.
> (amd64_collect_native_gregset): Likewise.
> * amd64-tdep.c (amd64_supply_fxsave): Likewise.
> (amd64_supply_xsave): Likewise.
> (amd64_collect_fxsave): Likewise.
> (amd64_collect_xsave): Likewise.