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

Re: [PATCH 4/5] Check bits_per_word instead of gdbarch_ptr_bit


> 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.


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