From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18031 invoked by alias); 13 Jun 2016 15:02:31 -0000 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 Received: (qmail 18012 invoked by uid 89); 13 Jun 2016 15:02:29 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.3 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=forked, Continuing X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Mon, 13 Jun 2016 15:02:27 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A26BBC05B1F1; Mon, 13 Jun 2016 15:02:26 +0000 (UTC) Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u5DF2PIP029754; Mon, 13 Jun 2016 11:02:26 -0400 Subject: Re: [PATCH 04/12] Delete reinsert breakpoints from forked child To: Yao Qi , gdb-patches@sourceware.org References: <1464859846-15619-1-git-send-email-yao.qi@linaro.org> <1464859846-15619-5-git-send-email-yao.qi@linaro.org> From: Pedro Alves Message-ID: Date: Mon, 13 Jun 2016 15:02:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.1.0 MIME-Version: 1.0 In-Reply-To: <1464859846-15619-5-git-send-email-yao.qi@linaro.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-SW-Source: 2016-06/txt/msg00234.txt.bz2 The gdbserver hunk looks fine to me. Comments on the test below. On 06/02/2016 10:30 AM, Yao Qi wrote: > + set syscall_insn_addr "" > + set test "get syscall_insn_addr" > + gdb_test_multiple "disassemble \$pc - 20,+30" $test { Hmm, "\$pc - 20" doesn't look right for e.g., x86 with variable length instructions. I think that can well start disassembling in the middle of an instruction, and produce garbage. > + -re " ($hex)\[^\r\n\]+\r\n=> .*$gdb_prompt $" { > + set syscall_insn_addr $expect_out(1,string) > + pass $test > + } > + } > + > + if { $syscall_insn_addr == "" } { > + fail $test > + return > + } > + > + delete_breakpoints > + > + gdb_test "break marker" > + > + gdb_test "continue" "Continuing\\..*Breakpoint $decimal, .*" \ > + "continue to marker (1)" No " ($foo)". > + set test "set breakpoint condition-evaluation target" > + gdb_test_multiple $test $test { > + -re "warning: Target does not support breakpoint condition evaluation.\r\nUsing host evaluation mode instead.\r\n$gdb_prompt $" { > + # Target doesn't support breakpoint condition > + # evaluation on its side. > + } > + -re "^$test\r\n$gdb_prompt $" { > + } > + } No pass call? > + # Create a breakpoint which evaluates false. > + gdb_test "break \*$syscall_insn_addr if main == 0" \ > + "Breakpoint \[0-9\]* at .*" This ends up with "$syscall_insn_addr" in the test message. I'm thinking that it might be good for these tests to also have a displaced-stepping on/off test axis. Or better still: out-of-line-step-over-bp / in-line-step-over-bp / plain-single-step with the single-step variant doing a single-step over the syscall instruction, with no breakpoint at PC at all. Thanks, Pedro Alves