From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 82224 invoked by alias); 2 Jun 2016 09:31:06 -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 82173 invoked by uid 89); 2 Jun 2016 09:31:04 -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=HX-Received:10.66.122.175, usages, HERE X-HELO: mail-pa0-f68.google.com Received: from mail-pa0-f68.google.com (HELO mail-pa0-f68.google.com) (209.85.220.68) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Thu, 02 Jun 2016 09:30:53 +0000 Received: by mail-pa0-f68.google.com with SMTP id x1so2851036pav.1 for ; Thu, 02 Jun 2016 02:30:53 -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=6HWF93O11q6WxMwhisoAnEdO1r3e9ygKOomilM42jcU=; b=beHqdWd+uKSIA0WY6Uge6wXA0dEVYXCq8u8nRhl7SU+4GB0eP5btN1ZCUYsg/iH+/h tnOvqM79QHPGKw0InRjZ8xHGnAampev6LZhyj9FPZFfGlSbrT42tuu0XptVFIw7IMwhn fH8op15MmyfNH1iQNftiJrVZ0emzABIO+2nvpcajyrvZv8TTj08IdzpaNQ0FZYHg5M3i cBVMUo5eS75oSyXcBBPSnD/7RMsEmzeQVirSyFH0qXOSZAVWkVZiGsYt2ZYGcw34YkVZ d7ENAIhuCbZI6Y8HaEBAWn6wydtlS8Kd99klaH3dHl6rWHZko5MRE8yxzrMs68dL3k0A MQKg== X-Gm-Message-State: ALyK8tKtl+5B7Bt9Wv8qeqCVZ1cR7VzBQCgjHOrmVdxp/qI4uaMaYKFIIQQ6l5QiOyr3Og== X-Received: by 10.66.122.175 with SMTP id lt15mr4068172pab.51.1464859852050; Thu, 02 Jun 2016 02:30:52 -0700 (PDT) Received: from E107787-LIN.cambridge.arm.com (gcc113.osuosl.org. [140.211.9.71]) by smtp.gmail.com with ESMTPSA id hw10sm68656218pac.15.2016.06.02.02.30.50 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 02 Jun 2016 02:30:51 -0700 (PDT) From: Yao Qi X-Google-Original-From: Yao Qi To: gdb-patches@sourceware.org Subject: [PATCH 00/12 V2] Use reinsert breakpoint for vCont;s Date: Thu, 02 Jun 2016 09:31:00 -0000 Message-Id: <1464859846-15619-1-git-send-email-yao.qi@linaro.org> X-IsSubscribed: yes X-SW-Source: 2016-06/txt/msg00029.txt.bz2 Here is the V2 of this patch series, V1 can be found https://sourceware.org/ml/gdb-patches/2016-05/msg00358.html Nowadays, reinsert breakpoint is used in GDBserver to step over a breakpoint. I want to use it to handle vCont;s too. The idea is that when GDBserver receives resume_step request from GDB, use the software single step logic, insert reinsert_breakpoint on the next pcs, and resume the thread. This means we have multiple reinsert_breakpoints for different threads for either step-over or vCont;s. Patches 2~5 are the fixes to existing GDBserver problems on step-over with reinsert_breakpoint in various cases (exit, fork, and vfork). Although these 4 patches can be sent as another patch series, I still include them in this series, as they are derived from the V1 review. Patches 7 and 12 aren't changed. All review comments are addressed in the rest of patches. Once this series goes in, I'll start to rename 'reinsert_breakpoint' and 'other_breakpoint' to match their usages in GDBserver. Regression tested on {x86_64, arm, aarch64}-linux. *** BLURB HERE *** Yao Qi (12): Switch to current thread in finish_step_over More assert checks on reinsert breakpoint Step over exit with reinsert breakpoints Delete reinsert breakpoints from forked child Handle reinsert breakpoints for vforked child Pass breakpoint type in set_breakpoint_at Create sub classes of 'struct breakpoint' Refactor clone_all_breakpoints Make reinsert_breakpoint thread specific Switch current_thread to lwp's thread in install_software_single_step_breakpoints Use reinsert_breakpoint for vCont;s Support vCont s and S actions with software single step gdb/gdbserver/gdbthread.h | 3 + gdb/gdbserver/inferiors.c | 12 + gdb/gdbserver/linux-low.c | 206 +++++++++++++++-- gdb/gdbserver/mem-break.c | 341 +++++++++++++++++++++------- gdb/gdbserver/mem-break.h | 44 ++-- gdb/gdbserver/server.c | 17 +- gdb/testsuite/gdb.base/step-over-exit.c | 50 ++++ gdb/testsuite/gdb.base/step-over-exit.exp | 127 +++++++++++ gdb/testsuite/gdb.base/step-over-fork-1.c | 51 +++++ gdb/testsuite/gdb.base/step-over-fork-1.exp | 106 +++++++++ 10 files changed, 842 insertions(+), 115 deletions(-) create mode 100644 gdb/testsuite/gdb.base/step-over-exit.c create mode 100644 gdb/testsuite/gdb.base/step-over-exit.exp create mode 100644 gdb/testsuite/gdb.base/step-over-fork-1.c create mode 100644 gdb/testsuite/gdb.base/step-over-fork-1.exp -- 1.9.1