* [committed][gdb/testsuite] Fix valgrind-infcall-2.exp without libc debug info
@ 2020-07-20 9:20 Tom de Vries
0 siblings, 0 replies; only message in thread
From: Tom de Vries @ 2020-07-20 9:20 UTC (permalink / raw)
To: gdb-patches
Hi,
When running test-case gdb.base/valgrind-infcall-2.exp on a system without
libc debug info installed, I run into:
...
(gdb) p printf ("bla")^M
'printf' has unknown return type; cast the call to its declared return type^M
(gdb) FAIL: gdb.base/valgrind-infcall-2.exp: do printf
...
Fix this by casting the result of the printf call to int.
Tested on x86_64-linux.
Committed to trunk.
Thanks,
- Tom
[gdb/testsuite] Fix valgrind-infcall-2.exp without libc debug info
gdb/testsuite/ChangeLog:
2020-07-20 Tom de Vries <tdevries@suse.de>
* gdb.base/valgrind-infcall-2.exp: Handle printf unknown return type.
---
gdb/testsuite/gdb.base/valgrind-infcall-2.exp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gdb/testsuite/gdb.base/valgrind-infcall-2.exp b/gdb/testsuite/gdb.base/valgrind-infcall-2.exp
index a3983f7564..9d0a6f56a6 100644
--- a/gdb/testsuite/gdb.base/valgrind-infcall-2.exp
+++ b/gdb/testsuite/gdb.base/valgrind-infcall-2.exp
@@ -60,7 +60,7 @@ gdb_test_multiple "bt 1" "do printf" {
# Thread status is VgTs_WaitSys
# '
# (gdb)
- gdb_test "p printf (\"bla\")" \
+ gdb_test "p (int)printf (\"bla\")" \
"can only be accepted if the thread is .*" \
$gdb_test_name
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-07-20 9:20 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-20 9:20 [committed][gdb/testsuite] Fix valgrind-infcall-2.exp without libc debug info Tom de Vries
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox