This is the mail archive of the gdb-patches@sourceware.org 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]

[PATCH] fix gdbserver test with non-stop


Hi,

When I run some test with non-stop, I will got random timeout fail
with [runto main].
The OK log is:
kill
The program is not being run.
(gdb) spawn ../gdbserver/gdbserver --once :2346
/home/teawater/gdb/bgdbno/gdb/testsuite/gdb.base/dprintf-non-stop
Process /home/teawater/gdb/bgdbno/gdb/testsuite/gdb.base/dprintf-non-stop
created; pid = 2679
Listening on port 2346
target remote localhost:2346
Remote debugging using localhost:2346
Remote debugging from host 127.0.0.1
[New Thread 2679]
(gdb)
[Thread 2679] #1 stopped.
0x00002aaaaaaac6b0 in ?? ()
continue
Continuing.

The timeout log is:
kill
The program is not being run.
(gdb) FAIL: gdb.base/dprintf-non-stop.exp: 8
spawn ../gdbserver/gdbserver --once :2346
/home/teawater/gdb/bgdbno/gdb/testsuite/gdb.base/dprintf-non-stop
Process /home/teawater/gdb/bgdbno/gdb/testsuite/gdb.base/dprintf-non-stop
created; pid = 4878
Listening on port 2346
FAIL: gdb.base/dprintf-non-stop.exp: 9
target remote localhost:2346
Remote debugging using localhost:2346
Remote debugging from host 127.0.0.1
[New Thread 4878]
(gdb)
[Thread 4878] #1 stopped.
0x00002aaaaaaac6b0 in ?? ()

This bug is because handler inside gdb_target_cmd handle the non-stop
output not very well.
Post a patch for it.

Thanks,
Hui

2013-05-28  Hui Zhu  <hui@codesourcery.com>

	* lib/gdbserver-support.exp (gdb_target_cmd): Add handler for
	non-stop output.

Attachment: test-fix-remote-non-stop.txt
Description: Text document


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