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]

Re: [PATCH] remote: Fix a crash on longjmp breakpoint removal


On 03/09/2012 08:48 PM, Keith Seitz wrote:
On 03/09/2012 06:55 PM, Maciej W. Rozycki wrote:
Keith, would you care updating your test case then? I'm going to be away
for two weeks and won't be able to look into it any sooner.

Sure thing.

I've changed the test a little bit to safeguard against looping forever. Pedro, does this look acceptable?


Keith

testsuite/ChangeLog
2012-03-09  Keith Seitz  <keiths@redhat.com>

	PR gdb/13333
	* gdb.server/server-run.exp: Check if gdb crashes when
	the inferior and gdbserver exit while stepping.


Index: testsuite/gdb.server/server-run.exp =================================================================== RCS file: /cvs/src/src/gdb/testsuite/gdb.server/server-run.exp,v retrieving revision 1.12 diff -u -p -r1.12 server-run.exp --- testsuite/gdb.server/server-run.exp 15 Feb 2012 12:51:17 -0000 1.12 +++ testsuite/gdb.server/server-run.exp 10 Mar 2012 05:08:49 -0000 @@ -51,3 +51,24 @@ if { [istarget *-*-linux*] } {

gdb_breakpoint main
gdb_test "continue" "Breakpoint.* main .*" "continue to main"
+
+# gdb/13333 - Check if gdb crashes while stepping over an
+# inferior exit.
+set max 10
+gdb_test_multiple "next" "step until inferior exits" {
+ -re ".*Inferior 1 \\\(process \[0-9\]+\\\) exited normally.*$gdb_prompt $" {
+ # The inferior exited, and gdb did not crash.
+ pass "step until inferior exits"
+ }
+
+ -re "$gdb_prompt $" {
+ # We got a prompt -- keep stepping
+ incr max -1
+ if {$max == 0} {
+ unresolved "step until inferior exits"
+ } else {
+ send_gdb "next\n"
+ exp_continue
+ }
+ }
+}



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