This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch] Fix watch_thread_num testcase for ppc32
- From: Luis Machado <luisgpm at linux dot vnet dot ibm dot com>
- To: Joel Brobecker <brobecker at adacore dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Wed, 09 Jan 2008 07:38:19 -0200
- Subject: Re: [patch] Fix watch_thread_num testcase for ppc32
- References: <1199849652.22083.20.camel@gargoyle> <20080109041508.GA21281@adacore.com>
- Reply-to: luisgpm at linux dot vnet dot ibm dot com
On Tue, 2008-01-08 at 20:15 -0800, Joel Brobecker wrote:
> > The watch_thread_num.exp testcase was timing out on a number of
> > iterations for PPC32, while giving a full pass for PPC64. Removing the
> > usleep(1) call fixed the problem. It gives full passes for both PPC
> > 32/64.
>
> Would you mind sending the log files when it times out? I don't
> understand why removing the usleep fixes the problem. I'm a bit
> concerned with removing this delay because the thread would then
> be free to eat up all the CPU, and the test is creating quite a
> number of them...
>
> Thanks,
The test will create a max of five threads, that will keep updating a
shared variable.
The reason why it times out is not really clear, i'm still
investigating. When you hit continue in 32-bit, GDB seems to stand there
doing something. It occurs from time to time. Sometimes it will stop due
to the watchpoint, sometimes it will "lock". When you hit ctrl-C, it's
clear that GDB is still executing the "nanosleep" function. That's what
pointed me to usleep().
Regards,
--
Luis Machado
Software Engineer
IBM Linux Technology Center