From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 89265 invoked by alias); 23 Mar 2016 16:10:01 -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 89240 invoked by uid 89); 23 Mar 2016 16:10:00 -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=Step, Force, scenarios, Deliver X-HELO: mail-pf0-f193.google.com Received: from mail-pf0-f193.google.com (HELO mail-pf0-f193.google.com) (209.85.192.193) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Wed, 23 Mar 2016 16:09:50 +0000 Received: by mail-pf0-f193.google.com with SMTP id x3so4557407pfb.0 for ; Wed, 23 Mar 2016 09:09:50 -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:subject:date:message-id; bh=WPLBEQGlrPf/qpiJ2FslfyxVaREbOQ+z49sXVmXj2kQ=; b=MHyIPwprVW9l5leKujKB7MA4yejupgLjZ6ks94waVtTfXU8Ha3Wj1f9MGxC8nLPFD+ VrCGB3gtpGrRJbGE3YX/VMkOrcegkXjApzqHQvx4SMzqtnQ1CuVKcMJY23WuTueGFsd2 K5Me9aqlfNwugfdl2HbID0XnwiT7GEF/qntg/fbEy4hYdl1b6CKHbl+c/9M466IKUxVN kfgmiRkVW5/som5a/R4WkL4+8a/f0ML3LnmxD6ihKuSUiizEq8+oIY5PWhzBGWNgv0rs y5rXUrz20pWMh4fdkpLSrf2ymNrMavugSz5TT0yFsDHAIH4l3rPyfzBz2N7d9OklDNAK NnwQ== X-Gm-Message-State: AD7BkJJ/QYz2Zg1usPRSpozLUC6dtMN5QAnN+4GBBAsnhcS0KEy/SWmqudvzyQwJlnUR6g== X-Received: by 10.66.142.168 with SMTP id rx8mr5514352pab.14.1458749388445; Wed, 23 Mar 2016 09:09:48 -0700 (PDT) Received: from E107787-LIN.cambridge.arm.com (gcc1-power7.osuosl.org. [140.211.15.137]) by smtp.gmail.com with ESMTPSA id 79sm5206701pfq.65.2016.03.23.09.09.47 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 23 Mar 2016 09:09:47 -0700 (PDT) From: Yao Qi X-Google-Original-From: Yao Qi To: gdb-patches@sourceware.org Subject: [PATCH 0/7 V2] Step over instruction branches to itself Date: Wed, 23 Mar 2016 16:10:00 -0000 Message-Id: <1458749384-19793-1-git-send-email-yao.qi@linaro.org> X-IsSubscribed: yes X-SW-Source: 2016-03/txt/msg00472.txt.bz2 Here is the V2 of this series, and V1 can be found in https://sourceware.org/ml/gdb-patches/2016-03/msg00067.html In V2, there are some changes, - Add a new test case in patch 1, - Add more comments in patch 2 and 3, to explain some scenarios may happen, - Decrease refcount rather than free the raw breapoint in patch 4, The original description to this patch series is: When I test arm linux range stepping patches, fails in gdb.base/gdb-sigterm.exp lead me taking a look. I find gcc is quite smart to genreate *single* branch instruction for such endless for loop, for (;;); /* loop-line */ the instruction branches to itself. 0x00008638 <+28>: b 0x8638 However, current GDB and GDBserver doesn't handle this kind of instruction very well when stepping over breakpoint on top of it. This patch series fixes the problems when stepping over "branch to self" instruction, and it paves the way for arm linux range stepping patches and tracepoint patches. Yao Qi (7): New test case gdb.trace/signal.exp Deliver signal in hardware single step Force to insert software single step breakpoint Insert breakpoint even when the raw breakpoint is found [GDBserver] Don't error in reinsert_raw_breakpoint if bp->inserted Resume the inferior with signal rather than stepping over New test case gdb.base/branch-to-self.exp gdb/breakpoint.c | 9 +- gdb/gdbarch.h | 5 +- gdb/gdbarch.sh | 5 +- gdb/gdbserver/linux-low.c | 22 +++- gdb/gdbserver/mem-break.c | 19 +++- gdb/testsuite/gdb.base/branch-to-self.c | 44 ++++++++ gdb/testsuite/gdb.base/branch-to-self.exp | 67 +++++++++++ gdb/testsuite/gdb.trace/signal.c | 68 +++++++++++ gdb/testsuite/gdb.trace/signal.exp | 180 ++++++++++++++++++++++++++++++ 9 files changed, 411 insertions(+), 8 deletions(-) create mode 100644 gdb/testsuite/gdb.base/branch-to-self.c create mode 100644 gdb/testsuite/gdb.base/branch-to-self.exp create mode 100644 gdb/testsuite/gdb.trace/signal.c create mode 100644 gdb/testsuite/gdb.trace/signal.exp -- 1.9.1