From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4968 invoked by alias); 18 Mar 2010 19:27:00 -0000 Received: (qmail 4949 invoked by uid 22791); 18 Mar 2010 19:26:59 -0000 X-SWARE-Spam-Status: No, hits=-2.2 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from aussmtpmrkpc120.us.dell.com (HELO aussmtpmrkpc120.us.dell.com) (143.166.82.159) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 18 Mar 2010 19:26:56 +0000 X-Loopcount0: from 12.110.134.31 Received: from unknown (HELO M31.equallogic.com) ([12.110.134.31]) by aussmtpmrkpc120.us.dell.com with SMTP; 18 Mar 2010 14:26:54 -0500 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Subject: Two threads hitting the same break Date: Thu, 18 Mar 2010 19:27:00 -0000 Message-ID: From: "Paul Koning" To: X-IsSubscribed: yes 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 X-SW-Source: 2010-03/txt/msg00145.txt.bz2 Gentlepeople, I'm running into a problem in trying to add threads support for NetBSD to GDB. The situation is a breakpoint set in a function that is called by multiple threads. One thread hits the break. It gets the signal, the process stops, GDB gets control, and sees what it expects. I then tell GDB to continue. It does a stepi, reinserts the break, and lets the process go. But the other thread has also hit the same breakpoint. That signal is delivered at the time I do the continue -- so at that point the break instruction isn't present. The result is that GDB sees this as a SIGTRAP at break address + 1 (this is on i386), and when I continue I get a segfault because the thread is continued in the middle of an instruction. I think I've seen discussion of this sort of issue, possibly in the code, but I'm not having much luck finding it. Any suggestions for the right way to handle this? paul