* [PATCH] gdb/testsuite: fix an issue that prevents selftest
@ 2022-12-04 14:18 Enze Li
2022-12-05 19:50 ` Simon Marchi
0 siblings, 1 reply; 3+ messages in thread
From: Enze Li @ 2022-12-04 14:18 UTC (permalink / raw)
To: gdb-patches; +Cc: enze.li
When running gdb.gdb/selftest.exp, I see the following warning,
...
(gdb) break captured_main
Breakpoint 1 at 0x4fdab2
(gdb) run -nw -nx -iex "set height 0" -iex "set width 0"
Starting program: /home/lee/dev/binutils-gdb/gdb/testsuite/outputs/gdb.gdb/selftest/xgdb -nw -nx -iex "set height 0" -iex "set width 0"
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Breakpoint 1, 0x0000555555a51ab2 in captured_main(void*) ()
(gdb) FAIL: gdb.gdb/selftest.exp: run until breakpoint at captured_main
WARNING: Couldn't test self
testcase /home/lee/dev/binutils-gdb/gdb/testsuite/gdb.gdb/selftest.exp completed in 1 seconds
...
Work around this by adding a dot and an asterisk in pattern instead of a
space.
Tested on x86_64-linux.
---
gdb/testsuite/lib/selftest-support.exp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/gdb/testsuite/lib/selftest-support.exp b/gdb/testsuite/lib/selftest-support.exp
index 3c270d88527d..7e5f5a2567d0 100644
--- a/gdb/testsuite/lib/selftest-support.exp
+++ b/gdb/testsuite/lib/selftest-support.exp
@@ -73,10 +73,10 @@ proc selftest_setup { executable function } {
set description "run until breakpoint at $function"
gdb_test_multiple "run $INTERNAL_GDBFLAGS" "$description" {
- -re "Starting program.*Breakpoint \[0-9\]+,.*$function \\(.*\\).* at .*main.c:.*$gdb_prompt $" {
+ -re "Starting program.*Breakpoint \[0-9\]+,.*$function.*\\(.*\\).* at .*main.c:.*$gdb_prompt $" {
pass "$description"
}
- -re "Starting program.*Breakpoint \[0-9\]+,.*$function \\(.*\\).*$gdb_prompt $" {
+ -re "Starting program.*Breakpoint \[0-9\]+,.*$function.*\\(.*\\).*$gdb_prompt $" {
xfail "$description (line numbers scrambled?)"
}
-re "vfork: No more processes.*$gdb_prompt $" {
base-commit: 13556f4057d37f510f77143a1632febcc5618d1f
--
2.30.2
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] gdb/testsuite: fix an issue that prevents selftest
2022-12-04 14:18 [PATCH] gdb/testsuite: fix an issue that prevents selftest Enze Li
@ 2022-12-05 19:50 ` Simon Marchi
2022-12-07 13:37 ` Enze Li
0 siblings, 1 reply; 3+ messages in thread
From: Simon Marchi @ 2022-12-05 19:50 UTC (permalink / raw)
To: Enze Li, gdb-patches; +Cc: enze.li
On 12/4/22 09:18, Enze Li via Gdb-patches wrote:
> When running gdb.gdb/selftest.exp, I see the following warning,
> ...
> (gdb) break captured_main
> Breakpoint 1 at 0x4fdab2
> (gdb) run -nw -nx -iex "set height 0" -iex "set width 0"
> Starting program: /home/lee/dev/binutils-gdb/gdb/testsuite/outputs/gdb.gdb/selftest/xgdb -nw -nx -iex "set height 0" -iex "set width 0"
> [Thread debugging using libthread_db enabled]
> Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
>
> Breakpoint 1, 0x0000555555a51ab2 in captured_main(void*) ()
> (gdb) FAIL: gdb.gdb/selftest.exp: run until breakpoint at captured_main
Doesn't this look like a bug to you? What is the extra `()` at the end
of the line?
Simon
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] gdb/testsuite: fix an issue that prevents selftest
2022-12-05 19:50 ` Simon Marchi
@ 2022-12-07 13:37 ` Enze Li
0 siblings, 0 replies; 3+ messages in thread
From: Enze Li @ 2022-12-07 13:37 UTC (permalink / raw)
To: Simon Marchi; +Cc: gdb-patches, enze.li
On Mon, Dec 05 2022 at 02:50:24 PM -0500, Simon Marchi wrote:
> On 12/4/22 09:18, Enze Li via Gdb-patches wrote:
>> When running gdb.gdb/selftest.exp, I see the following warning,
>> ...
>> (gdb) break captured_main
>> Breakpoint 1 at 0x4fdab2
>> (gdb) run -nw -nx -iex "set height 0" -iex "set width 0"
>> Starting program:
>> /home/lee/dev/binutils-gdb/gdb/testsuite/outputs/gdb.gdb/selftest/xgdb
>> -nw -nx -iex "set height 0" -iex "set width 0"
>> [Thread debugging using libthread_db enabled]
>> Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
>>
>> Breakpoint 1, 0x0000555555a51ab2 in captured_main(void*) ()
>> (gdb) FAIL: gdb.gdb/selftest.exp: run until breakpoint at captured_main
Hi Simon,
Thanks for your review.
>
> Doesn't this look like a bug to you? What is the extra `()` at the end
> of the line?
Hmmm...After digging into it further, I realized that this patch doesn't
fix the root cause; please drop this patch.
Before running the testcase, I used CXXFLAGS="-std=gnu++11" to compile
GDB, which overrides the default "-O2 -g", and directly causes the
compiled GDB to have no debug information. I think this may have caused
the problem. Is that what it is?
The extra `()` is supposed to show the arguments, but since it does not
have debugging information, it is empty here.
I sent a new patch to the list to fix the root cause, you might want to
have a look. :)
Best Regards,
Enze
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-12-07 13:38 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-04 14:18 [PATCH] gdb/testsuite: fix an issue that prevents selftest Enze Li
2022-12-05 19:50 ` Simon Marchi
2022-12-07 13:37 ` Enze Li
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).