From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26242 invoked by alias); 30 Nov 2005 09:42:19 -0000 Received: (qmail 26235 invoked by uid 22791); 30 Nov 2005 09:42:18 -0000 X-Spam-Check-By: sourceware.org Received: from xproxy.gmail.com (HELO xproxy.gmail.com) (66.249.82.195) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 30 Nov 2005 09:42:17 +0000 Received: by xproxy.gmail.com with SMTP id r21so5871233wxc for ; Wed, 30 Nov 2005 01:42:15 -0800 (PST) Received: by 10.64.150.8 with SMTP id x8mr6203qbd; Wed, 30 Nov 2005 01:42:15 -0800 (PST) Received: by 10.64.151.12 with HTTP; Wed, 30 Nov 2005 01:42:15 -0800 (PST) Message-ID: Date: Wed, 30 Nov 2005 10:03:00 -0000 From: Daniel Juan To: gdb@sourceware.org Subject: posix semaphores not working under gdb MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2005-11/txt/msg00636.txt.bz2 Hi, I'm trying to debug a multithreaded application whith gdb ( using ddd gui) and it seems that posix semaphores (sem_wait, sem_post) are not working as expected when I run the app in the debugger. Basically, the application has two semaphorized threads: - an openGL drawing one, and a message processing one. (while drawing, it's not permitted to process, and vice versa). and it seems that, when I run the app whith the debugger, sometimes, the processing thread unlocks the semaphore (and starts processing)=20 while drawing is being done. I don't know what I'm doing wrong. Has someone experienced any similar issue? # gdb --version GNU gdb 6.3-debian # g++ --version g++ (GCC) 3.3.5 (Debian 1:3.3.5-13) # uname -roms Linux 2.6.11.7-mppe i686 GNU/Linux Thanks a lot. -- Daniel Juan Boned e-mail: daniel(dot)juan(at)gmail.com