From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13569 invoked by alias); 15 Oct 2019 00:22:59 -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 13561 invoked by uid 89); 15 Oct 2019 00:22:58 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-25.2 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,SPF_PASS autolearn=ham version=3.3.1 spammy=_task X-HELO: mx1.suse.de Received: from mx2.suse.de (HELO mx1.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 15 Oct 2019 00:22:57 +0000 Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 4C7F2B15B for ; Tue, 15 Oct 2019 00:22:55 +0000 (UTC) Date: Tue, 15 Oct 2019 00:22:00 -0000 From: Tom de Vries To: gdb-patches@sourceware.org Subject: [committed][gdb/testsuite] Fix gdb.ada/mi_task_arg.exp Message-ID: <20191015002252.GA24906@delia> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) X-IsSubscribed: yes X-SW-Source: 2019-10/txt/msg00390.txt.bz2 Hi, On openSUSE Leap 15.1, we have: ... FAIL: gdb.ada/mi_task_arg.exp: -stack-list-arguments 1 (unexpected output) ... The problem is that the stack-list-arguments command prints a frame argument 'self_id' for function system.tasking.stages.task_wrapper: ... frame={level="2",args=[{name="self_id",value="0x12345678"}] ... where none (args=[]) is expected. The frame argument is in fact correct. The FAIL does not show for say, fedora 30, because there the executable uses the system.tasking.stages.task_wrapper from /lib64/libgnarl-9.so. Adding "additional_flags=-bargs additional_flags=-shared additional_flags=-largs" to the flags argument of gdb_compile_ada gives us the same PASS, but installing libada7-debuginfo gets us the same FAIL again. Fix the FAIL by allowing the 'self_id' argument. Tested on x86_64-linux. Change-Id: I5aee5856fa6aeb0cc78aa4fe69deecba5b00b77a --- gdb/testsuite/gdb.ada/mi_task_arg.exp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/gdb/testsuite/gdb.ada/mi_task_arg.exp b/gdb/testsuite/gdb.ada/mi_task_arg.exp index 6c4156f5d33..29fcb4488c6 100644 --- a/gdb/testsuite/gdb.ada/mi_task_arg.exp +++ b/gdb/testsuite/gdb.ada/mi_task_arg.exp @@ -44,7 +44,13 @@ if ![mi_runto "task_switch.break_me"] then { # Verify that "-stack-list-arguments" does not cause the debugger to # crash when printing the arguments of frame 1 (due to the internally- # generated argument "_task"). +# Frame for task_switch.break_me +set frame0 "frame=\{level=\"0\",args=\\\[\\\]\}" +# Frame for task_switch.caller +set frame1 "frame=\{level=\"1\",args=\\\[\{name=\"<_task>\",value=\"$hex\"\}\\\]\}" +# Frame for system.tasking.stages.task_wrapper +set frame2 "frame=\{level=\"2\",args=\\\[(\{name=\"self_id\",value=\"$hex\"\})?\\\]\}" mi_gdb_test "-stack-list-arguments 1" \ - "\\^done,stack-args=\\\[frame=\{level=\"0\",args=\\\[\\\]\},frame=\{level=\"1\",args=\\\[\{name=\"<_task>\",value=\"$hex\"\}\\\]\},frame=\{level=\"2\",args=\\\[\\\]\}.*" \ + "\\^done,stack-args=\\\[$frame0,$frame1,$frame2,.*" \ "-stack-list-arguments 1" Committed to trunk. Thanks, - Tom [gdb/testsuite] Fix gdb.ada/mi_task_arg.exp