From: Tom de Vries <tdevries@suse.de>
To: Simon Marchi <simark@simark.ca>, Enze Li <enze.li@hotmail.com>,
gdb-patches@sourceware.org
Cc: enze.li@gmx.com
Subject: Re: [PATCH] gdb/testsuite: update a pattern in gdb_file_cmd
Date: Thu, 8 Dec 2022 15:36:18 +0100 [thread overview]
Message-ID: <11d7d42a-42e2-456a-a424-7739a8caf373@suse.de> (raw)
In-Reply-To: <6677a380-2760-64f8-5729-f8b7adce4c84@simark.ca>
On 12/7/22 16:01, Simon Marchi via Gdb-patches wrote:
> On 12/7/22 08:06, Enze Li via Gdb-patches wrote:
>> 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.
>> ---
>> gdb/testsuite/lib/gdb.exp | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
>> index e4ce3c30c2ff..008f59b9f30b 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"
>>
>> base-commit: 83f18e5ebe627163f744215d3760a8eaacee6ec1
>
> Thanks for the good explanation, I didn't know about all these things.
> LGTM:
>
> Approved-By: Simon Marchi <simon.marchi@efficios.com>
Hi,
I ended up needing this patch in trunk for another patch, so I've
applied it (after adding the approved-by tag).
Thanks again,
- Tom
next prev parent reply other threads:[~2022-12-08 14:36 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-07 13:06 Enze Li
2022-12-07 15:01 ` Simon Marchi
2022-12-08 14:36 ` Tom de Vries [this message]
2022-12-09 17:45 ` Tom Tromey
2022-12-13 14:28 ` Enze Li
2022-12-13 16:23 ` Tom Tromey
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=11d7d42a-42e2-456a-a424-7739a8caf373@suse.de \
--to=tdevries@suse.de \
--cc=enze.li@gmx.com \
--cc=enze.li@hotmail.com \
--cc=gdb-patches@sourceware.org \
--cc=simark@simark.ca \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).