This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: POSIX Semaphore under gdb
- From: Michael Snyder <Michael dot Snyder at access-company dot com>
- To: jigisha at spectross dot com
- Cc: gnu at gnu dot org, gdb at sourceware dot org
- Date: Thu, 12 Apr 2007 10:58:20 -0700
- Subject: Re: POSIX Semaphore under gdb
- References: <33188.59.176.11.27.1176364997.squirrel@spectross.com>
On Thu, 2007-04-12 at 03:03 -0500, jigisha@spectross.com wrote:
> Hi,
>
> I am trying to debug a multithreaded prog in DDD and facing unexpected
> behaviour of semaphores.
>
> When i run my prog(without DDD) it runs normally but when i run it with
> DDD it gets all sempahores posted intially.
>
> I am intialising all semaphored by sem_init to 0.
>
> Please suggest something
I don't have anything specific for you, but debugging with gdb
will always have some effect on scheduling. I have no idea what
DDD will add to the picture.
Why don't you try simplifying the equation by removing DDD,
and see what happens if you just debug under gdb directly?