[Bug remote/18772] New: gdb does not respond to CTRL-C

moorel at ntlworld dot com sourceware-bugzilla@sourceware.org
Wed Aug 5 11:32:00 GMT 2015


https://sourceware.org/bugzilla/show_bug.cgi?id=18772

            Bug ID: 18772
           Summary: gdb does not respond to CTRL-C
           Product: gdb
           Version: 7.9
            Status: NEW
          Severity: critical
          Priority: P2
         Component: remote
          Assignee: unassigned at sourceware dot org
          Reporter: moorel at ntlworld dot com
  Target Milestone: ---

Hi Support,

it looks like a bug has been introduced, somewhere between 7.5 & 7.9.
I do not have all the intermediate builds available to narrow this down.

I have a very simple testcase, running on Fedora Linux, but appears to be a
general issue I even reproduced on an ARM target.

1: #include <stdio.h>
2: int main() {
3:     int cond = 0;
4:     while(cond == 0) { /* do nothing  */ } // BREAK at this line
5:     return 0;
6: }

compile for debug
$ gcc -g -o app.exe app.c

run the application in gdbserver
$ gdbserver localhost:9999 app.exe

in gdb do the following
$ gdb app.exe
(gdb) target remote localhost:9999
(gdb) b app.c:4
(gdb) continue
(gdb) next

so now gdb is trying to run to the 'next' line, which it cannot reach because
the condition in the while loop is always true, so interrupt by sending CTRL-C
(gdb) ^C

nothing happens

The session is now locked up, if you issue another CTRL-C, the gdb client will
Quit
(gdb)^CQuit

The gdbserver is still running, but I have failed to interrupt

Try the same with gdb version 7.5 and it works

Thx
Lee

-- 
You are receiving this mail because:
You are on the CC list for the bug.



More information about the Gdb-prs mailing list