From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id GTAGBLh121/TSwAAWB0awg (envelope-from ) for ; Thu, 17 Dec 2020 10:14:00 -0500 Received: by simark.ca (Postfix, from userid 112) id 032E91F0AA; Thu, 17 Dec 2020 10:14:00 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RDNS_NONE,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.2 Received: from sourceware.org (unknown [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 4E4351E965 for ; Thu, 17 Dec 2020 10:13:59 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id C4233388E807; Thu, 17 Dec 2020 15:13:58 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C4233388E807 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1608218038; bh=+5VLx6+ElDBPfIccUeuE8FEaRsU75DPQaTgyYfqhRKA=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=SLbyOCXtccsjQ7JhknPtJpuABM80jnIkdj3/TqZcA40YbLagP8WhFikOgsOH2O5vE UG6a4q0pPQ/6Ab2xHsdqJ+GFKHabO4nItMfue9Og5hf5+xFfdenyG6wqNrZqEd/7MJ 25BjXlVvDtmT/WS6EaIgk2sqjrlwoOQ6wRTTw588= Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by sourceware.org (Postfix) with ESMTPS id C54AD388E807 for ; Thu, 17 Dec 2020 15:13:54 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org C54AD388E807 IronPort-SDR: V4JyGMWMM6pkgSvaBiCVs2pf+iHAIRJ0NMjRkAhNOFqWs9wTjUwOHWyxOf97lf0qIR8Rkx1tC4 jnxBYF/ViDeQ== X-IronPort-AV: E=McAfee;i="6000,8403,9837"; a="175368639" X-IronPort-AV: E=Sophos;i="5.78,428,1599548400"; d="scan'208";a="175368639" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Dec 2020 07:13:49 -0800 IronPort-SDR: 21mLCHsq02netcnCsqKteYhRug/M0SkVHeEl9stjcriRURUtT5wwxhLXrpPFYdYazyHSNXeghS q19KhXXgEf/Q== X-IronPort-AV: E=Sophos;i="5.78,428,1599548400"; d="scan'208";a="369869341" Received: from labpc2407.iul.intel.com (HELO localhost) ([172.28.50.61]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Dec 2020 07:13:48 -0800 To: gdb-patches@sourceware.org Subject: [PATCH] gdb, record: rephrase the 'not recording' error message Date: Thu, 17 Dec 2020 16:12:08 +0100 Message-Id: <20201217151212.1179058-1-markus.t.metzger@intel.com> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Markus Metzger via Gdb-patches Reply-To: Markus Metzger Errors-To: gdb-patches-bounces@sourceware.org Sender: "Gdb-patches" When trying to use one of the record commands without having enabled recording first, GDB gives the error message: (gdb) record function-call-history No record target is currently active. Use one of the "target record-" commands first. In the record help, however, we say: (gdb) help record record, rec Start recording. List of record subcommands: record btrace, record b -- Start branch trace recording. record delete, record del, record d -- Delete the rest of execution log and start recording it anew. record full -- Start full execution recording. record function-call-history -- Prints the execution history at function granularity. record goto -- Restore the program to its state at instruction number N. record instruction-history -- Print disassembled instructions stored in the execution log. record save -- Save the execution log to a file. record stop, record s -- Stop the record/replay target. Change the above error message to (gdb) record function-call-history No recording is currently active. Use the "record full" or "record btrace" command first. to align with the help text. gdb/ChangeLog: 2020-12-03 Markus Metzger * record.c (require_record_target): Rephrase error message. (info_record_command): Likewise. gdb/testsuite/ChangeLog: 2020-12-03 Markus Metzger * gdb.btrace/enable.exp: Update error message. * gdb.btrace/multi-inferior.exp: Likewise. * gdb.btrace/reconnect.exp: Likewise. * gdb.python/py-record-btrace.exp: Likewise. * gdb.python/py-record-full.exp: Likewise. --- gdb/record.c | 6 +++--- gdb/testsuite/gdb.btrace/enable.exp | 10 +++++----- gdb/testsuite/gdb.btrace/multi-inferior.exp | 4 ++-- gdb/testsuite/gdb.btrace/reconnect.exp | 2 +- gdb/testsuite/gdb.python/py-record-btrace.exp | 2 +- gdb/testsuite/gdb.python/py-record-full.exp | 2 +- 6 files changed, 13 insertions(+), 13 deletions(-) diff --git a/gdb/record.c b/gdb/record.c index f9141192779..204bda0a424 100644 --- a/gdb/record.c +++ b/gdb/record.c @@ -74,8 +74,8 @@ require_record_target (void) t = find_record_target (); if (t == NULL) - error (_("No record target is currently active.\n" - "Use one of the \"target record-\" commands first.")); + error (_("No recording is currently active.\n" + "Use the \"record full\" or \"record btrace\" command first.")); return t; } @@ -325,7 +325,7 @@ info_record_command (const char *args, int from_tty) t = find_record_target (); if (t == NULL) { - printf_filtered (_("No record target is currently active.\n")); + printf_filtered (_("No recording is currently active.\n")); return; } diff --git a/gdb/testsuite/gdb.btrace/enable.exp b/gdb/testsuite/gdb.btrace/enable.exp index a968d410384..8ce1dab076f 100644 --- a/gdb/testsuite/gdb.btrace/enable.exp +++ b/gdb/testsuite/gdb.btrace/enable.exp @@ -27,15 +27,15 @@ gdb_exit gdb_start # record cannot be stopped, if it was never active -gdb_test "record stop" "No record target is currently active\\..*" "record stop without target" +gdb_test "record stop" "No recording is currently active\\..*" "record stop without target" # btrace cannot be enabled without a running inferior gdb_test "record btrace" "The program is not being run\\." "record btrace without running program" # no function and no instruction history without btrace enabled -gdb_test "record function-call-history" "No record target is currently active\\..*" "record function-call-history without target" -gdb_test "record instruction-history" "No record target is currently active\\..*" "record instruction-history without target" -gdb_test "info record" "No record target is currently active\\." "info record without target" +gdb_test "record function-call-history" "No recording is currently active\\..*" "record function-call-history without target" +gdb_test "record instruction-history" "No recording is currently active\\..*" "record instruction-history without target" +gdb_test "info record" "No recording is currently active\\." "info record without target" standard_testfile if [prepare_for_testing "failed to prepare" $testfile {} {debug}] { @@ -65,7 +65,7 @@ Recorded 0 instructions in 0 functions \\\(0 gaps\\\) for thread 1.*\\." "info r # stop btrace record gdb_test "record stop" "Process record is stopped and all execution logs are deleted\\." -gdb_test "record stop" "No record target is currently active\\..*" "record stop the second time" +gdb_test "record stop" "No recording is currently active\\..*" "record stop the second time" # enable btrace again gdb_test_no_output "record btrace" "record btrace re-enable" diff --git a/gdb/testsuite/gdb.btrace/multi-inferior.exp b/gdb/testsuite/gdb.btrace/multi-inferior.exp index fdf889f5ed8..23bc852c565 100644 --- a/gdb/testsuite/gdb.btrace/multi-inferior.exp +++ b/gdb/testsuite/gdb.btrace/multi-inferior.exp @@ -55,7 +55,7 @@ with_test_prefix "inferior 2" { with_test_prefix "inferior 1" { gdb_test "inferior 1" "Switching to inferior 1.*" - gdb_test "info record" "No record target is currently active\\." + gdb_test "info record" "No recording is currently active\\." gdb_test_no_output "record btrace" "record btrace" } @@ -69,6 +69,6 @@ with_test_prefix "inferior 3" { return -1 } - gdb_test "info record" "No record target is currently active\\." + gdb_test "info record" "No recording is currently active\\." gdb_test_no_output "record btrace" "record btrace" } diff --git a/gdb/testsuite/gdb.btrace/reconnect.exp b/gdb/testsuite/gdb.btrace/reconnect.exp index 26d04c38a9e..baec86f8aa3 100644 --- a/gdb/testsuite/gdb.btrace/reconnect.exp +++ b/gdb/testsuite/gdb.btrace/reconnect.exp @@ -81,5 +81,5 @@ with_test_prefix "second" { # Test that recording is now off. with_test_prefix "third" { - gdb_test "info record" "No record target is currently active." + gdb_test "info record" "No recording is currently active." } diff --git a/gdb/testsuite/gdb.python/py-record-btrace.exp b/gdb/testsuite/gdb.python/py-record-btrace.exp index bdfb2e3b125..3a84cbe7ac4 100644 --- a/gdb/testsuite/gdb.python/py-record-btrace.exp +++ b/gdb/testsuite/gdb.python/py-record-btrace.exp @@ -47,7 +47,7 @@ with_test_prefix "no or double record" { gdb_test "python gdb.start_recording(\"btrace\")" ".*gdb\.error: The process is already being recorded\..*" gdb_test_no_output "python gdb.stop_recording()" "first" - gdb_test "python gdb.stop_recording()" ".*gdb\.error: No record target is currently active\..*" "second" + gdb_test "python gdb.stop_recording()" ".*gdb\.error: No recording is currently active\..*" "second" } with_test_prefix "preopened record btrace" { diff --git a/gdb/testsuite/gdb.python/py-record-full.exp b/gdb/testsuite/gdb.python/py-record-full.exp index c823bc2c74c..a1f24a3634f 100644 --- a/gdb/testsuite/gdb.python/py-record-full.exp +++ b/gdb/testsuite/gdb.python/py-record-full.exp @@ -47,7 +47,7 @@ with_test_prefix "no or double record" { gdb_test "python gdb.start_recording(\"full\")" ".*gdb\.error: The process is already being recorded\..*" gdb_test_no_output "python gdb.stop_recording()" "first" - gdb_test "python gdb.stop_recording()" ".*gdb\.error: No record target is currently active\..*" "second" + gdb_test "python gdb.stop_recording()" ".*gdb\.error: No recording is currently active\..*" "second" } with_test_prefix "preopened record full" { -- 2.26.2 Intel Deutschland GmbH Registered Address: Am Campeon 10-12, 85579 Neubiberg, Germany Tel: +49 89 99 8853-0, www.intel.de Managing Directors: Christin Eisenschmid, Gary Kershaw Chairperson of the Supervisory Board: Nicole Lau Registered Office: Munich Commercial Register: Amtsgericht Muenchen HRB 186928