From patchwork Wed Jan 17 11:29:32 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yao Qi X-Patchwork-Id: 25426 Received: (qmail 35799 invoked by alias); 17 Jan 2018 11:29: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 35786 invoked by uid 89); 17 Jan 2018 11:29:44 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No 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.2 spammy=relax, pc, Hx-spam-relays-external:209.85.128.195, H*RU:209.85.128.195 X-HELO: mail-wr0-f195.google.com Received: from mail-wr0-f195.google.com (HELO mail-wr0-f195.google.com) (209.85.128.195) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 17 Jan 2018 11:29:40 +0000 Received: by mail-wr0-f195.google.com with SMTP id x1so14299742wrb.5 for ; Wed, 17 Jan 2018 03:29:39 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id; bh=0xmgFm/HZKY1LW7LjKyXew8XTykerWqnA7lRHtWpdhQ=; b=sCJ//mrhJG4UfMckcO79Q0mBmWMZctfgkRga5vS0ETyOGzQgq13nwiaHnIGPYa2GDm nUZ0BLyHw5wjduTzx/TQGSTsV042rhdQloXfiI3PZ5csCV6NkCgH0tOmx8bRsDoQeaFt ZwMU+A6rWPkhmf5qGO4FinQcEnXmVLNB8fkU0dhDksl7VfUwS6r8VV1Z1Et1peR1/JTg kaID+HwzerncVE8f+Y6aM6Ln8VZcRTWcZHEmi6gbxnYfjP81LLyLOQuHMXqEsRFABUZi wvnZrAPhYmcLr2u43WH5CjcqOHztt38QfSzCtcxrySc1Iwjqf0hHffFimm5v6zhq31Jp ++tw== X-Gm-Message-State: AKwxytcg4LFhiQtXvsMgdKevmPfYGkEKnRcBuO38wItcc1eT95aC8u6c DkuzERj+ONGr0ix73cDDsNDXHg== X-Google-Smtp-Source: ACJfBouBzv5R+V+R42rR8MR+CkSdWytikw9z/DwZxDt/NVnYh04BDwX0M5hBXwy/NVwKluxdW4oluA== X-Received: by 10.223.133.183 with SMTP id 52mr2233133wrt.78.1516188577906; Wed, 17 Jan 2018 03:29:37 -0800 (PST) Received: from E107787-LIN.cambridge.arm.com (static.42.136.251.148.clients.your-server.de. [148.251.136.42]) by smtp.gmail.com with ESMTPSA id l9sm7599069wrb.91.2018.01.17.03.29.37 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 17 Jan 2018 03:29:37 -0800 (PST) From: Yao Qi X-Google-Original-From: Yao Qi To: gdb-patches@sourceware.org Subject: [PATCH master/8.1] Relax gdb.compile/compile.exp to match the address printed for frame Date: Wed, 17 Jan 2018 11:29:32 +0000 Message-Id: <1516188572-5245-1-git-send-email-yao.qi@linaro.org> X-IsSubscribed: yes One test in gdb.compile/compile.exp passes on one fedora builder, bt #0 0x00007ffff7ff43f6 in _gdb_expr (__regs=0x7ffff7ff2000) at gdb command line:1^M #1 ^M #2 main () at /home/gdb-buildbot/fedora-x86-64-1/fedora-x86-64/build/gdb/testsuite/../../../binutils-gdb/gdb/testsuite/gdb.compile/compile.c:106^M (gdb) PASS: gdb.compile/compile.exp: bt but fails on my machine with gcc trunk, bt^M #0 _gdb_expr (__regs=0x7ffff7ff3000) at gdb command line:1^M #1 ^M #2 main () at gdb/testsuite/gdb.compile/compile.c:106^M (gdb) FAIL: gdb.compile/compile.exp: bt The test should be tweaked to match both cases (pc in the start of line vs pc in the middle of line). Note that I am not clear that why libcc1 emits debug info this way so that the address is in the middle of line. I'll push it in to both master and 8.1 branch. gdb/testsuite: 2018-01-17 Yao Qi * gdb.compile/compile.exp: Match the address printed for frame in the output of command "bt". --- gdb/testsuite/ChangeLog | 5 +++++ gdb/testsuite/gdb.compile/compile.exp | 7 +++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 452f6c9..cd99b84 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2018-01-17 Yao Qi + + * gdb.compile/compile.exp: Match the address printed for + frame in the output of command "bt". + 2018-01-15 Tom Tromey * gdb.guile/scm-ports.exp (test_mem_port_rw): Use get_valueof to diff --git a/gdb/testsuite/gdb.compile/compile.exp b/gdb/testsuite/gdb.compile/compile.exp index 15f7cf1..4303c02 100644 --- a/gdb/testsuite/gdb.compile/compile.exp +++ b/gdb/testsuite/gdb.compile/compile.exp @@ -139,8 +139,11 @@ gdb_test "compile code func_doesnotexist ();" "warning: Could not find symbol \" gdb_test "compile code *(volatile int *) 0 = 0;" \ "The program being debugged was signaled while in a function called from GDB\\.\r\nGDB remains in the frame where the signal was received\\.\r\n.*" \ "compile code segfault first" -gdb_test "bt" \ - "\r\n#0 \[^\r\n\]* in _gdb_expr \[^\r\n\]*\r\n#1 \r\n.*" +gdb_test "bt" [multi_line \ + "#0 ($hex in )?_gdb_expr .*" \ + "#1 " \ + "#2 .*" \ + ] set test "p/x \$pc" set infcall_pc 0