From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27317 invoked by alias); 7 Aug 2014 18:31:26 -0000 Mailing-List: contact gdb-prs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-prs-owner@sourceware.org Received: (qmail 27290 invoked by uid 48); 7 Aug 2014 18:31:25 -0000 From: "dje at google dot com" To: gdb-prs@sourceware.org Subject: [Bug remote/17241] New: reconnecting after crashed gdbserver: breakpoints don't work, inferior segvs Date: Thu, 07 Aug 2014 18:31:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: remote X-Bugzilla-Version: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: dje at google dot com X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-q3/txt/msg00230.txt.bz2 https://sourceware.org/bugzilla/show_bug.cgi?id=17241 Bug ID: 17241 Summary: reconnecting after crashed gdbserver: breakpoints don't work, inferior segvs Product: gdb Version: HEAD Status: NEW Severity: normal Priority: P2 Component: remote Assignee: unassigned at sourceware dot org Reporter: dje at google dot com Playing with PR 17239 some more, I found "start" would run past "main" after I restart gdbserver and reconnect, and the inferior gets a SEGV. bash1$ ./gdbserver --multi :1234 Listening on port 1234 Remote debugging from host 127.0.0.1 Process /home/dje/hello.x64 created; pid = 17378 Cannot exec /home/dje/hello.x64 : No such file or directory. Child exited with status 127 Process /home/dje/hello.x64 created; pid = 17426 gdbserver: no target description [start gdbserver again after it errantly exits] bash1$ ./gdbserver --multi :1234 Listening on port 1234 Remote debugging from host 127.0.0.1 Process /home/dje/hello.x64 created; pid = 17450 Hello. <<<< bkpt at main not hit or gdbserver loses control? And in a second shell, bash2$ make run (gdb) tar ext :1234 Remote debugging using :1234 (gdb) file ~/hello.x64 Reading symbols from ~/hello.x64...done. (gdb) set remote exec-file /home/dje/hello.x64 (gdb) start Temporary breakpoint 1 at 0x4006d8: file hello.cc, line 6. Starting program: /usr/local/google/home/dje/hello.x64 Running "/home/dje/hello.x64 " on the remote target failed (gdb) set remote exec-file /home/dje/hello.x64 (gdb) start Temporary breakpoint 2 at 0x4006d8: file hello.cc, line 6. Starting program: /usr/local/google/home/dje/hello.x64 Remote connection closed [go back to bash1 at this point and restart gdbserver, see above] (gdb) pwd Working directory /foo/build/obj64/gdb. (gdb) show remote exec-file The remote pathname for "run" is "/home/dje/hello.x64". (gdb) tar ext :1234 Remote debugging using :1234 (gdb) start Temporary breakpoint 3 at 0x4006d8: file hello.cc, line 6. Starting program: /usr/local/google/home/dje/hello.x64 Program received signal SIGSEGV, Segmentation fault. 0x000000000000000b in ?? () (gdb) i b Num Type Disp Enb Address What 1 breakpoint del y 0x00000000004006d4 in main() at hello.cc:5 2 breakpoint del y 0x00000000004006d4 in main() at hello.cc:5 3 breakpoint del y 0x00000000004006d4 in main() at hello.cc:5 -- You are receiving this mail because: You are on the CC list for the bug.