old-cross-binutils/gdb/nat
Markus Metzger d68e53f479 btrace: support 32-bit inferior on 64-bit host
The heuristic for filtering out kernel addressess in BTS trace checks the
most significant bit in each address.  This works fine for 32-bit and 64-bit
mode.

For 32-bit compatibility mode, i.e. a 32-bit inferior running on 64-bit
host, we need to check bit 63 (or any bit bigger than 31), not bit 31.

Use the machine field in struct utsname provided by a uname call to
determine whether we are running on a 64-bit host.

Thanks to Jan Kratochvil for reporting the issue.

gdb/
	* nat/linux-btrace.c: Include sys/utsname.h.
	(linux_determine_kernel_ptr_bits): New.
	(linux_enable_bts): Call linux_determine_kernel_ptr_bits.
	* x86-linux-nat.c (x86_linux_enable_btrace): Do not overwrite non-zero
	ptr_bits.

gdbserver/
	* linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
	ptr_bits.
2015-03-03 12:47:41 +01:00
..
gdb_thread_db.h Move shared native target specific code to gdb/nat 2014-06-20 14:06:48 +01:00
glibc_thread_db.h Move shared native target specific code to gdb/nat 2014-06-20 14:06:48 +01:00
linux-btrace.c btrace: support 32-bit inferior on 64-bit host 2015-03-03 12:47:41 +01:00
linux-btrace.h record btrace: add configuration struct 2015-02-09 09:38:55 +01:00
linux-nat.h Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
linux-osdata.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
linux-osdata.h Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
linux-personality.c Fix nat/linux-personality.c regression on RHEL-5 2015-01-16 11:42:28 -05:00
linux-personality.h Move code to disable ASR to nat/ 2015-01-15 15:10:49 -05:00
linux-procfs.c GNU/Linux: Stop using libthread_db/td_ta_thr_iter 2015-02-20 21:40:31 +00:00
linux-procfs.h GNU/Linux: Stop using libthread_db/td_ta_thr_iter 2015-02-20 21:40:31 +00:00
linux-ptrace.c Add extern "C" to declarations of C symbols 2015-02-27 17:26:16 +00:00
linux-ptrace.h Fix non executable stack handling when calling functions in the inferior. 2015-02-19 11:04:21 -05:00
linux-waitpid.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
linux-waitpid.h Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
mips-linux-watch.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
mips-linux-watch.h Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
ppc-linux.c Detect 64-bit-ness in PowerPC Book III-E 2015-01-14 22:28:27 +08:00
ppc-linux.h Detect 64-bit-ness in PowerPC Book III-E 2015-01-14 22:28:27 +08:00
x86-cpuid.h Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
x86-dregs.c C++ keyword cleanliness, mostly auto-generated 2015-02-27 16:33:07 +00:00
x86-dregs.h Don't forward declare enum target_hw_bp_type 2015-02-27 17:29:42 +00:00
x86-gcc-cpuid.h Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00