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: 2389 Received: (qmail 25511 invoked by alias); 13 Aug 2014 13:13:45 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 25445 invoked by uid 89); 13 Aug 2014 13:13:45 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-wg0-f46.google.com Received: from mail-wg0-f46.google.com (HELO mail-wg0-f46.google.com) (74.125.82.46) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Wed, 13 Aug 2014 13:13:44 +0000 Received: by mail-wg0-f46.google.com with SMTP id m15so11295121wgh.5 for ; Wed, 13 Aug 2014 06:13: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:date:message-id:in-reply-to :references; bh=2t2lXZaJSkUejI8y6CvYnlvVDmL6tiTb97pawwSyeVc=; b=efibdrKG9TNYr5Ci554Chyt0leuB9O+PK0Kc3ZagtVQaDUo0PRyCRTN1408hTNgc6p vsfkcJurvPWS6l2N/TNBRreqBrI1GAjIm4KRmrDWFu6xzjGPwsJwnS9wqG8Aepg6/NNb 25CLbaSl2r2GHq+9xmOMCgRNBWXvZ23VFLRo2j0Oa0XGFJGoY7AiodDNn5lOIj5gpHwE pN9YjYTswJkJF3enXAvqunN55839s0hqWWI4DtixA5JefrlGdd0dNcEyiIA+lPVYjacQ axW1cMt6xasU7XI1wH41br5J00IOS36VIwI7zJW6IvlJv+9V5OqgNT2nB9dJj//8IY+C ThAA== X-Gm-Message-State: ALoCoQk9rGyNDk7N0havd8QlhU365jxY4qDBexBkAm56JKTLKyWGdkPhJvLlIDXk5U9XQvWovv3a 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> 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-IsSubscribed: yes 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. */