This is the mail archive of the gdb-patches@sources.redhat.com 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]

Re: [PATCH] ia64-linux-nat.c: Make HW watchpoint support work again



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.


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