This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [PATCH] ia64-linux-nat.c: Make HW watchpoint support work again
- To: Kevin Buettner <kevinb at cygnus dot com>
- Subject: Re: [PATCH] ia64-linux-nat.c: Make HW watchpoint support work again
- From: Eli Zaretskii <eliz at is dot elta dot co dot il>
- Date: Sun, 1 Apr 2001 10:44:09 +0200 (IST)
- cc: gdb-patches at sources dot redhat dot com
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.