This is the mail archive of the
mailing list for the GDB project.
src/gdb/gdbserver ChangeLog server.c target.c
- From: palves at sourceware dot org
- To: gdb-cvs at sourceware dot org
- Date: Wed, 02 Oct 2013 11:42:35 +0000
- Subject: src/gdb/gdbserver ChangeLog server.c target.c
Module name: src
Changes by: email@example.com 2013-10-02 11:42:35
gdb/gdbserver : ChangeLog server.c target.c
[GDBserver]: Silence exits if GDB is connected through stdio.
If we make gdbserver gdb_continue_to_end actually expect a process
exit with GDBserver, we get many testsuite failures with the remote
-PASS: gdb.arch/amd64-disp-step.exp: continue until exit at amd64-disp-step
+FAIL: gdb.arch/amd64-disp-step.exp: continue until exit at amd64-disp-step (the program exited)
-PASS: gdb.base/break.exp: continue until exit at recursive next test
+FAIL: gdb.base/break.exp: continue until exit at recursive next test (the program exited)
-PASS: gdb.base/chng-syms.exp: continue until exit at breakpoint first time through
+FAIL: gdb.base/chng-syms.exp: continue until exit at breakpoint first time through (the program exited)
... etc. ...
This is what the log shows for all of them:
Child exited with status 0
[Inferior 1 (process 22721) exited normally]
(gdb) FAIL: gdb.arch/amd64-disp-step.exp: continue until exit (the program exited)
The problem is the whole "Child exited ... GDBserver exiting" output,
that comes out of GDBserver, and that the testsuite is not expecting.
I pondered somehow making the testsuite adjust to this. But,
testsuite aside, I think GDBserver should not be outputting this at
all when GDB is connected through stdio. GDBserver will be printing
this in GDB's console, but the user can already tell from the regular
output that the inferior is gone.
(gdb) tar remote | ./gdbserver/gdbserver - program
Remote debugging using | ./gdbserver/gdbserver - program
Process program created; pid = 22486
Remote debugging using stdio
Loaded symbols for /lib64/ld-linux-x86-64.so.2
0x000000323d001530 in _start () from /lib64/ld-linux-x86-64.so.2
Child exited with status 1
[Inferior 1 (process 22486) exited with code 01]
Suppressing those two lines makes the output be exactly like when
debugging against a remote tcp gdbserver:
[Inferior 1 (process 22914) exited with code 01]
2013-10-02 Pedro Alves <firstname.lastname@example.org>
* server.c (process_serial_event): Don't output "GDBserver
exiting" if GDB is connected through stdio.
* target.c (mywait): Likewise, be silent if GDB is connected