* Re: GDB 6.8.92 available for testing
[not found] ` <200910011836.n91IacEh027960@brahms.sibelius.xs4all.nl>
@ 2009-10-01 19:40 ` Joel Brobecker
0 siblings, 0 replies; 7+ messages in thread
From: Joel Brobecker @ 2009-10-01 19:40 UTC (permalink / raw)
To: Mark Kettenis; +Cc: ralf.corsepius, gdb-patches, jan.kratochvil, tromey
[-- Attachment #1: Type: text/plain, Size: 672 bytes --]
[switching to gcc-patches]
> Given that newer GCC versions get whinier and whinier and that we see
> false positives from time to time, I would be in favour of disabling
> -Werror for releases.
Makes sense to me. I've just committed the following patch on the branch,
after having re-built GDB on x86-linux, making sure that -Werror is no
longer used by default anymore. (this is the same patch than the one
I applied for GDB 6.6 by the way).
2009-10-01 Joel Brobecker <brobecker@adacore.com>
* configure.ac: Disable -Werror by default.
* configure: Regenerate.
I'll update my release procedure/scripts to do the same for future
releases.
--
Joel
[-- Attachment #2: werror.diff --]
[-- Type: text/x-diff, Size: 1200 bytes --]
Index: configure.ac
===================================================================
RCS file: /cvs/src/src/gdb/configure.ac,v
retrieving revision 1.106
diff -u -p -r1.106 configure.ac
--- configure.ac 10 Sep 2009 03:59:36 -0000 1.106
+++ configure.ac 1 Oct 2009 19:17:55 -0000
@@ -1510,11 +1510,6 @@ AC_ARG_ENABLE(werror,
*) AC_MSG_ERROR(bad value ${enableval} for --enable-werror) ;;
esac])
-# Enable -Werror by default when using gcc
-if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
- ERROR_ON_WARNING=yes
-fi
-
WERROR_CFLAGS=""
if test "${ERROR_ON_WARNING}" = yes ; then
WERROR_CFLAGS="-Werror"
Index: configure
===================================================================
RCS file: /cvs/src/src/gdb/configure,v
retrieving revision 1.288
diff -u -p -r1.288 configure
--- configure 10 Sep 2009 03:59:37 -0000 1.288
+++ configure 1 Oct 2009 19:17:59 -0000
@@ -13067,11 +13067,6 @@ if test "${enable_werror+set}" = set; th
fi
-# Enable -Werror by default when using gcc
-if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
- ERROR_ON_WARNING=yes
-fi
-
WERROR_CFLAGS=""
if test "${ERROR_ON_WARNING}" = yes ; then
WERROR_CFLAGS="-Werror"
^ permalink raw reply [flat|nested] 7+ messages in thread
* [RFA] more fixes to testsuite (was RE: GDB 6.8.92 available for testing)
[not found] ` <20091001172928.GE6532@adacore.com>
@ 2009-10-01 21:22 ` Pierre Muller
2009-10-01 21:28 ` Joel Brobecker
0 siblings, 1 reply; 7+ messages in thread
From: Pierre Muller @ 2009-10-01 21:22 UTC (permalink / raw)
To: 'Joel Brobecker'; +Cc: gdb, gdb-patches
I here request approval
for changes to the testsuite related to
problems on a configuration where
gcc emits format warnings by default.
> -----Message d'origine-----
> De : gdb-owner@sourceware.org [mailto:gdb-owner@sourceware.org] De la
> part de Joel Brobecker
> Envoyé : Thursday, October 01, 2009 7:29 PM
> À : Pierre Muller
> Cc : gdb@sourceware.org
> Objet : Re: GDB 6.8.92 available for testing
>
> > 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.
I used "%p" as suggested.
> 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
This was a bit more tricky, because
dlerror is a macro if __WIN32__
is defined,
I removed the macro and
separated the fprintf.
Is this OK?
Tested on gcc16, no changes in the results of these tests.
PS: the #ifdef __WIN32__
should probably be replaced by
something that is also defined for
64-bit windows, no?
2009-10-01 Pierre Muller <muller@ics.u-strasbg.fr>
* src/gdb/testsuite/gdb.base/shr1.c: Use %p in format string.
* src/gdb/testsuite/gdb.base/unload.c: Avoid warning in fprintf.
* src/gdb/testsuite/gdb.base/watchpoint-solib.c: Idem.
Index: src/gdb/testsuite/gdb.base/shr1.c
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/shr1.c,v
retrieving revision 1.1.1.2
diff -u -p -r1.1.1.2 shr1.c
--- src/gdb/testsuite/gdb.base/shr1.c 28 Jun 1999 16:04:00 -0000
1.1.1.2
+++ src/gdb/testsuite/gdb.base/shr1.c 1 Oct 2009 20:58:06 -0000
@@ -25,7 +25,7 @@ int x;
sg = 6.6;
sgi++;
sgs = 8;
- printf("address of sgs is 0x%x\n", &sgs);
+ printf("address of sgs is %p\n", &sgs);
return 2*x;
}
Index: src/gdb/testsuite/gdb.base/unload.c
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/unload.c,v
retrieving revision 1.9
diff -u -p -r1.9 unload.c
--- src/gdb/testsuite/gdb.base/unload.c 3 Jan 2009 05:58:03 -0000 1.9
+++ src/gdb/testsuite/gdb.base/unload.c 1 Oct 2009 20:58:06 -0000
@@ -27,7 +27,6 @@
# define dlsym(handle, func) GetProcAddress (handle, func)
#endif
#define dlclose(handle) FreeLibrary (handle)
-#define dlerror() "error %d occurred", GetLastError ()
#else
#include <dlfcn.h>
#endif
@@ -53,7 +52,11 @@ int main()
if (!unloadshr)
{
- fprintf (stderr, dlerror ());
+#ifdef __WIN32__
+ fprintf (stderr, "error %d occurred", GetLastError ());
+#else
+ fprintf (stderr, "%s", dlerror ());
+#endif
exit (1);
}
Index: src/gdb/testsuite/gdb.base/watchpoint-solib.c
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/watchpoint-solib.c,v
retrieving revision 1.2
diff -u -p -r1.2 watchpoint-solib.c
--- src/gdb/testsuite/gdb.base/watchpoint-solib.c 3 Jan 2009 05:58:03
-0000 1.2
+++ src/gdb/testsuite/gdb.base/watchpoint-solib.c 1 Oct 2009 20:58:06
-0000
@@ -27,7 +27,6 @@
# define dlsym(handle, func) GetProcAddress (handle, func)
#endif
#define dlclose(handle) FreeLibrary (handle)
-#define dlerror() "error %d occurred", GetLastError ()
#else
#include <dlfcn.h>
#endif
@@ -42,7 +41,11 @@ void open_shlib ()
if (!handle)
{
- fprintf (stderr, dlerror ());
+#ifdef __WIN32__
+ fprintf (stderr, "error %d occurred", GetLastError ());
+#else
+ fprintf (stderr, "%s", dlerror ());
+#endif
exit (1);
}
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [RFA] more fixes to testsuite (was RE: GDB 6.8.92 available for testing)
2009-10-01 21:22 ` [RFA] more fixes to testsuite (was RE: GDB 6.8.92 available for testing) Pierre Muller
@ 2009-10-01 21:28 ` Joel Brobecker
0 siblings, 0 replies; 7+ messages in thread
From: Joel Brobecker @ 2009-10-01 21:28 UTC (permalink / raw)
To: Pierre Muller; +Cc: gdb, gdb-patches
> PS: the #ifdef __WIN32__
> should probably be replaced by
> something that is also defined for
> 64-bit windows, no?
We're "lucky" in this case, because __WIN32__ happens to be defined
on Windows64.
> 2009-10-01 Pierre Muller <muller@ics.u-strasbg.fr>
>
> * src/gdb/testsuite/gdb.base/shr1.c: Use %p in format string.
> * src/gdb/testsuite/gdb.base/unload.c: Avoid warning in fprintf.
> * src/gdb/testsuite/gdb.base/watchpoint-solib.c: Idem.
I think it would have been simpler to defile a dlerror *function*
that returns a string, but this is fine too.
--
Joel
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: GDB 6.8.92 available for testing
[not found] ` <m3ske1st37.fsf@fleche.redhat.com>
@ 2009-10-02 17:26 ` Jan Kratochvil
2009-10-02 17:38 ` Fix --with-system-readline vs. readline-6.0+ - gdb-7.0? [Re: GDB 6.8.92 available for testing] Jan Kratochvil
0 siblings, 1 reply; 7+ messages in thread
From: Jan Kratochvil @ 2009-10-02 17:26 UTC (permalink / raw)
To: Tom Tromey
Cc: Ralf Corsepius, Andreas Schwab, Pierre Muller,
'Joel Brobecker',
gdb, gdb-patches
On Fri, 02 Oct 2009 17:39:40 +0200, Tom Tromey wrote:
> >>>>> "Jan" == Jan Kratochvil <jan.kratochvil@redhat.com> writes:
[...]
> Jan> [patch] Fix --with-system-readline vs. readline-6.0+
> Jan> http://sourceware.org/ml/gdb-patches/2009-07/msg00755.html
[...]
> This patch is ok.
Checked-in:
http://sourceware.org/ml/gdb-cvs/2009-10/msg00011.html
Thanks,
Jan
^ permalink raw reply [flat|nested] 7+ messages in thread
* Fix --with-system-readline vs. readline-6.0+ - gdb-7.0? [Re: GDB 6.8.92 available for testing]
2009-10-02 17:26 ` Jan Kratochvil
@ 2009-10-02 17:38 ` Jan Kratochvil
2009-10-02 17:49 ` Tom Tromey
2009-10-02 21:07 ` Joel Brobecker
0 siblings, 2 replies; 7+ messages in thread
From: Jan Kratochvil @ 2009-10-02 17:38 UTC (permalink / raw)
To: Joel Brobecker
Cc: Ralf Corsepius, Andreas Schwab, Pierre Muller, gdb-patches, Tom Tromey
On Fri, 02 Oct 2009 19:25:41 +0200, Jan Kratochvil wrote:
> On Fri, 02 Oct 2009 17:39:40 +0200, Tom Tromey wrote:
> > >>>>> "Jan" == Jan Kratochvil <jan.kratochvil@redhat.com> writes:
> [...]
> > Jan> [patch] Fix --with-system-readline vs. readline-6.0+
> > Jan> http://sourceware.org/ml/gdb-patches/2009-07/msg00755.html
> [...]
> > This patch is ok.
>
> Checked-in:
> http://sourceware.org/ml/gdb-cvs/2009-10/msg00011.html
Forgot to ask if it should go for gdb-7.0.
Jan
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Fix --with-system-readline vs. readline-6.0+ - gdb-7.0? [Re: GDB 6.8.92 available for testing]
2009-10-02 17:38 ` Fix --with-system-readline vs. readline-6.0+ - gdb-7.0? [Re: GDB 6.8.92 available for testing] Jan Kratochvil
@ 2009-10-02 17:49 ` Tom Tromey
2009-10-02 21:07 ` Joel Brobecker
1 sibling, 0 replies; 7+ messages in thread
From: Tom Tromey @ 2009-10-02 17:49 UTC (permalink / raw)
To: Jan Kratochvil
Cc: Joel Brobecker, Ralf Corsepius, Andreas Schwab, Pierre Muller,
gdb-patches
Jan> Forgot to ask if it should go for gdb-7.0.
I'll defer to Joel's judgment.
Tom
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Fix --with-system-readline vs. readline-6.0+ - gdb-7.0? [Re: GDB 6.8.92 available for testing]
2009-10-02 17:38 ` Fix --with-system-readline vs. readline-6.0+ - gdb-7.0? [Re: GDB 6.8.92 available for testing] Jan Kratochvil
2009-10-02 17:49 ` Tom Tromey
@ 2009-10-02 21:07 ` Joel Brobecker
1 sibling, 0 replies; 7+ messages in thread
From: Joel Brobecker @ 2009-10-02 21:07 UTC (permalink / raw)
To: Jan Kratochvil
Cc: Ralf Corsepius, Andreas Schwab, Pierre Muller, gdb-patches, Tom Tromey
> > > >>>>> "Jan" == Jan Kratochvil <jan.kratochvil@redhat.com> writes:
> > [...]
> > > Jan> [patch] Fix --with-system-readline vs. readline-6.0+
> > > Jan> http://sourceware.org/ml/gdb-patches/2009-07/msg00755.html
> > [...]
> > > This patch is ok.
> >
> > Checked-in:
> > http://sourceware.org/ml/gdb-cvs/2009-10/msg00011.html
>
> Forgot to ask if it should go for gdb-7.0.
As discussed with Tom on IRC, our understanding is that this is not
a critical bug, and therefore is not needed on the branch.
--
Joel
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2009-10-02 21:07 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20090930204828.GB31446@adacore.com>
[not found] ` <4AC41F44.1040502@rtems.org>
[not found] ` <20091001170744.GC6532@adacore.com>
[not found] ` <4AC4E4F6.5080500@rtems.org>
[not found] ` <200910011733.n91HXDnX007084@brahms.sibelius.xs4all.nl>
[not found] ` <20091001182740.GG6532@adacore.com>
[not found] ` <200910011836.n91IacEh027960@brahms.sibelius.xs4all.nl>
2009-10-01 19:40 ` GDB 6.8.92 available for testing Joel Brobecker
[not found] ` <m3ljjva3tl.fsf@hase.home>
[not found] ` <002e01ca427a$5f1363b0$1d3a2b10$@u-strasbg.fr>
[not found] ` <m3bpkra1vk.fsf@hase.home>
[not found] ` <4AC49C67.9080502@rtems.org>
[not found] ` <20091001130909.GA30858@host0.dyn.jankratochvil.net>
[not found] ` <m3ske1st37.fsf@fleche.redhat.com>
2009-10-02 17:26 ` Jan Kratochvil
2009-10-02 17:38 ` Fix --with-system-readline vs. readline-6.0+ - gdb-7.0? [Re: GDB 6.8.92 available for testing] Jan Kratochvil
2009-10-02 17:49 ` Tom Tromey
2009-10-02 21:07 ` Joel Brobecker
[not found] ` <004701ca428e$fa377c50$eea674f0$@u-strasbg.fr>
[not found] ` <20091001172928.GE6532@adacore.com>
2009-10-01 21:22 ` [RFA] more fixes to testsuite (was RE: GDB 6.8.92 available for testing) Pierre Muller
2009-10-01 21:28 ` Joel Brobecker
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox