From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22060 invoked by alias); 10 Mar 2012 05:11:35 -0000 Received: (qmail 22050 invoked by uid 22791); 10 Mar 2012 05:11:34 -0000 X-SWARE-Spam-Status: No, hits=-6.3 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,TW_GJ,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 10 Mar 2012 05:11:18 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q2A5BExk000334 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sat, 10 Mar 2012 00:11:14 -0500 Received: from valrhona.uglyboxes.com (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id q2A5BBAw032670 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 10 Mar 2012 00:11:13 -0500 Message-ID: <4F5AE26F.8050800@redhat.com> Date: Sat, 10 Mar 2012 05:11:00 -0000 From: Keith Seitz User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:9.0) Gecko/20111222 Thunderbird/9.0 MIME-Version: 1.0 To: "Maciej W. Rozycki" CC: Pedro Alves , gdb-patches@sourceware.org Subject: Re: [PATCH] remote: Fix a crash on longjmp breakpoint removal References: <4F57C92F.7010501@redhat.com> <4F57C9A2.7050809@redhat.com> <4F5ADD06.5070905@redhat.com> In-Reply-To: <4F5ADD06.5070905@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2012-03/txt/msg00367.txt.bz2 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 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 + } + } +}