From: Kevin Buettner <kevinb@redhat.com>
To: Thiago Jung Bauermann <thiago.bauermann@linaro.org>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH 1/2] gdb/testsuite: Add libc_has_debug_info require helper
Date: Sun, 21 Apr 2024 14:02:25 -0700 [thread overview]
Message-ID: <20240421140225.455d785f@f39-zbm-amd> (raw)
In-Reply-To: <20240421134406.2c6ac5af@f39-zbm-amd>
On Sun, 21 Apr 2024 13:44:06 -0700
Kevin Buettner <kevinb@redhat.com> wrote:
> On Sat, 20 Apr 2024 18:33:06 -0300
> Thiago Jung Bauermann <thiago.bauermann@linaro.org> wrote:
>
> > Factor the test for libc debug info out of gdb.base/relativedebug.exp to
> > a new procedure.
> >
> > Also, change the "info sharedlibrary" test to explicitly detect when
> > libc has debug info.
>
> LGTM.
>
> Approved-by: Kevin Buettner <kevinb@redhat.com>
Just found a problem... While attempting to test part 2 using clang:
make check RUNTESTFLAGS="CC_FOR_TARGET=clang" TESTS="gdb.base/memops-watchpoint.exp"
Then, in the log file:
get_compiler_info: clang-17-0-6
Executing on host: clang /mesquite2/sourceware-git/f39-review/bld/gdb/testsuite/temp/164548/libc_has_debug_info.c -fdiagnostics-color=never -Wno-unknown-warning-option -w -g -g -lm -o /mesquite2/sourceware-git/f39-review/bld/gdb/testsuite/temp/164548/libc_has_debug_info.x (timeout = 300)
builtin_spawn -ignore SIGHUP clang /mesquite2/sourceware-git/f39-review/bld/gdb/testsuite/temp/164548/libc_has_debug_info.c -fdiagnostics-color=never -Wno-unknown-warning-option -w -g -g -lm -o /mesquite2/sourceware-git/f39-review/bld/gdb/testsuite/temp/164548/libc_has_debug_info.x
/mesquite2/sourceware-git/f39-review/bld/gdb/testsuite/temp/164548/libc_has_debug_info.c:3:6: error: call to undeclared library function 'printf' with type 'int (const char *, ...)'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
3 | printf ("Hello, world!\n");
| ^
/mesquite2/sourceware-git/f39-review/bld/gdb/testsuite/temp/164548/libc_has_debug_info.c:3:6: note: include the header <stdio.h> or explicitly provide a declaration for 'printf'
1 error generated.
compiler exited with status 1
UNSUPPORTED: gdb.base/memops-watchpoint.exp: require failed: libc_has_debug_info (failed to compile test program)
My testing shows that things will work if you add the suggested #include to
the "set src" text.
Kevin
next prev parent reply other threads:[~2024-04-21 21:02 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-20 21:33 [PATCH 0/2] Add testcase for libc memory operations Thiago Jung Bauermann
2024-04-20 21:33 ` [PATCH 1/2] gdb/testsuite: Add libc_has_debug_info require helper Thiago Jung Bauermann
2024-04-21 20:44 ` Kevin Buettner
2024-04-21 21:02 ` Kevin Buettner [this message]
2024-04-22 0:05 ` Thiago Jung Bauermann
2024-04-20 21:33 ` [PATCH 2/2] gdb/testsuite: Add gdb.base/memops-watchpoint.exp Thiago Jung Bauermann
2024-04-21 21:20 ` Kevin Buettner
2024-04-22 0:24 ` Thiago Jung Bauermann
2024-04-22 18:40 ` Kevin Buettner
2024-04-23 1:20 ` Thiago Jung Bauermann
2024-04-22 23:04 ` Thiago Jung Bauermann
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=20240421140225.455d785f@f39-zbm-amd \
--to=kevinb@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=thiago.bauermann@linaro.org \
/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).