From patchwork Wed Aug 13 13:12:15 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Omair Javaid X-Patchwork-Id: 35358 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pd0-f197.google.com (mail-pd0-f197.google.com [209.85.192.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 15DC7203C5 for ; Wed, 13 Aug 2014 13:13:44 +0000 (UTC) Received: by mail-pd0-f197.google.com with SMTP id y10sf74410131pdj.0 for ; Wed, 13 Aug 2014 06:13:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=2t2lXZaJSkUejI8y6CvYnlvVDmL6tiTb97pawwSyeVc=; b=XGY/ZOQ17WNkWnEiDbONQ4Y0R5bNGVeKNHUSAv+ToJnb+BYI0ySUCJ1kTdmr63fEbr BXPiV/qrvk/OPa+T8YDHMe1D/h/qejQxZTdORVRP2HF4yF9fnpBOXp2EcZYEM/5bWmTA gkQ1tRePZbibyCkb6mCiGyenzF9sHF/8uN3j3VRhh4CSySTUtWj5ynT45oelazsZjZ7R 5FcFeicO8PRTvV3nnTNqOiQ8Tg7anpKrxgfS3S69Azo95vt54f1CyvVNa4Tk1n/PIkbB PIwkj4Dz8oz9RQz1U5j5pBxeO3PLF3pamGe3h4dWEWBweztIfIqD5yUctC8AgDx7jXjV /uUw== X-Gm-Message-State: ALoCoQn2ZStm/7FrO5nXsbADLQW7yCZOneOLk12QhOx77cqlgFmNODCrHJqJBIPQuiVIvgHtfoFf X-Received: by 10.68.116.42 with SMTP id jt10mr2385475pbb.5.1407935623403; Wed, 13 Aug 2014 06:13:43 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.21.84 with SMTP id 78ls545227qgk.79.gmail; Wed, 13 Aug 2014 06:13:43 -0700 (PDT) X-Received: by 10.52.165.129 with SMTP id yy1mr713919vdb.57.1407935623271; Wed, 13 Aug 2014 06:13:43 -0700 (PDT) Received: from mail-vc0-f174.google.com (mail-vc0-f174.google.com [209.85.220.174]) by mx.google.com with ESMTPS id vt2si1062460vdb.99.2014.08.13.06.13.43 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 13 Aug 2014 06:13:43 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.174 as permitted sender) client-ip=209.85.220.174; Received: by mail-vc0-f174.google.com with SMTP id la4so15103556vcb.33 for ; Wed, 13 Aug 2014 06:13:43 -0700 (PDT) X-Received: by 10.221.47.9 with SMTP id uq9mr796026vcb.48.1407935623202; Wed, 13 Aug 2014 06:13:43 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.221.37.5 with SMTP id tc5csp329783vcb; Wed, 13 Aug 2014 06:13:42 -0700 (PDT) X-Received: by 10.180.86.225 with SMTP id s1mr4996285wiz.46.1407935621840; Wed, 13 Aug 2014 06:13:41 -0700 (PDT) Received: from mail-wi0-f169.google.com (mail-wi0-f169.google.com [209.85.212.169]) by mx.google.com with ESMTPS id p4si26012305wic.75.2014.08.13.06.13.41 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 13 Aug 2014 06:13:41 -0700 (PDT) Received-SPF: pass (google.com: domain of omair.javaid@linaro.org designates 209.85.212.169 as permitted sender) client-ip=209.85.212.169; Received: by mail-wi0-f169.google.com with SMTP id n3so8376505wiv.2 for ; Wed, 13 Aug 2014 06:13:41 -0700 (PDT) X-Received: by 10.195.11.132 with SMTP id ei4mr1813748wjd.133.1407935621321; Wed, 13 Aug 2014 06:13:41 -0700 (PDT) Received: from localhost.localdomain ([182.185.185.192]) by mx.google.com with ESMTPSA id w14sm50806711wij.2.2014.08.13.06.13.39 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 13 Aug 2014 06:13:40 -0700 (PDT) From: Omair Javaid To: gdb-patches@sourceware.org Cc: patches@linaro.org Subject: [PATCH v3 6/6] Fix reverse-step and reverse-next over undebuggable solib code Date: Wed, 13 Aug 2014 18:12:15 +0500 Message-Id: <1407935535-27978-7-git-send-email-omair.javaid@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1407935535-27978-1-git-send-email-omair.javaid@linaro.org> References: <1407935535-27978-1-git-send-email-omair.javaid@linaro.org> X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: omair.javaid@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.174 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , This patch fixes failures to reverse-step or reverse-next over solib functions in absence of line information. The problem is fixed by making sure that in solib functions we keep doing reverse single stepping in absence of line information. Tested with no regressions on arm, aarch64 and x86_64. gdb: 2014-08-13 Omair Javaid * infrun.c (process_event_stop_test): Updated. --- gdb/infrun.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gdb/infrun.c b/gdb/infrun.c index c18267f..db8f15b 100644 --- a/gdb/infrun.c +++ b/gdb/infrun.c @@ -4905,12 +4905,15 @@ process_event_stop_test (struct execution_control_state *ecs) return; } + stop_pc_sal = find_pc_line (stop_pc, 0); + /* Reverse stepping through solib trampolines. */ if (execution_direction == EXEC_REVERSE && ecs->event_thread->control.step_over_calls != STEP_OVER_NONE) { if (gdbarch_skip_trampoline_code (gdbarch, frame, stop_pc) + || stop_pc_sal.line == 0 || (ecs->stop_func_start == 0 && in_solib_dynsym_resolve_code (stop_pc))) { @@ -4939,8 +4942,6 @@ process_event_stop_test (struct execution_control_state *ecs) } } - stop_pc_sal = find_pc_line (stop_pc, 0); - /* NOTE: tausq/2004-05-24: This if block used to be done before all the trampoline processing logic, however, there are some trampolines that have no names, so we should do trampoline handling first. */