public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug remote/17241] New: reconnecting after crashed gdbserver: breakpoints don't work, inferior segvs
@ 2014-08-07 18:31 dje at google dot com
  0 siblings, 0 replies; only message in thread
From: dje at google dot com @ 2014-08-07 18:31 UTC (permalink / raw)
  To: gdb-prs

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<space>
(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.


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2014-08-07 18:31 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-07 18:31 [Bug remote/17241] New: reconnecting after crashed gdbserver: breakpoints don't work, inferior segvs dje at google dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).