Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Keith Seitz <keiths@redhat.com>
To: "Maciej W. Rozycki" <macro@codesourcery.com>
Cc: Pedro Alves <palves@redhat.com>, gdb-patches@sourceware.org
Subject: Re: [PATCH] remote: Fix a crash on longjmp breakpoint removal
Date: Sat, 10 Mar 2012 05:11:00 -0000	[thread overview]
Message-ID: <4F5AE26F.8050800@redhat.com> (raw)
In-Reply-To: <4F5ADD06.5070905@redhat.com>

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
+    }
+  }
+}


  reply	other threads:[~2012-03-10  5:11 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-13 21:13 Maciej W. Rozycki
2011-12-20 16:00 ` Tom Tromey
2012-03-07 20:08   ` Maciej W. Rozycki
2012-03-07 20:47     ` Pedro Alves
2012-03-07 20:48       ` Keith Seitz
2012-03-10  2:55         ` Maciej W. Rozycki
2012-03-10  4:48           ` Keith Seitz
2012-03-10  5:11             ` Keith Seitz [this message]
2012-03-12 18:13               ` Pedro Alves

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4F5AE26F.8050800@redhat.com \
    --to=keiths@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=macro@codesourcery.com \
    --cc=palves@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox