[TCWG CI] Regression caused by gdb: [gdb/cli] Improve show logging output: commit 45aec4e5ed84b69bcdedaed1024edf62bf96f138 Author: Tom de Vries [gdb/cli] Improve show logging output Results regressed to # reset_artifacts: -10 # true: 0 # build_abe binutils: 1 # build_abe stage1: 2 # build_abe linux: 3 # build_abe glibc: 4 # build_abe stage2: 5 # First few build errors in logs: # 00:01:21 ../../../../../../gdb/gdbsupport/gdb_locale.h:28:28: error: cannot convert ‘char*’ to ‘ui_file*’ # 00:01:21 ../../../../../../gdb/gdbsupport/gdb_locale.h:28:28: error: cannot convert ‘char*’ to ‘ui_file*’ # 00:01:22 make[1]: *** [Makefile:1652: cli/cli-logging.o] Error 1 # 00:01:23 make: *** [Makefile:11723: all-gdb] Error 2 from # reset_artifacts: -10 # true: 0 # build_abe binutils: 1 # build_abe stage1: 2 # build_abe linux: 3 # build_abe glibc: 4 # build_abe stage2: 5 # build_abe gdb: 6 # build_abe qemu: 7 THIS IS THE END OF INTERESTING STUFF. BELOW ARE LINKS TO BUILDS, REPRODUCTION INSTRUCTIONS, AND THE RAW COMMIT. This commit has regressed these CI configurations: - tcwg_gnu_cross_build/master-aarch64 First_bad build: https://ci.linaro.org/job/tcwg_gnu_cross_build-bisect-master-aarch64/16/artifact/artifacts/build-45aec4e5ed84b69bcdedaed1024edf62bf96f138/ Last_good build: https://ci.linaro.org/job/tcwg_gnu_cross_build-bisect-master-aarch64/16/artifact/artifacts/build-23bb7876f0d69a6f7c0356d7e557774b829a93dc/ Baseline build: https://ci.linaro.org/job/tcwg_gnu_cross_build-bisect-master-aarch64/16/artifact/artifacts/build-baseline/ Even more details: https://ci.linaro.org/job/tcwg_gnu_cross_build-bisect-master-aarch64/16/artifact/artifacts/ Reproduce builds: mkdir investigate-gdb-45aec4e5ed84b69bcdedaed1024edf62bf96f138 cd investigate-gdb-45aec4e5ed84b69bcdedaed1024edf62bf96f138 # Fetch scripts git clone https://git.linaro.org/toolchain/jenkins-scripts # Fetch manifests and test.sh script mkdir -p artifacts/manifests curl -o artifacts/manifests/build-baseline.sh https://ci.linaro.org/job/tcwg_gnu_cross_build-bisect-master-aarch64/16/artifact/artifacts/manifests/build-baseline.sh --fail curl -o artifacts/manifests/build-parameters.sh https://ci.linaro.org/job/tcwg_gnu_cross_build-bisect-master-aarch64/16/artifact/artifacts/manifests/build-parameters.sh --fail curl -o artifacts/test.sh https://ci.linaro.org/job/tcwg_gnu_cross_build-bisect-master-aarch64/16/artifact/artifacts/test.sh --fail chmod +x artifacts/test.sh # Reproduce the baseline build (build all pre-requisites) ./jenkins-scripts/tcwg_gnu-build.sh @@ artifacts/manifests/build-baseline.sh # Save baseline build state (which is then restored in artifacts/test.sh) mkdir -p ./bisect rsync -a --del --delete-excluded --exclude /bisect/ --exclude /artifacts/ --exclude /gdb/ ./ ./bisect/baseline/ cd gdb # Reproduce first_bad build git checkout --detach 45aec4e5ed84b69bcdedaed1024edf62bf96f138 ../artifacts/test.sh # Reproduce last_good build git checkout --detach 23bb7876f0d69a6f7c0356d7e557774b829a93dc ../artifacts/test.sh cd .. Full commit (up to 1000 lines): commit 45aec4e5ed84b69bcdedaed1024edf62bf96f138 Author: Tom de Vries Date: Mon Jan 3 23:59:30 2022 +0100 [gdb/cli] Improve show logging output Before commit 3b6acaee895 "Update more calls to add_prefix_cmd" we had the following output for "show logging": ... $ gdb -q -batch -ex "set trace-commands on" \ -ex "set logging off" \ -ex "show logging" \ -ex "set logging on" \ -ex "show logging" +set logging off +show logging Future logs will be written to gdb.txt. Logs will be appended to the log file. Output will be logged and displayed. Debug output will be logged and displayed. +set logging on +show logging Currently logging to "gdb.txt". Logs will be appended to the log file. Output will be logged and displayed. Debug output will be logged and displayed. ... After that commit we have instead: ... +set logging off +show logging debugredirect: The logging output mode is off. file: The current logfile is "gdb.txt". overwrite: Whether logging overwrites or appends to the log file is off. redirect: The logging output mode is off. +set logging on +show logging debugredirect: The logging output mode is off. file: The current logfile is "gdb.txt". overwrite: Whether logging overwrites or appends to the log file is off. redirect: The logging output mode is off. ... which gives less clear output for some subcommands. OTOH, it's explicit about whether boolean values are on or off. The new text seems to have been chosen to match the set/show help texts: ... (gdb) help show logging Show logging options. List of show logging subcommands: show logging debugredirect -- Show the logging debug output mode. show logging file -- Show the current logfile. show logging overwrite -- \ Show whether logging overwrites or appends to the log file. show logging redirect -- Show the logging output mode. ... Make the show logging messages more clear, while still keep the boolean values explicit, such that we have: ... $ ./gdb.sh -q -batch -ex "show logging" logging debugredirect: off: \ Debug output will go to both the screen and the log file. logging enabled: off: Logging is disabled. logging file: The current logfile is "gdb.txt". logging overwrite: off: Logging appends to the log file. logging redirect: off: Output will go to both the screen and the log file. ... Tested on x86_64-linux. --- gdb/cli/cli-logging.c | 34 ++++++++++++++++++++++++++-------- 1 file changed, 26 insertions(+), 8 deletions(-) diff --git a/gdb/cli/cli-logging.c b/gdb/cli/cli-logging.c index d659a0dc2ef..193a87331db 100644 --- a/gdb/cli/cli-logging.c +++ b/gdb/cli/cli-logging.c @@ -56,10 +56,10 @@ static void show_logging_overwrite (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, - _("Whether logging overwrites or " - "appends to the log file is %s.\n"), - value); + if (logging_overwrite) + fprintf_filtered (file, _("on: Logging overwrites the log file.\n")); + else + fprintf_filtered (file, _("off: Logging appends to the log file.\n")); } /* Value as configured by the user. */ @@ -77,7 +77,25 @@ static void show_logging_redirect (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, _("The logging output mode is %s.\n"), value); + if (logging_redirect) + fprintf_filtered(file, _("on: Output will go only to the log file.\n")); + else + fprintf_filtered + (file, + _("off: Output will go to both the screen and the log file.\n")); +} + +static void +show_logging_debug_redirect (struct ui_file *file, int from_tty, + struct cmd_list_element *c, const char *value) +{ + if (debug_redirect) + fprintf_filtered(file, + _("on: Debug output will go only to the log file.\n")); + else + fprintf_filtered + (file, + _("off: Debug output will go to both the screen and the log file.\n")); } /* If we've pushed output files, close them and pop them. */ @@ -181,9 +199,9 @@ show_logging_enabled (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { if (logging_enabled) - fprintf_filtered (file, _("Logging is enabled.\n")); + fprintf_unfiltered (_("on: Logging is enabled.\n")); else - fprintf_filtered (file, _("Logging is disabled.\n")); + fprintf_unfiltered (_("off: Logging is disabled.\n")); } void _initialize_cli_logging (); @@ -226,7 +244,7 @@ Show the logging debug output mode."), _("\ If debug redirect is off, debug will go to both the screen and the log file.\n\ If debug redirect is on, debug will go only to the log file."), set_logging_redirect, - show_logging_redirect, + show_logging_debug_redirect, &set_logging_cmdlist, &show_logging_cmdlist); /* Set/show logging file. */ >From hjl@sc.intel.com Tue Jan 4 08:59:21 2022 Return-Path: X-Original-To: gcc-regression@gcc.gnu.org Delivered-To: gcc-regression@gcc.gnu.org Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by sourceware.org (Postfix) with ESMTPS id 22A48385840E for ; Tue, 4 Jan 2022 08:59:20 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 22A48385840E X-IronPort-AV: E=McAfee;i="6200,9189,10216"; a="266452514" X-IronPort-AV: E=Sophos;i="5.88,260,1635231600"; d="scan'208";a="266452514" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Jan 2022 00:59:17 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,260,1635231600"; d="scan'208";a="590614871" Received: from scymds02.sc.intel.com ([10.82.73.244]) by fmsmga004.fm.intel.com with ESMTP; 04 Jan 2022 00:59:17 -0800 Received: from gnu-34.sc.intel.com (gnu-34.sc.intel.com [172.25.70.212]) by scymds02.sc.intel.com with ESMTP id 2048xHb8001009; Tue, 4 Jan 2022 00:59:17 -0800 Received: by gnu-34.sc.intel.com (Postfix, from userid 1000) id 806D06487E; Tue, 4 Jan 2022 00:59:17 -0800 (PST) Date: Tue, 04 Jan 2022 00:59:17 -0800 To: skpgkp2@gmail.com, hjl.tools@gmail.com, gcc-regression@gcc.gnu.org Subject: Regressions on releases/gcc-11 at commit r11-9431 vs commit r11-9420 on Linux/x86_64 User-Agent: Heirloom mailx 12.5 7/5/10 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-Id: <20220104085917.806D06487E@gnu-34.sc.intel.com> From: "H.J. Lu" X-Spam-Status: No, score=-3466.2 required=5.0 testsºYES_00, KAM_DMARC_STATUS, KAM_LAZY_DOMAIN_SECURITY, KAM_NUMSUBJECT, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-regression@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-regression mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Jan 2022 08:59:21 -0000 New failures: FAIL: gcc.dg/guality/pr36728-4.c -O2 -flto -fuse-linker-plugin -fno-fat-lto-objects -DPREVENT_OPTIMIZATION line 14 y == 2 FAIL: gcc.dg/guality/pr36728-4.c -O2 -flto -fuse-linker-plugin -fno-fat-lto-objects -DPREVENT_OPTIMIZATION line 16 y == 2 FAIL: gcc.dg/guality/pr36728-4.c -O3 -g -DPREVENT_OPTIMIZATION line 16 y == 2 New passes: