aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorEnze Li <enze.li@hotmail.com>2022-12-08 15:35:47 +0100
committerTom de Vries <tdevries@suse.de>2022-12-08 15:35:47 +0100
commitc968f038619c319775d41b228c037e4c05ef97a3 (patch)
treed2bb904bbd05dc4e7b610844dd52e1912f46bd69 /gdb
parentdcb53d93eb0e773c5e63c1fdbc10ec19940e6e02 (diff)
downloadbinutils-c968f038619c319775d41b228c037e4c05ef97a3.zip
binutils-c968f038619c319775d41b228c037e4c05ef97a3.tar.gz
binutils-c968f038619c319775d41b228c037e4c05ef97a3.tar.bz2
gdb/testsuite: update a pattern in gdb_file_cmd
When building GDB with the following CFLAGS and CXXFLAGS as part of configure line: CFLAGS=-std=gnu11 CXXFLAGS=-std=gnu++11 Then run the selftest.exp, I see: ====== Running /home/lee/dev/binutils-gdb/gdb/testsuite/gdb.gdb/selftest.exp ... FAIL: gdb.gdb/selftest.exp: run until breakpoint at captured_main WARNING: Couldn't test self === gdb Summary === # of unexpected failures 1 /home/lee/dev/binutils-gdb/gdb/gdb version 13.0.50.20221206-git -nw -nx -iex "set height 0" -iex "set width 0" -data-directory /home/lee/dev/binutils-gdb/gdb/testsuite/../data-directory ====== It is the fact that when I use the previously mentioned CFLAGS and CXXFLAGS as part of the configuration line, the default value (-O2 -g) is overridden, then GDB has no debug information. When there's no debug information, GDB should not run the testcase in selftest.exp. The root cause of this FAIL is that the $gdb_file_cmd_debug_info didn't get the right value ("nodebug") during the gdb_file_cmd procedure. That's because in this commit, commit 3453e7e409f44a79ac6695589836edb8a49bfb08 Date: Sat May 19 11:25:20 2018 -0600 Clean up "Reading symbols" output It changed "no debugging..." to "No debugging..." which causes the above problem. This patch only updates the corresponding pattern to fix this issue. With this patch applied, I see: ====== Running /home/lee/dev/binutils-gdb/gdb/testsuite/gdb.gdb/selftest.exp ... === gdb Summary === # of untested testcases 1 /home/lee/dev/binutils-gdb/gdb/gdb version 13.0.50.20221206-git -nw -nx -iex "set height 0" -iex "set width 0" -data-directory /home/lee/dev/binutils-gdb/gdb/testsuite/../data-directory ====== Tested on x86_64-linux. Approved-By: Simon Marchi <simon.marchi@efficios.com>
Diffstat (limited to 'gdb')
-rw-r--r--gdb/testsuite/lib/gdb.exp2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index e4ce3c3..008f59b 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -2139,7 +2139,7 @@ proc gdb_file_cmd { arg } {
set gdb_file_cmd_debug_info "lzma"
return 0
}
- -re "(Reading symbols from.*no debugging symbols found.*$gdb_prompt $)" {
+ -re "(Reading symbols from.*No debugging symbols found.*$gdb_prompt $)" {
verbose "\t\tLoaded $arg into $GDB with no debugging symbols"
set gdb_file_cmd_msg $expect_out(1,string)
set gdb_file_cmd_debug_info "nodebug"