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.
gdb/testsuite/ChangeLog:
2020-07-20 Tom de Vries <tdevries@suse.de>
* gdb.base/valgrind-infcall-2.exp: Handle printf unknown return type.
+2020-07-20 Tom de Vries <tdevries@suse.de>
+
+ * gdb.base/valgrind-infcall-2.exp: Handle printf unknown return type.
+
2020-07-20 Tom de Vries <tdevries@suse.de>
* gdb.threads/attach-slow-waitpid.exp: Bail out if gdb_start fails.
# 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
}