From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12293 invoked by alias); 13 Jun 2016 16:53:44 -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 12278 invoked by uid 89); 13 Jun 2016 16:53:43 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mail-pa0-f42.google.com Received: from mail-pa0-f42.google.com (HELO mail-pa0-f42.google.com) (209.85.220.42) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Mon, 13 Jun 2016 16:53:42 +0000 Received: by mail-pa0-f42.google.com with SMTP id hl6so47416786pac.2 for ; Mon, 13 Jun 2016 09:53:41 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=hbRE7hfdDWcMExBNisqiCt/gMyDdk1qketrgJ220fgg=; b=KpIAAuS2+yBx4mg/+rzWngQrcPdT53wNjZCdbsro8jNEHJOjWE0BqWRtN7rYyho2/v tWWafvNlk+TpuD+S62RuF0f81E24hM4JF5qjxEBqWbB/eT5NbIPCPAEVKh6Ph5IDzEq9 5SOgiTRBcpTuT1XlLsu/MwRZZmo7oMsmDEvlcRLrgQvQyNVIcbJtg2Ywh7QBfg8A4Cow uF45CKkPHaRAFWhPrIRpEXMRe/My3SVg/7NdV6ub9NIXv0AvWGm++PGH5HkH6kLgVnnE sAXxIsgCMJGpqDYBXgGjlMavm+jR0sMb9NavLXq+BbfQDzPV9ZHZBFJeftodjWbD/r2a gC7A== X-Gm-Message-State: ALyK8tKfZcHHVTXihg7N8C9Z5NSfvEDYsDfwtnMyGpCqDz4Of+FARY2ZbJ2QUoG0SR0w9Q== X-Received: by 10.66.142.199 with SMTP id ry7mr22911966pab.14.1465836820154; Mon, 13 Jun 2016 09:53:40 -0700 (PDT) Received: from E107787-LIN (gcc113.osuosl.org. [140.211.9.71]) by smtp.gmail.com with ESMTPSA id 129sm39028045pfe.3.2016.06.13.09.53.37 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Mon, 13 Jun 2016 09:53:39 -0700 (PDT) From: Yao Qi To: Pedro Alves Cc: Yao Qi , gdb-patches@sourceware.org Subject: Re: [PATCH 04/12] Delete reinsert breakpoints from forked child References: <1464859846-15619-1-git-send-email-yao.qi@linaro.org> <1464859846-15619-5-git-send-email-yao.qi@linaro.org> Date: Mon, 13 Jun 2016 16:53:00 -0000 In-Reply-To: (Pedro Alves's message of "Mon, 13 Jun 2016 16:02:25 +0100") Message-ID: <86twgxt4hg.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2016-06/txt/msg00244.txt.bz2 Pedro Alves writes: > 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. > I thought 20 is big enough to include the previous instruction in. The max instruction length of x86 is 16. If we disassemble in the middle of an instruction, and garbage is printed, it is a bug, and we should fix in disassembler. I can't find another way to show the previous instruction. >> + -re " ($hex)\[^\r\n\]+\r\n=3D> .*$gdb_prompt $" { >> + set syscall_insn_addr $expect_out(1,string) >> + pass $test >> + } >> + } >> + >> + if { $syscall_insn_addr =3D=3D "" } { >> + fail $test >> + return >> + } >> + >> + delete_breakpoints >> + >> + gdb_test "break marker" >> + >> + gdb_test "continue" "Continuing\\..*Breakpoint $decimal, .*" \ >> + "continue to marker (1)" > > No " ($foo)". > I'll fix it. >> + 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? > I'll fix it. >> + # Create a breakpoint which evaluates false. >> + gdb_test "break \*$syscall_insn_addr if main =3D=3D 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 > What is difference between the second one and third one? I think they've already covered by gdb.base/step-over-syscall.exp. > with the single-step variant doing a single-step over the > syscall instruction, with no breakpoint at PC at all. --=20 Yao (=E9=BD=90=E5=B0=A7)