From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18173 invoked by alias); 21 Mar 2007 02:34:39 -0000 Received: (qmail 18165 invoked by uid 22791); 21 Mar 2007 02:34:38 -0000 X-Spam-Check-By: sourceware.org Received: from misav06.sasknet.sk.ca (HELO misav06.sasknet.sk.ca) (142.165.20.170) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 21 Mar 2007 02:34:34 +0000 Received: from bgmpomr1.sasknet.sk.ca ([142.165.72.22]) by misav06 with InterScan Messaging Security Suite; Tue, 20 Mar 2007 20:34:32 -0600 Received: from babe.fig.org ([216.197.228.51]) by bgmpomr1.sasknet.sk.ca (SaskTel eMessaging Service) with ESMTPA id <0JF800J3EF5JP330@bgmpomr1.sasknet.sk.ca> for gdb@sourceware.org; Tue, 20 Mar 2007 20:34:32 -0600 (CST) Received: by babe.fig.org (Postfix, from userid 1017) id AA20A9C8013; Tue, 20 Mar 2007 20:34:31 -0600 (CST) Received: by babe.fig.org (tmda-sendmail, from uid 1017); Tue, 20 Mar 2007 20:34:31 -0600 (CST) Date: Wed, 21 Mar 2007 02:34:00 -0000 From: Michael FIG Subject: Re: debugging a program that uses SIGTRAP In-reply-to: <20070321021809.GA2523@caradoc.them.org> To: gdb@sourceware.org Message-id: <7qtzwfuxxk.fsf@babe.fig.org> MIME-version: 1.0 Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7BIT X-Delivery-Agent: TMDA/1.0.3 (Seattle Slew) References: <7qy7lruz89.fsf@babe.fig.org> <20070321021809.GA2523@caradoc.them.org> User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux) 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: 2007-03/txt/msg00241.txt.bz2 Thanks for the swift reply! Daniel Jacobowitz writes: > I don't see any good way to solve this. You've got two sets of > breakpoints and they're both going to stop GDB - it doesn't know which > ones you want and which you don't. Okay. I thought somehow GDB would pass SIGTRAP iff it knows it has not set a breakpoint on the current instruction pointer by scanning its list of breakpoints. > Even if you get past that point, your handler will now get called > every time GDB hits a breakpoint or single steps - single stepping > will probably be broken. Would the above suggestion be reasonable? I think it would behave nicer than what I have now, especially for my circumstance, since there isn't any overlap between the code I'm trying to debug and the code _it's_ trying to debug. If it does seem reasonable, I can look into creating a patch. I haven't gotten my hands dirty in GDB before. :) -- Michael FIG /\//\ http://fig.org/michael/ \//\/