From patchwork Wed May 22 12:48:58 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alan Hayward X-Patchwork-Id: 32793 Received: (qmail 125544 invoked by alias); 22 May 2019 12:49:07 -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 125480 invoked by uid 89); 22 May 2019 12:49:04 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-24.2 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS, SPF_PASS autolearn=ham version=3.3.1 spammy= X-HELO: EUR04-DB3-obe.outbound.protection.outlook.com Received: from mail-eopbgr60052.outbound.protection.outlook.com (HELO EUR04-DB3-obe.outbound.protection.outlook.com) (40.107.6.52) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 22 May 2019 12:49:01 +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=M5dPjGTzjk0+Rsp9Xq1N4DTm4/SFbeMFMDQDAACwotw=; b=NTSdU080KjgEnFaltWuwAMJGBOS7aBtdSO6OahEOXzi8+bIlIuI1b3Pz/cT92EvvZBfLi2V4myzTyOFUJQ1ES06KpygAWfl4JyQhZZtnp6gzxEUbcF+qqX40M/Ahw8xKUPpsd7OGoFmk9BaW1mUUNshjrJVz2e8nTISEhbYR1cE= Received: from DB6PR0802MB2133.eurprd08.prod.outlook.com (10.172.227.22) by DB6PR0802MB2549.eurprd08.prod.outlook.com (10.172.251.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1922.17; Wed, 22 May 2019 12:48:58 +0000 Received: from DB6PR0802MB2133.eurprd08.prod.outlook.com ([fe80::8c26:bb4b:6c93:9d40]) by DB6PR0802MB2133.eurprd08.prod.outlook.com ([fe80::8c26:bb4b:6c93:9d40%2]) with mapi id 15.20.1900.020; Wed, 22 May 2019 12:48:58 +0000 From: Alan Hayward To: Eli Zaretskii CC: "gdb-patches@sourceware.org" , nd Subject: Re: [PATCH] Document gdb.in/gdb.cmd files and debugredirect cli command Date: Wed, 22 May 2019 12:48:58 +0000 Message-ID: References: <20190521090758.62153-1-alan.hayward@arm.com> <83a7ff7y0x.fsf@gnu.org> In-Reply-To: <83a7ff7y0x.fsf@gnu.org> authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alan.Hayward@arm.com; x-ms-oob-tlc-oobclassifiers: OLM:10000; received-spf: None (protection.outlook.com: arm.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 Content-ID: <464E8334B2530E4994489D2C266CBE8C@eurprd08.prod.outlook.com> MIME-Version: 1.0 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-IsSubscribed: yes > On 22 May 2019, at 08:23, Eli Zaretskii wrote: > >> From: Alan Hayward >> CC: nd , Alan Hayward >> Date: Tue, 21 May 2019 09:08:01 +0000 >> >> Add missing documentation for the debugredirect setting. >> >> Add description and uses of gdb.in/gdb.cmd to the testsuite README. >> >> Mention this in the NEWS file. >> >> [Wasn't sure if testsuite changes belonged in NEWS? If not I can >> drop that part] >> --- >> gdb/NEWS | 11 +++++++++++ >> gdb/doc/gdb.texinfo | 3 +++ >> gdb/testsuite/README | 21 +++++++++++++++++++++ >> 3 files changed, 35 insertions(+) > > This is OK, but please also update the 2 ChangeLog files. Thanks. Pushed with the changeLogs. Full patch for reference: diff --git a/gdb/ChangeLog b/gdb/ChangeLog index a998c5c60d..52fc11d8f4 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2019-05-22 Alan Hayward + + * NEWS: Add debugredirect and testsuite sections. + 2019-05-22 Simon Cook * riscv-tdep.c (riscv_gdbarch_init): Support determining flen from diff --git a/gdb/NEWS b/gdb/NEWS index 1e92a2b52c..792548139e 100644 --- a/gdb/NEWS +++ b/gdb/NEWS @@ -46,6 +46,10 @@ show print max-depth The default max-depth is 20, but this can be set to unlimited to get the old behavior back. +set logging debugredirect [on|off] + By default, GDB debug output will go to both the terminal and the logfile. + Set if you want debug output to go only to the log file. + * New MI commands -complete @@ -53,6 +57,13 @@ show print max-depth were to be given as a command itself. This is intended for use by MI frontends in cases when separate CLI and MI channels cannot be used. +* Testsuite + + The testsuite now creates the files gdb.cmd (containing the arguments + used to launch GDB) and gdb.in (containing all the commands sent to + GDB) in the output directory for each test script. Multiple invocations + are appended with .1, .2, .3 etc. + *** Changes in GDB 8.3 * GDB and GDBserver now support access to additional registers on diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog index 9733b5b64b..c01ef292e9 100644 --- a/gdb/doc/ChangeLog +++ b/gdb/doc/ChangeLog @@ -1,3 +1,7 @@ +2019-05-22 Alan Hayward + + * gdb.texinfo (Shell Commands): Add debugredirect. + 2019-05-22 Jan Vrany * gdb.texinfo: Minor formatting fixes. diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo index e27752a9d6..3c4535ec50 100644 --- a/gdb/doc/gdb.texinfo +++ b/gdb/doc/gdb.texinfo @@ -1477,6 +1477,9 @@ you want @code{set logging on} to overwrite the logfile instead. @item set logging redirect [on|off] By default, @value{GDBN} output will go to both the terminal and the logfile. Set @code{redirect} if you want output to go only to the log file. +@item set logging debugredirect [on|off] +By default, @value{GDBN} debug output will go to both the terminal and the logfile. +Set @code{debugredirect} if you want debug output to go only to the log file. @kindex show logging @item show logging Show the current values of the logging settings. diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 4060eadfbd..867455f7a5 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2019-05-22 Alan Hayward + + * README (Re-running Tests Outside The Testsuite): New section. + 2019-05-21 Tom de Vries * gdb.arch/amd64-eval.exp: Require c++11. diff --git a/gdb/testsuite/README b/gdb/testsuite/README index b6487cf8c4..4795df1f75 100644 --- a/gdb/testsuite/README +++ b/gdb/testsuite/README @@ -95,6 +95,27 @@ example: The script will output its analysis report to the standard output. +Re-running Tests Outside The Testsuite +************************************** + +When running a test, the arguments used to run GDB are saved to gdb.cmd and +all commands sent to GDB are saved to gdb.in. As well as being a reference +of the commands run, they can be used to manually re-run a test by using +the gdb.in file as a batch file to a GDB launched with the arguments in the +gdb.cmd file, for example: + $(cat outputs/gdb.base/store/gdb.cmd) -x outputs/gdb.base/store/gdb.in + +Tests that run GDB multiple times will append .1, .2, .3 etc to the end +of each .cmd and .in file. + +When gdbserver is launched as part of a test, a gdbserver.cmd will be created. +To re-run these tests, run the contents of gdbserver.cmd in a separate +terminal before running gdb, for example: + $(cat outputs/gdb.base/store/gdbserver.cmd) +Alternatively, if the test is run with GDBSERVER_DEBUG="replay", then this +will create a gdbserver.replay file which can be used with the gdbreplay tool, +instead of launching gdbserver. + Running the Performance Tests *****************************