From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eli Zaretskii To: Kevin Buettner Cc: gdb-patches@sources.redhat.com Subject: Re: [PATCH] ia64-linux-nat.c: Make HW watchpoint support work again Date: Sun, 01 Apr 2001 00:46:00 -0000 Message-id: References: <1010331222947.ZM13805@ocotillo.lan> X-SW-Source: 2001-04/msg00000.html On Sat, 31 Mar 2001, Kevin Buettner wrote: > So, I conclude that it is easier (and safer) to just hard code this > constant in GDB. If someone has a better suggestion, I'm willing > to listen... > > * ia64-linux-nat.c (ia64_linux_stopped_by_watchpoint): Change > TRAP_HWBKPT constant to match that in the kernel headers for > Linux/IA-64. > > Index: ia64-linux-nat.c > =================================================================== > RCS file: /cvs/src/src/gdb/ia64-linux-nat.c,v > retrieving revision 1.8 > diff -u -p -r1.8 ia64-linux-nat.c > --- ia64-linux-nat.c 2001/03/01 01:39:21 1.8 > +++ ia64-linux-nat.c 2001/03/31 21:48:28 > @@ -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 != 4 /* TRAP_HWBKPT */) > + if (errno != 0 || siginfo.si_code != 0x30004 /* TRAP_HWBKPT */) > return 0; How about masking the high bits of si_code? Then it would work for both cases, and will probably suffer less bitrot in the future.