This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[patch] reverse: Fix syscall on AMD CPUs in 32-bit mode
- From: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- To: gdb-patches at sourceware dot org
- Date: Fri, 24 Feb 2012 00:56:39 +0100
- Subject: [patch] reverse: Fix syscall on AMD CPUs in 32-bit mode
Hi,
on CPU
cpu family : 15
model : 65
model name : Dual-Core AMD Opteron(tm) Processor 8218
with x86_64 kernel and -m32 testsuite run getting for gdb.reverse/*.exp many
advance marker2
Process record does not support instruction syscall.
Process record does not support instruction 0xf05 at address 0x110423.
Process record: failed to record execution log.
[process 9462] #1 stopped.
0x00110423 in __kernel_vsyscall ()
(gdb) FAIL: gdb.reverse/until-reverse.exp: advance to marker2
According to linux-2.6/arch/x86/vdso/vdso32/{syscall,sysenter}.S I do not see
any need for different recording rules.
linux-2.6/Documentation/x86/entry_64.txt documents:
- system_call: syscall instruction from 64-bit code.
[...]
- ia32_syscall, ia32_sysenter: syscall and sysenter from 32-bit
code
No regressions on x86_64-m32-rhel62-linux-gnu for gdb.reverse/*.
Thanks,
Jan
gdb/
2012-02-23 Jan Kratochvil <jan.kratochvil@redhat.com>
Fix reverse mode for syscall on AMD CPUs in 32-bit mode.
* i386-linux-tdep.c (i386_linux_intx80_sysenter_record): Rename to ...
(i386_linux_intx80_sysenter_syscall_record): ... here.
(i386_linux_init_abi): Initialize also I386_SYSCALL_RECORD.
Use the renamed function name.
--- a/gdb/i386-linux-tdep.c
+++ b/gdb/i386-linux-tdep.c
@@ -418,7 +418,7 @@ i386_canonicalize_syscall (int syscall)
static struct linux_record_tdep i386_linux_record_tdep;
static int
-i386_linux_intx80_sysenter_record (struct regcache *regcache)
+i386_linux_intx80_sysenter_syscall_record (struct regcache *regcache)
{
int ret;
LONGEST syscall_native;
@@ -856,8 +856,9 @@ i386_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
i386_linux_record_tdep.arg5 = I386_EDI_REGNUM;
i386_linux_record_tdep.arg6 = I386_EBP_REGNUM;
- tdep->i386_intx80_record = i386_linux_intx80_sysenter_record;
- tdep->i386_sysenter_record = i386_linux_intx80_sysenter_record;
+ tdep->i386_intx80_record = i386_linux_intx80_sysenter_syscall_record;
+ tdep->i386_sysenter_record = i386_linux_intx80_sysenter_syscall_record;
+ tdep->i386_syscall_record = i386_linux_intx80_sysenter_syscall_record;
/* N_FUN symbols in shared libaries have 0 for their values and need
to be relocated. */