This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: GDB 6.8.92 available for testing
- From: Joel Brobecker <brobecker at adacore dot com>
- To: Pierre Muller <muller at ics dot u-strasbg dot fr>
- Cc: gdb at sourceware dot org
- Date: Thu, 1 Oct 2009 10:29:28 -0700
- Subject: Re: GDB 6.8.92 available for testing
- References: <20090930204828.GB31446@adacore.com> <004701ca428e$fa377c50$eea674f0$@u-strasbg.fr>
> 3) gdb.base/shr1.c (wrong format arg type)
> 3) is about an address, but "%p" does not seem to be supported by all
> C lib format implementation, so I don't know if this can be fixed correctly.
We already use %p in a couple of testcase, so let's use it again here.
Best to avoid printing stuff on stdout/stderr when writing a testcase,
as we don't always have access to the inferior output (for instance,
when doing remote debugging), so matching the inferior output in the
testcase won't work in those case. But we'd have to dig deeper in
the history of this testcase to determine whether removing the printf
would not impact the effectiveness of the testcase.
For now, I vote for a group hug and the use of %p.
> 4) gdb.base/unload.c (format arg not literal)
> 5) gdb.base/watchpoint-solib.c (format arg not literal)
> 4) and 5) seem more difficult ...
Is that the source of the problem?
fprintf (stderr, dlerror ());
The following should take care of it:
fprintf (stderr, "%s", dlerror ())
--
Joel