POSIX Semaphore under gdb

Michael Snyder Michael.Snyder@access-company.com
Thu Apr 12 17:58:00 GMT 2007


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?




More information about the Gdb mailing list