Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [RFA] [gdb.threads/testsuite] failure while checking backtrace into main
@ 2007-01-31 19:36 Denis PILAT
  2007-02-02 14:28 ` Denis PILAT
  0 siblings, 1 reply; 5+ messages in thread
From: Denis PILAT @ 2007-01-31 19:36 UTC (permalink / raw)
  To: gdb-patches

[-- Attachment #1: Type: text/plain, Size: 443 bytes --]

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

[-- Attachment #2: pthreads.c.patch --]
[-- Type: text/plain, Size: 532 bytes --]

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);

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2007-02-03  1:35 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-01-31 19:36 [RFA] [gdb.threads/testsuite] failure while checking backtrace into main Denis PILAT
2007-02-02 14:28 ` Denis PILAT
2007-02-02 14:36   ` Daniel Jacobowitz
2007-02-02 15:18     ` Denis PILAT
2007-02-03  1:35       ` Daniel Jacobowitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox