From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 46748 invoked by alias); 21 Nov 2019 08:23:17 -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 46737 invoked by uid 89); 21 Nov 2019 08:23:17 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-0.9 required=5.0 tests=BAYES_00,FORGED_SPF_HELO,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS autolearn=no version=3.3.1 spammy= X-HELO: EUR01-DB5-obe.outbound.protection.outlook.com Received: from mail-eopbgr150055.outbound.protection.outlook.com (HELO EUR01-DB5-obe.outbound.protection.outlook.com) (40.107.15.55) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 21 Nov 2019 08:23:16 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=eItILpDZ3Hu/z+Xs5qMmIGlrnlkno4wExVGkyZy1ZCQ=; b=k5FBKTa8XtDdz7yKhxzmduF6y8eLlX59EtiakosRm6MAM4nrYjgKWsaO22xaqphnpxVpe34fNg3Sw7l6T5E+WQhsDNootXlrrQTxmcvWyQmIh/vbvgRv3BZSFgrwNGdCATmr6knHwn92dVjHarxI3uyKDYSy2LPnshsLILpp4SA= Received: from VI1PR08CA0145.eurprd08.prod.outlook.com (2603:10a6:800:d5::23) by DB8PR08MB3980.eurprd08.prod.outlook.com (2603:10a6:10:b1::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2474.19; Thu, 21 Nov 2019 08:23:13 +0000 Received: from DB5EUR03FT018.eop-EUR03.prod.protection.outlook.com (2a01:111:f400:7e0a::203) by VI1PR08CA0145.outlook.office365.com (2603:10a6:800:d5::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2474.17 via Frontend Transport; Thu, 21 Nov 2019 08:23:12 +0000 Authentication-Results: spf=fail (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; sourceware.org; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;sourceware.org; dmarc=none action=none header.from=arm.com; Received-SPF: Fail (protection.outlook.com: domain of arm.com does not designate 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by DB5EUR03FT018.mail.protection.outlook.com (10.152.20.69) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2474.17 via Frontend Transport; Thu, 21 Nov 2019 08:23:12 +0000 Received: ("Tessian outbound f7868d7ede10:v33"); Thu, 21 Nov 2019 08:23:11 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 302bdf4aea12ce66 X-CR-MTA-TID: 64aa7808 Received: from 5d34b6977697.1 (ip-172-16-0-2.eu-west-1.compute.internal [104.47.8.54]) by 64aa7808-outbound-1.mta.getcheckrecipient.com id 450FB3A8-AEAF-48BA-8278-70654C20943A.1; Thu, 21 Nov 2019 08:23:06 +0000 Received: from EUR03-AM5-obe.outbound.protection.outlook.com (mail-am5eur03lp2054.outbound.protection.outlook.com [104.47.8.54]) by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 5d34b6977697.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Thu, 21 Nov 2019 08:23:06 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DdwZp2GYNUnZwS1t7FnMDlnuijUfoHMHQ94baTxLSPEjmGYgskpyGIzvVavL9qLHg4ASjbHKGD7GZ5c8KHXzkUMC4bygYJcOFEaQP8z5KIairssOyCawuiahmdfPv2fPxfm9F4nuJ2DWIU/MroOwhR9oGeuXZ1asuRtuzc77dTp4NytHjIgS9yKiHp9CeDaCqIA6YjsiPwxiWYd1GRbrt5IyeydVbK0+PILH2vPSe+p9HhzooWdYcdkQ0Q70IE5XMpvBkohK5r6zxEpR3ImDXlslFhkRUhRZu0k6xLqiS7zAak+kIVd97xUGqnnKHxMO4Q8qZFRfGMDS7iDBC7Y+Vg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=eItILpDZ3Hu/z+Xs5qMmIGlrnlkno4wExVGkyZy1ZCQ=; b=BhiRNd95P8fe+GeAPS1MtnCikGb49ecWkjEljnPiz4u9wkJoZcOiCjR3gc5VS7djLlrr56qXEcapnzzfpgQOPKXgOes2Yx4t013aYiuh6DyNk9W0cS5edvozGNZA94Tfkn0MldKSQ9YL6WERdW6UkBp8CP7RumdSKiMqPMsfcMlM+2gAD1tbk6ZFkB3hUEFErAmEln8M9qTdCS+ulQYd7NZTcqHuOP/D+d9nRrpb8XppVy+B1mIakd58R5v3MItYdrjWccSnIag7MtWiqeAc3QA0q5ZIf34G5zkRj/ZfYnTHT+IJmzGsfUmyWC8HlRROwV0rBGzyKikc9zPSV0Tydw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=eItILpDZ3Hu/z+Xs5qMmIGlrnlkno4wExVGkyZy1ZCQ=; b=k5FBKTa8XtDdz7yKhxzmduF6y8eLlX59EtiakosRm6MAM4nrYjgKWsaO22xaqphnpxVpe34fNg3Sw7l6T5E+WQhsDNootXlrrQTxmcvWyQmIh/vbvgRv3BZSFgrwNGdCATmr6knHwn92dVjHarxI3uyKDYSy2LPnshsLILpp4SA= Received: from DB8PR08MB5004.eurprd08.prod.outlook.com (10.255.19.224) by DB8PR08MB5115.eurprd08.prod.outlook.com (10.255.18.215) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2474.19; Thu, 21 Nov 2019 08:23:05 +0000 Received: from DB8PR08MB5004.eurprd08.prod.outlook.com ([fe80::5c07:14e9:db30:e60a]) by DB8PR08MB5004.eurprd08.prod.outlook.com ([fe80::5c07:14e9:db30:e60a%7]) with mapi id 15.20.2474.019; Thu, 21 Nov 2019 08:23:05 +0000 From: Alan Hayward To: Simon Marchi CC: Luis Machado , "gdb-patches\\@sourceware.org" , nd Subject: Re: [review v4] [AArch64, SVE] Improve target description check for SVE in gdbserver Date: Thu, 21 Nov 2019 08:23:00 -0000 Message-ID: <024F5342-B699-4F3D-9CB9-92D544A25617@arm.com> References: <20191119151417.76C002816F@gnutoolchain-gerrit.osci.io> <2774AF7F-70C2-494E-93A1-90402900336E@arm.com> In-Reply-To: Authentication-Results-Original: spf=none (sender IP is ) smtp.mailfrom=Alan.Hayward@arm.com; x-checkrecipientrouted: true x-ms-oob-tlc-oobclassifiers: OLM:7691;OLM:7691; X-Forefront-Antispam-Report-Untrusted: SFV:NSPM;SFS:(10009020)(4636009)(39850400004)(136003)(376002)(346002)(396003)(366004)(199004)(189003)(256004)(99286004)(54906003)(8676002)(316002)(8936002)(50226002)(6116002)(81156014)(33656002)(3846002)(71200400001)(71190400001)(6486002)(2906002)(6436002)(229853002)(81166006)(6246003)(4326008)(66066001)(6512007)(2616005)(14454004)(36756003)(4744005)(6916009)(5660300002)(53546011)(26005)(6506007)(186003)(86362001)(102836004)(11346002)(575854001)(4001150100001)(446003)(64756008)(66446008)(25786009)(66476007)(66556008)(305945005)(91956017)(76116006)(66946007)(478600001)(7736002)(76176011)(14444005);DIR:OUT;SFP:1101;SCL:1;SRVR:DB8PR08MB5115;H:DB8PR08MB5004.eurprd08.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; received-spf: None (protection.outlook.com: arm.com does not designate permitted sender hosts) X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: lWepOYhhvbLZfIdxnXus6zusynbUVnWVcK3J+K3MNk8iFwVYc/kMBgyHB8OhMlfXMOUA0HBrukg9EskIZXpY/BJwYxCU8OA6dAakxd9M+mzftn/22IwhGL5JVe7IS7F/Jd542HM51n5KxlQ7QjvcokgzkRMahG/3XCR4SXpEwisf3Zf2KqqIU2HcK/6Jj5Iw3OOMtZ9SiDalfhlKW9Bu4v2MgB5WdFyD5fJYYe1uU83ac70TsNDowgzSxbjw2Xza29Jh/lJPijgAn9ker0tSeJTQPI9q1Mp6/JJb9LZo+Zh9Wg0Phw9Vv5oIhwSweBP/8vugmIRtuuPl9F/yM5FIwbs2rzBWUBt4tEeKrkBUE+NoXKIogTHteo/TwIfXWor7rWkobP4HvCwzL42U1ht6UKdrbznp0+dGiONX0cfCsG7OlYZ6RS9woqR0nwkugF8W x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="utf-8" Content-ID: <57E708C19A3B3C49885CEC413CE84009@eurprd08.prod.outlook.com> Content-Transfer-Encoding: base64 MIME-Version: 1.0 Original-Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Alan.Hayward@arm.com; Return-Path: Alan.Hayward@arm.com X-MS-Exchange-Transport-CrossTenantHeadersStripped: DB5EUR03FT018.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 4bb4863c-97d2-4df3-5b65-08d76e5c08b6 X-IsSubscribed: yes X-SW-Source: 2019-11/txt/msg00645.txt.bz2 DQoNCj4gT24gMjAgTm92IDIwMTksIGF0IDE2OjUxLCBTaW1vbiBNYXJjaGkg PHNpbW9uLm1hcmNoaUBwb2x5bXRsLmNhPiB3cm90ZToNCj4gDQo+IE9uIDIw MTktMTEtMjAgMTE6MzQgYS5tLiwgQWxhbiBIYXl3YXJkIHdyb3RlOg0KPj4g KEdlcnJpdCBhcHBlYXJzIG5vdCB0byBiZSBzZW5kaW5nIG1lIGFjY291bnQg dmVyaWZpY2F0aW9uIGVtYWlscywgc28gY2Fu4oCZdCByZXZpZXcgZnJvbSB0 aGVyZS4uLikNCj4gDQo+IFRoZXJlIGFwcGVhcnMgdG8gYmUgc29tZSBwcm9i bGVtcyB3aXRoIHRoZXNlIGVtYWlscywgSSBkb24ndCBrbm93IHdoeQ0KPiBh dCB0aGUgbW9tZW50Lg0KDQpMb29rcyBsaWtlIHRoZXkgd2VyZSB3b3JraW5n LCBidXQgTVMgZXhjaGFuZ2UgcXVhcmFudGluZWQgdGhlbSBhbmQgZGlkbuKA mXQgbGV0IG1lIGtub3cgdW50aWwgdGhpcyBtb3JuaW5nLg0KDQo+ICBJJ3Zl IGFjdGl2YXRlZCB5b3VyIGFjY291bnQgYnkgaGFuZC4NCg0KTWFueSB0aGFu a3MuDQoNCj4gDQo+IFNpbW9uDQoNCg== >From gdb-patches-return-161048-listarch-gdb-patches=sources.redhat.com@sourceware.org Thu Nov 21 10:03:15 2019 Return-Path: Delivered-To: listarch-gdb-patches@sources.redhat.com Received: (qmail 35950 invoked by alias); 21 Nov 2019 10:03:15 -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 Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 35937 invoked by uid 89); 21 Nov 2019 10:03:15 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-21.5 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3 autolearn=ham version=3.3.1 spammy=interpreter, logging X-HELO: mx1.osci.io Received: from polly.osci.io (HELO mx1.osci.io) (8.43.85.229) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 21 Nov 2019 10:03:13 +0000 Received: by mx1.osci.io (Postfix, from userid 994) id 8577220470; Thu, 21 Nov 2019 05:03:11 -0500 (EST) Received: from gnutoolchain-gerrit.osci.io (gnutoolchain-gerrit.osci.io [8.43.85.239]) by mx1.osci.io (Postfix) with ESMTP id 777C9203A6; Thu, 21 Nov 2019 05:03:07 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by gnutoolchain-gerrit.osci.io (Postfix) with ESMTP id 5B5D028172; Thu, 21 Nov 2019 05:03:07 -0500 (EST) X-Gerrit-PatchSet: 2 Date: Thu, 21 Nov 2019 10:03:00 -0000 From: "Sourceware to Gerrit sync (Code Review)" To: Tom de Vries , gdb-patches@sourceware.org Cc: Simon Marchi , Andrew Burgess Auto-Submitted: auto-generated X-Gerrit-MessageType: merged Subject: [pushed] [gdb] Only force INTERP_CONSOLE ui_out for breakpoint commands in MI ... X-Gerrit-Change-Id: Id1771e7fcc9496a7d97ec2b2ea6b1487596f1ef7 X-Gerrit-Change-Number: 28 X-Gerrit-ChangeURL: X-Gerrit-Commit: 65d1cd5f9cbcbb2df0b187cb7623949c1668728f In-Reply-To: References: Reply-To: noreply@gnutoolchain-gerrit.osci.io, simon.marchi@polymtl.ca, tdevries@suse.de, andrew.burgess@embecosm.com, gdb-patches@sourceware.org MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline User-Agent: Gerrit/3.0.3-79-g83ff7f88f1 Content-Type: text/plain; charset=UTF-8 Message-Id: <20191121100307.5B5D028172@gnutoolchain-gerrit.osci.io> X-SW-Source: 2019-11/txt/msg00646.txt.bz2 Content-length: 6740 Sourceware to Gerrit sync has submitted this change. Change URL: https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/28 ...................................................................... [gdb] Only force INTERP_CONSOLE ui_out for breakpoint commands in MI mode The problem reported in PR mi/25055 is that the output of the backtrace command, when executed as breakpoint command does not show when executing using the MI interpreter: ... $ gdb a.out Reading symbols from a.out... (gdb) break main Breakpoint 1 at 0x4003c0: file test.c, line 19. (gdb) commands Type commands for breakpoint(s) 1, one per line. End with a line saying just "end". >bt >end (gdb) interpreter-exec mi "-exec-run" ^done Breakpoint 1, main () at test.c:19 19 return foo (4); (gdb) ... Interestingly, the function print_frame is called twice during -exec-run: - once during tui_on_normal_stop where the ui_out is temporarily set to tui->interp_ui_out (), resulting in the part after the comma in "Breakpoint 1, main () at test.c:19" - once during execute_control_command, where the ui_out is the default for the current interpreter: mi_ui_out, which ignores calls to output text. The commit 3a87ae656c2 "Use console uiout when executing breakpoint commands" fixes the problem by temporarily switching to the ui_out of INTERP_CONSOLE in execute_control_command. This however caused a regression in redirection (escaping '#' using '\' for git commit message convenience): ... $ rm -f gdb.txt; gdb a.out Reading symbols from a.out... (gdb) break main Breakpoint 1 at 0x4003c0: file test.c, line 19. (gdb) commands Type commands for breakpoint(s) 1, one per line. End with a line saying just "end". >bt >end (gdb) set logging redirect on (gdb) set logging on Redirecting output to gdb.txt. Copying debug output to gdb.txt. (gdb) run \#0 main () at test.c:19 (gdb) q A debugging session is active. Inferior 1 [process 22428] will be killed. Quit anyway? (y or n) y $ cat gdb.txt Starting program: /data/gdb_versions/devel/a.out Breakpoint 1, main () at test.c:19 19 return foo (4); ... The problem is that the '#0 main () at test.c:19' ends up in the gdb output output rather than in gdb.txt. This is due to the fact that the redirect is setup for the current ui_out (which is tui->interp_ui_out ()), while the backtrace output is printed to the INTERP_CONSOLE ui_out. Fix this by limiting switching to INTERP_CONSOLE ui_out to when INTERP_MI is active. Tested on x86_64-linux. gdb/ChangeLog: 2019-11-21 Tom de Vries PR gdb/24956 * cli/cli-script.c (execute_control_command): Only switch to INTERP_CONSOLE's ui_out when INTERP_MI is active. gdb/testsuite/ChangeLog: 2019-11-21 Tom de Vries PR gdb/24956 * gdb.base/ui-redirect.exp: Test output of user-defined command. Change-Id: Id1771e7fcc9496a7d97ec2b2ea6b1487596f1ef7 --- M gdb/ChangeLog M gdb/cli/cli-script.c M gdb/testsuite/ChangeLog M gdb/testsuite/gdb.base/ui-redirect.exp 4 files changed, 35 insertions(+), 0 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index cf65de2..3652685 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2019-11-21 Tom de Vries + + PR gdb/24956 + * cli/cli-script.c (execute_control_command): Only switch to + INTERP_CONSOLE's ui_out when INTERP_MI is active. + 2019-11-19 Tom Tromey * tui/tui-win.c (tui_partial_win_by_name): Move from tui-data.c. diff --git a/gdb/cli/cli-script.c b/gdb/cli/cli-script.c index 316aca0..06cdcd6 100644 --- a/gdb/cli/cli-script.c +++ b/gdb/cli/cli-script.c @@ -696,6 +696,9 @@ enum command_control_type execute_control_command (struct command_line *cmd, int from_tty) { + if (!current_uiout->is_mi_like_p ()) + return execute_control_command_1 (cmd, from_tty); + /* Make sure we use the console uiout. It's possible that we are executing breakpoint commands while running the MI interpreter. */ interp *console = interp_lookup (current_ui, INTERP_CONSOLE); diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index f47ed17..16027e4 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2019-11-21 Tom de Vries + + PR gdb/24956 + * gdb.base/ui-redirect.exp: Test output of user-defined command. + 2019-11-20 Sergio Durigan Junior * gdb.python/py-progspace.exp: Add missing parentheses on some diff --git a/gdb/testsuite/gdb.base/ui-redirect.exp b/gdb/testsuite/gdb.base/ui-redirect.exp index efcac14..932c74a 100644 --- a/gdb/testsuite/gdb.base/ui-redirect.exp +++ b/gdb/testsuite/gdb.base/ui-redirect.exp @@ -57,6 +57,24 @@ set outdir [standard_output_file {}] set cmds_file "$outdir/cmds.txt" +with_test_prefix "userdefined" { + set test "define userdefined" + gdb_test_multiple $test $test { + -re "End with a line saying just \"end\"\\.\r\n>$" { + pass $test + } + } + + set test "bt" + gdb_test_multiple $test $test { + -re "\r\n>$" { + pass $test + } + } + + gdb_test_no_output "end" +} + with_test_prefix "logging" { gdb_test_no_output "set logging file /dev/null" gdb_test "set logging on" \ @@ -64,6 +82,7 @@ gdb_test "save breakpoints $cmds_file" "Saved to file '$cmds_file'\\." \ "save breakpoints cmds.txt" cmp_file_string "$cmds_file" "$cmds" "cmds.txt" + gdb_test "userdefined" "#0 main ().*" gdb_test "set logging off" "Done logging to /dev/null\\." gdb_test "help" "List of classes of commands:.*" } @@ -74,6 +93,7 @@ "Redirecting output to /dev/null.*Copying debug output to /dev/null\\." gdb_test_no_output "save breakpoints $cmds_file" "save breakpoints cmds.txt" cmp_file_string "$cmds_file" "$cmds" "cmds.txt" + gdb_test_no_output "userdefined" gdb_test "set logging off" "Done logging to /dev/null\\." gdb_test "help" "List of classes of commands:.*" } @@ -87,6 +107,7 @@ gdb_test "save breakpoints $cmds_file" "Saved to file '$cmds_file'\\." \ "save breakpoints cmds.txt" cmp_file_string "$cmds_file" "$cmds" "cmds.txt" + gdb_test "userdefined" "#0 main ().*" gdb_test "set logging off" "Done logging to /dev/null\\." gdb_test "help" "List of classes of commands:.*" gdb_test_no_output "set logging redirect off" -- Gerrit-Project: binutils-gdb Gerrit-Branch: master Gerrit-Change-Id: Id1771e7fcc9496a7d97ec2b2ea6b1487596f1ef7 Gerrit-Change-Number: 28 Gerrit-PatchSet: 2 Gerrit-Owner: Tom de Vries Gerrit-Reviewer: Andrew Burgess Gerrit-Reviewer: Simon Marchi Gerrit-Reviewer: Tom de Vries Gerrit-MessageType: merged