breakpoints/1965: single step after hw watchpoint doesn't honor SOFTWARE_SINGLE_STEP_P

pkoning@equallogic.com pkoning@equallogic.com
Tue Jul 5 20:58:00 GMT 2005


>Number:         1965
>Category:       breakpoints
>Synopsis:       single step after hw watchpoint doesn't honor SOFTWARE_SINGLE_STEP_P
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Jul 05 20:58:00 UTC 2005
>Closed-Date:
>Last-Modified:
>Originator:     pkoning@equallogic.com
>Release:        gdb 6.3
>Organization:
>Environment:
host: i386-netbsd 
target: mipsel-netbsdelf
>Description:
The code in infrun.c that single steps the target after it is stopped due to a hardware watchpoint does this by calling target_resume.  The result is that the target is sent an "s" packet -- even if SOFTWARE_SINGLE_STEP_P is defined to indicate that the target doesn't want that.

It appears that the following one line patch cures this (Patch relative to today's CVS):

Index: gdb/infrun.c
===================================================================
RCS file: /cvs/src/src/gdb/infrun.c,v
retrieving revision 1.202
diff -u -r1.202 infrun.c
--- gdb/infrun.c        29 May 2005 03:13:17 -0000      1.202
+++ gdb/infrun.c        5 Jul 2005 20:45:03 -0000
@@ -1724,7 +1724,7 @@
        fprintf_unfiltered (gdb_stdlog, "infrun: STOPPED_BY_WATCHPOINT\n");
       remove_breakpoints ();
       registers_changed ();
-      target_resume (ecs->ptid, 1, TARGET_SIGNAL_0);   /* Single step */
+      resume (1, 0);                                   /* Single step */

       ecs->waiton_ptid = ecs->ptid;
       ecs->wp = &(ecs->ws);
>How-To-Repeat:

>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the Gdb-prs mailing list