This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[RFA] [gdb.threads/testsuite] failure while checking backtrace into main
- From: Denis PILAT <denis dot pilat at st dot com>
- To: gdb-patches <gdb-patches at sourceware dot org>
- Date: Wed, 31 Jan 2007 17:13:28 +0100
- Subject: [RFA] [gdb.threads/testsuite] failure while checking backtrace into main
While checking for non-regression in the gdb.threads part of the
testsuite, I noticed one test fails with gcc4 since the argument of the
main are removed by the compiler so don't appear when printing backtrace:
FAIL: gdb.threads/pthreads.exp: check backtrace from main thread
Either we can change the .exp file to avoid checking these arguments, or
we can ensure compiler keeps them as proposed hereby.
--
Denis Pilat
STMicroelectronics
2007-01-31 Denis Pilat <denis.pilat@st.com>
* gdb.threads/pthreads.c: ensure argc and argv won't be removed by
a compiler optimization.
Index: testsuite/gdb.threads/pthreads.c
===================================================================
--- testsuite/gdb.threads/pthreads.c (revision 553)
+++ testsuite/gdb.threads/pthreads.c (working copy)
@@ -122,6 +122,8 @@ main(argc, argv)
void (*xxx) ();
pthread_attr_t attr;
+ if (argv);
+ j = argc;
if (verbose) printf ("pid = %d\n", getpid());
foo (1, 2, 3);