From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13864 invoked by alias); 18 Mar 2003 10:46:15 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 13602 invoked from network); 18 Mar 2003 10:46:10 -0000 Received: from unknown (HELO zigzag.lvk.cs.msu.su) (158.250.17.23) by sources.redhat.com with SMTP; 18 Mar 2003 10:46:10 -0000 Received: from localhost ([127.0.0.1] helo=zigzag) by zigzag.lvk.cs.msu.su with esmtp (Exim 3.35 #1 (Debian)) id 18vEak-0004oU-00 for ; Tue, 18 Mar 2003 13:45:10 +0300 Content-Type: text/plain; charset="us-ascii" From: "Nikita V. Youshchenko" To: gdb@sources.redhat.com Subject: A question about gcc and threads under Linux 2.4 Date: Tue, 18 Mar 2003 10:46:00 -0000 User-Agent: KMail/1.4.3 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-Id: <200303181345.10851@zigzag.cs.msu.su> X-SW-Source: 2003-03/txt/msg00271.txt.bz2 Hello. When debugging threaded programs with gdb, unexpected thread switches often happen. E.g. if another gdb step-by-step executes one thread, and another thread executes a system call, ofted gdb switches to than thread. Gdb documentation says that on some targets gdb supports "set scheduler-locking" command that can help to avoid this behaviuor. But seems that this is not supported under Linux. Is there any method to make debugging threads smarter under Linux? E.g. a kernel patch, another threading library, some patch to gdb, etc? If there are none, could someone assist me it implementing one? Thank you for your help. Please CC: me, I am not on the list.