From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19149 invoked by alias); 10 May 2014 22:00:10 -0000 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org Received: (qmail 19049 invoked by uid 89); 10 May 2014 22:00:09 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.4 required=5.0 tests=BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,RCVD_NUMERIC_HELO,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS,T_FSL_HELO_BARE_IP_2 autolearn=no version=3.3.2 X-HELO: plane.gmane.org Received: from plane.gmane.org (HELO plane.gmane.org) (80.91.229.3) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Sat, 10 May 2014 22:00:08 +0000 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1WjFJM-0002md-GX for gdb@sourceware.org; Sun, 11 May 2014 00:00:04 +0200 Received: from 93.175.7.186 ([93.175.7.186]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 11 May 2014 00:00:04 +0200 Received: from rodinasophie by 93.175.7.186 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 11 May 2014 00:00:04 +0200 To: gdb@sourceware.org From: Sofia Subject: GDB breakpoint implementation for multithreaded programms Date: Sat, 10 May 2014 22:00:00 -0000 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit User-Agent: Loom/3.14 (http://gmane.org/) X-IsSubscribed: yes X-SW-Source: 2014-05/txt/msg00012.txt.bz2 I'm writing my GDB stub and trying to set breakpoints on different threads. When I don't ask GDB about the number of threads, It works fine as a single- threaded application and breakpoints are set correctly. But when I enter - 'info threads', something strange happens. Firstly, GDB reads the contents of all threads' registers(it's OK). Then I enter 'continue' and see that breakpoints are not set at all threads my program has. I don't understand why, but the packet Z0(breakpoint packet) is only sent to inactive thread. The documentation says that if the thread id is not specified, breakpoints will be set at all threads. What's wrong with this or where can I read about such GDB behavior?