From patchwork Fri Feb 7 14:59:58 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shahab Vahedi X-Patchwork-Id: 37743 Received: (qmail 82280 invoked by alias); 7 Feb 2020 15:01:18 -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 81543 invoked by uid 89); 7 Feb 2020 15:01:01 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00, FREEMAIL_FROM, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.1 spammy=HContent-Transfer-Encoding:8bit X-HELO: mail-lj1-f194.google.com Received: from mail-lj1-f194.google.com (HELO mail-lj1-f194.google.com) (209.85.208.194) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 07 Feb 2020 15:00:56 +0000 Received: by mail-lj1-f194.google.com with SMTP id x7so2490104ljc.1 for ; Fri, 07 Feb 2020 07:00:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=enwN/JSniWGwqRJIqwnOxIZi8M2smV+0fosnGbuJ6Tw=; b=pdqPwEinxlRi9Pl/2d9ZJcUbYtvlULFb9qUF4kpJz07onZmVCRZ+lYBrrKMxlIWxSF y1ohz2V4IeQyYYT4hhNBGMylc2OhrgmbF3xFP/Y8wLX3t24VM0kaPFlGGIldI1v2q4fz oxPMgXz6HLJFIPbbdtUVz9gSrwm3CeJS6vwXk8VJf4kUeq4ebIka+1ZGvFZbt6YpwnNh T0bT6bYMLe1InxAWLJLs1FPys7Do+YnbN7ckIW+5BPEkWRlfXgbAhRdIQt/Y8ZHtHVIu uJVrlGaY5namhwMncKYtUnx90xLuDPjzoYKjMepnBrPjuRMLBH0sVb1YFNaxGi8Fx4Vm GYRQ== Return-Path: Received: from archie.internal.synopsys.com ([2a03:1b20:6:f011::2d]) by smtp.gmail.com with ESMTPSA id p136sm1184412lfa.8.2020.02.07.07.00.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Feb 2020 07:00:53 -0800 (PST) From: Shahab Vahedi To: gdb-patches@sourceware.org Cc: Shahab Vahedi , Shahab Vahedi , Francois Bedard , Anton Kolesov Subject: [PATCH 09/14] gdb/testsuite: Fix break-always.exp for enabled do_reload_on_run Date: Fri, 7 Feb 2020 15:59:58 +0100 Message-Id: <20200207150003.8383-10-shahab.vahedi@gmail.com> In-Reply-To: <20200207150003.8383-1-shahab.vahedi@gmail.com> References: <20200207150003.8383-1-shahab.vahedi@gmail.com> MIME-Version: 1.0 From: Anton Kolesov GDB testsuite proc "runto" is not compatible with "always-inserted on" when gdb,do_reload_on_run is set - in this case "runto" will insert breakpoint, and then will do a reload, which will overwrite an already inserted breakpoint, so further continue will not succeed. There is no problem with "always-inserted off", because breakpoints are inserted automatically by GDB before resuming, so reloading doesn't overwrite them. gdb/testsuite/ChangeLog: 2016-07-19 Anton Kolesov * gdb.base/break-always.exp: Move "runto" before "always-inserted on". Signed-off-by: Anton Kolesov --- gdb/testsuite/gdb.base/break-always.exp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/gdb/testsuite/gdb.base/break-always.exp b/gdb/testsuite/gdb.base/break-always.exp index b2a2f3a475cb..c3b55b9f8402 100644 --- a/gdb/testsuite/gdb.base/break-always.exp +++ b/gdb/testsuite/gdb.base/break-always.exp @@ -21,6 +21,14 @@ if { [prepare_for_testing "failed to prepare" break-always break-always.c] } { return -1 } +# GDB testsuite proc "runto" is not compatible with "always-inserted on" when +# gdb,do_reload_on_run is set - in this case "runto" will insert breakpoint, +# and then will do a reload, which will overwrite an already inserted +# breakpoint, so further continue will not succeed. There is no problem with +# "always-inserted off", because breakpoints are inserted automatically by GDB +# before resuming, so reloading doesn't overwrite them. +runto foo + set bar_location [gdb_get_line_number "break in bar" break-always.c] gdb_test_no_output "set breakpoint always-inserted on" @@ -28,8 +36,6 @@ gdb_test_no_output "set breakpoint always-inserted on" gdb_test "show breakpoint always-inserted" "mode is on\." \ "confirm breakpoint always-inserted" -runto foo - gdb_test "break bar" "Breakpoint 2.*" "set breakpoint on bar" gdb_test "break bar" "Note: breakpoint 2 also set.*Breakpoint 3.*" "set 2nd breakpoint on bar" gdb_test "break bar" "Note: breakpoints 2 and 3 also set.*Breakpoint 4.*" "set 3rd breakpoint on bar"