Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* RFA: patch to ia64-linux-nat.c
@ 2003-07-03 20:37 J. Johnston
  2003-07-10 19:46 ` J. Johnston
  2003-07-10 20:19 ` Kevin Buettner
  0 siblings, 2 replies; 7+ messages in thread
From: J. Johnston @ 2003-07-03 20:37 UTC (permalink / raw)
  To: gdb-patches

[-- Attachment #1: Type: text/plain, Size: 542 bytes --]

The attached patch fixes a problem with potential extraneous breakpoints being found
by gdb on ia64.

The ia64_linux_stopped_by_watchpoint() routine is not verifying that it has
a SIGTRAP signal vs other signals and is only checking the si_code being
4.

The fix merely adds a check that if the signal is not a SIGTRAP, then we
are not at a hardware watchpoint.

Ok to commit?

2003-07-03  Jeff Johnston  <jjohnstn@redhat.com>

	* ia64-linux-nat.c (ia64_linux_stopped_by_watchpoint): Verify
	that we have a SIGTRAP before returning non-zero.

[-- Attachment #2: ia64-linux-nat.patch --]
[-- Type: text/plain, Size: 704 bytes --]

Index: ia64-linux-nat.c
===================================================================
RCS file: /cvs/src/src/gdb/ia64-linux-nat.c,v
retrieving revision 1.16
diff -u -p -r1.16 ia64-linux-nat.c
--- ia64-linux-nat.c	7 Feb 2003 04:49:34 -0000	1.16
+++ ia64-linux-nat.c	3 Jul 2003 20:31:26 -0000
@@ -634,7 +634,8 @@ ia64_linux_stopped_by_watchpoint (ptid_t
   errno = 0;
   ptrace (PTRACE_GETSIGINFO, tid, (PTRACE_ARG3_TYPE) 0, &siginfo);
 
-  if (errno != 0 || (siginfo.si_code & 0xffff) != 0x0004 /* TRAP_HWBKPT */)
+  if (errno != 0 || siginfo.si_signo != SIGTRAP || 
+      (siginfo.si_code & 0xffff) != 0x0004 /* TRAP_HWBKPT */)
     return 0;
 
   psr = read_register_pid (IA64_PSR_REGNUM, ptid);

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: RFA: patch to ia64-linux-nat.c
  2003-07-03 20:37 RFA: patch to ia64-linux-nat.c J. Johnston
@ 2003-07-10 19:46 ` J. Johnston
  2003-07-10 20:19 ` Kevin Buettner
  1 sibling, 0 replies; 7+ messages in thread
From: J. Johnston @ 2003-07-10 19:46 UTC (permalink / raw)
  To: J. Johnston; +Cc: gdb-patches

Has anybody had a chance to take a look at this?

-- Jeff J.

J. Johnston wrote:
> The attached patch fixes a problem with potential extraneous breakpoints 
> being found
> by gdb on ia64.
> 
> The ia64_linux_stopped_by_watchpoint() routine is not verifying that it has
> a SIGTRAP signal vs other signals and is only checking the si_code being
> 4.
> 
> The fix merely adds a check that if the signal is not a SIGTRAP, then we
> are not at a hardware watchpoint.
> 
> Ok to commit?
> 
> 2003-07-03  Jeff Johnston  <jjohnstn@redhat.com>
> 
>     * ia64-linux-nat.c (ia64_linux_stopped_by_watchpoint): Verify
>     that we have a SIGTRAP before returning non-zero.
> 
> 
> ------------------------------------------------------------------------
> 
> Index: ia64-linux-nat.c
> ===================================================================
> RCS file: /cvs/src/src/gdb/ia64-linux-nat.c,v
> retrieving revision 1.16
> diff -u -p -r1.16 ia64-linux-nat.c
> --- ia64-linux-nat.c	7 Feb 2003 04:49:34 -0000	1.16
> +++ ia64-linux-nat.c	3 Jul 2003 20:31:26 -0000
> @@ -634,7 +634,8 @@ ia64_linux_stopped_by_watchpoint (ptid_t
>    errno = 0;
>    ptrace (PTRACE_GETSIGINFO, tid, (PTRACE_ARG3_TYPE) 0, &siginfo);
>  
> -  if (errno != 0 || (siginfo.si_code & 0xffff) != 0x0004 /* TRAP_HWBKPT */)
> +  if (errno != 0 || siginfo.si_signo != SIGTRAP || 
> +      (siginfo.si_code & 0xffff) != 0x0004 /* TRAP_HWBKPT */)
>      return 0;
>  
>    psr = read_register_pid (IA64_PSR_REGNUM, ptid);



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: RFA: patch to ia64-linux-nat.c
  2003-07-03 20:37 RFA: patch to ia64-linux-nat.c J. Johnston
  2003-07-10 19:46 ` J. Johnston
@ 2003-07-10 20:19 ` Kevin Buettner
  2003-07-24 16:43   ` J. Johnston
  1 sibling, 1 reply; 7+ messages in thread
From: Kevin Buettner @ 2003-07-10 20:19 UTC (permalink / raw)
  To: J. Johnston, gdb-patches

On Jul 3,  4:37pm, J. Johnston wrote:

> Ok to commit?
> 
> 2003-07-03  Jeff Johnston  <jjohnstn@redhat.com>
> 
> 	* ia64-linux-nat.c (ia64_linux_stopped_by_watchpoint): Verify
> 	that we have a SIGTRAP before returning non-zero.

Okay.

Kevin


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: RFA: patch to ia64-linux-nat.c
  2003-07-10 20:19 ` Kevin Buettner
@ 2003-07-24 16:43   ` J. Johnston
  2003-08-12 19:56     ` J. Johnston
  0 siblings, 1 reply; 7+ messages in thread
From: J. Johnston @ 2003-07-24 16:43 UTC (permalink / raw)
  To: Kevin Buettner; +Cc: gdb-patches

Sorry for the delay.  Patch finally checked in.

Kevin Buettner wrote:
> On Jul 3,  4:37pm, J. Johnston wrote:
> 
> 
>>Ok to commit?
>>
>>2003-07-03  Jeff Johnston  <jjohnstn@redhat.com>
>>
>>	* ia64-linux-nat.c (ia64_linux_stopped_by_watchpoint): Verify
>>	that we have a SIGTRAP before returning non-zero.
> 
> 
> Okay.
> 
> Kevin
> 



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: RFA: patch to ia64-linux-nat.c
  2003-07-24 16:43   ` J. Johnston
@ 2003-08-12 19:56     ` J. Johnston
  2003-08-12 20:43       ` Kevin Buettner
  0 siblings, 1 reply; 7+ messages in thread
From: J. Johnston @ 2003-08-12 19:56 UTC (permalink / raw)
  To: Kevin Buettner; +Cc: gdb-patches

Can this go into gdb 6.0?  Without it, gdb debugging gdb gets spurious
breakpoints in glibc.

-- Jeff J.

J. Johnston wrote:
> Sorry for the delay.  Patch finally checked in.
> 
> Kevin Buettner wrote:
> 
>> On Jul 3,  4:37pm, J. Johnston wrote:
>>
>>
>>> Ok to commit?
>>>
>>> 2003-07-03  Jeff Johnston  <jjohnstn@redhat.com>
>>>
>>>     * ia64-linux-nat.c (ia64_linux_stopped_by_watchpoint): Verify
>>>     that we have a SIGTRAP before returning non-zero.
>>
>>
>>
>> Okay.
>>
>> Kevin
>>
> 
> 
> 



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: RFA: patch to ia64-linux-nat.c
  2003-08-12 19:56     ` J. Johnston
@ 2003-08-12 20:43       ` Kevin Buettner
  2003-08-13 19:15         ` J. Johnston
  0 siblings, 1 reply; 7+ messages in thread
From: Kevin Buettner @ 2003-08-12 20:43 UTC (permalink / raw)
  To: J. Johnston, Kevin Buettner; +Cc: gdb-patches

On Aug 12,  3:56pm, J. Johnston wrote:

> Can this go into gdb 6.0?  Without it, gdb debugging gdb gets spurious
> breakpoints in glibc.

Okay.

Kevin


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: RFA: patch to ia64-linux-nat.c
  2003-08-12 20:43       ` Kevin Buettner
@ 2003-08-13 19:15         ` J. Johnston
  0 siblings, 0 replies; 7+ messages in thread
From: J. Johnston @ 2003-08-13 19:15 UTC (permalink / raw)
  To: Kevin Buettner; +Cc: gdb-patches

Thanks.  Identical patch checked into gdb 6.0.

2003-08-13  Jeff Johnston  <jjohnstn@redhat.com>

         From 2003-07-24  Jeff Johnston  <jjohnstn@redhat.com>
         * ia64-linux-nat.c (ia64_linux_stopped_by_watchpoint): Verify
         that we have a SIGTRAP before returning non-zero.



Kevin Buettner wrote:
> On Aug 12,  3:56pm, J. Johnston wrote:
> 
> 
>>Can this go into gdb 6.0?  Without it, gdb debugging gdb gets spurious
>>breakpoints in glibc.
> 
> 
> Okay.
> 
> Kevin
> 



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2003-08-13 19:15 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-07-03 20:37 RFA: patch to ia64-linux-nat.c J. Johnston
2003-07-10 19:46 ` J. Johnston
2003-07-10 20:19 ` Kevin Buettner
2003-07-24 16:43   ` J. Johnston
2003-08-12 19:56     ` J. Johnston
2003-08-12 20:43       ` Kevin Buettner
2003-08-13 19:15         ` J. Johnston

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox