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

[PATCH] ia64-linux-nat.c: Change TRAP_HWBKPT yet again

I've just committed the patch below.  This patch is needed to make
IA-64/linux hardware watchpoint support work for (both) linux kernel
versions 2.4.2 and 2.4.3.  These kernels represent TRAP_HWBKPT
differently in the siginfo struct obtained via the ptrace() interface.

Thanks to Eli Zaretskii for suggesting this change.

	* ia64-linux-nat.c (ia64_linux_stopped_by_watchpoint): Adjust
	comparison against TRAP_HWBKPT constant yet again to account
	for the various values used by different kernel versions.

Index: ia64-linux-nat.c
RCS file: /cvs/src/src/gdb/ia64-linux-nat.c,v
retrieving revision 1.9
diff -u -p -r1.9 ia64-linux-nat.c
--- ia64-linux-nat.c	2001/03/31 21:53:39	1.9
+++ ia64-linux-nat.c	2001/04/16 21:14:24
@@ -630,7 +630,7 @@ ia64_linux_stopped_by_watchpoint (int pi
   errno = 0;
   ptrace (PTRACE_GETSIGINFO, tid, (PTRACE_ARG3_TYPE) 0, &siginfo);
-  if (errno != 0 || siginfo.si_code != 0x30004 /* TRAP_HWBKPT */)
+  if (errno != 0 || (siginfo.si_code & 0xffff) != 0x0004 /* TRAP_HWBKPT */)
     return 0;
   psr = read_register_pid (IA64_PSR_REGNUM, pid);

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