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

Help request on making a gdb testsuite case


Hi GDB devs,

I have found that the case of restarting the debuggee in extended-remote
session has been broken in GDB for undetermined, but quite long time
(predating gdb 7.10.1).

It got fixed in git master just recently, on February 15 by Yao Qi in
commit 85046ae23f85 (thanks a lot!). Anyway, now I have an automated way
to detect the bug which got fixed, and would like to turn it into a case
in GDB test suite.

# "./simple" is built from "int main(){return 0;}", must be unstripped
timeout 4 "$GDB" \
	-ex "target extended-remote | $GDBSERVER --once - ./simple" \
	-ex 'break main' \
	-ex 'set confirm off' \
	-ex 'run' \
	-ex 'quit' \
	;
# buggy gdb would hang

It is not obvious to me how to write such a testcase. There are three
elements: the debuggee, the server process and the frontend process. I
have very rough idea that some goodness to use is in
lib/gdbserver-support.exp, and almost certainly i'll use gdb_target_cmd
procedure, but beyond that, I'm pretty much lost. How would I specify a
debuggee program, or where do I find one to reuse after other tests?

Any help would be highly appreciated!


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