This is the mail archive of the gdb-prs@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]
Other format: [Raw text]

breakpoints/1708: xfailed signals.exp test


>Number:         1708
>Category:       breakpoints
>Synopsis:       xfailed signals.exp test
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          test-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Jul 12 20:18:01 UTC 2004
>Closed-Date:
>Last-Modified:
>Originator:     ac131313@redhat.com
>Release:        2004-07-12
>Organization:
>Environment:
All
>Description:
>From signals.exp:

(gdb) PASS: gdb.base/signals.exp: break func2
continue
Continuing.
...
Breakpoint 3, func1 () at /home/scratch/PENDING/2004-07-08-test-attach/src/gdb/testsuite/gdb.base/signals.c:29
29        ++count;
(gdb) PASS: gdb.base/signals.exp: continue to func1
signal SIGUSR1
Continuing with signal SIGUSR1.
...
Breakpoint 2, handler (sig=30) at /home/scratch/PENDING/2004-07-08-test-attach/src/gdb/testsuite/gdb.base/signals.c:22
22        signal (sig, handler);
(gdb) PASS: gdb.base/signals.exp: signal SIGUSR1
bt
#0  handler (sig=30) at /home/scratch/PENDING/2004-07-08-test-attach/src/gdb/testsuite/gdb.base/signals.c:22
#1  <signal handler called>
#2  func1 () at /home/scratch/PENDING/2004-07-08-test-attach/src/gdb/testsuite/gdb.base/signals.c:29
#3  0x01800c78 in main () at /home/scratch/PENDING/2004-07-08-test-attach/src/gdb/testsuite/gdb.base/signals.c:55
(gdb) PASS: gdb.base/signals.exp: backtrace for SIGUSR1
continue
Continuing.
...
Breakpoint 3, func1 () at /home/scratch/PENDING/2004-07-08-test-attach/src/gdb/testsuite/gdb.base/signals.c:29
29        ++count;
(gdb) XFAIL: gdb.base/signals.exp: continue to func2
continue

What happens is:

- program hits breakpoint at func1
- forces a continue with SIGUSR1
- program hits signal "handler"
- continues back to ...

The comments in signals.exp suggest that GDB should realise that it has already hit func1's breakpoint and should instead continue past that breakpoint.  The current behavior being an XFAIL.

I think the comment and XFAIL are wrong.

When GDB stops the program at handler, and returns to the command prompt, all nested context (such as it was originally stepping over func1's breakpoint) are lost.  Hence, that second hitting of func1's breakpoint is valid.
>How-To-Repeat:

>Fix:

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


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