From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29110 invoked by alias); 13 Sep 2004 09:32:26 -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 28397 invoked from network); 13 Sep 2004 09:32:18 -0000 Received: from unknown (HELO smtp.hispeed.ch) (62.2.95.247) by sourceware.org with SMTP; 13 Sep 2004 09:32:18 -0000 Received: from indel.ch (217-162-27-127.dclient.hispeed.ch [217.162.27.127]) by smtp.hispeed.ch (8.12.6/8.12.6/tornado-1.0) with SMTP id i8D9WHQq019260 for ; Mon, 13 Sep 2004 11:32:17 +0200 Received: from fabi.indel.ch [192.168.1.19] by indel.ch [127.0.0.1] with SMTP (MDaemon.v2.7.SP5.R) for ; Mon, 13 Sep 2004 11:31:02 +0200 Message-Id: <5.2.0.9.1.20040913112453.01d5d448@NT_SERVER> X-Sender: cenedese@NT_SERVER (Unverified) Date: Mon, 13 Sep 2004 09:32:00 -0000 To: gdb@sources.redhat.com From: Fabian Cenedese Subject: Re: Auto removing BPs on stop In-Reply-To: <20040910151834.GB2103@nevyn.them.org> References: <5.2.0.9.1.20040910135924.01d27220@NT_SERVER> <5.2.0.9.1.20040910135924.01d27220@NT_SERVER> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" X-MDaemon-Deliver-To: gdb@sources.redhat.com X-Return-Path: cenedese@indel.ch X-SW-Source: 2004-09/txt/msg00092.txt.bz2 >> Whenever the target stops gdb will remove all breakpoints from the target >> and set them again before stepping/continuing. What functionality in gdb >> depends on this? Backtrace? Breakpoint handling? >> In our multitasking system a thread can stop on a breakpoint while the >> others are still running, so the breakpoints are still useful and shouldn't >> be removed. > >GDB can't cope with this. GDB assumes that when it is told that the >inferior has "stopped", its state will not change, and all threads can >be examined. I know, that's the biggest obstacle in generally using gdb as debugger. So far we had our own debugger which "just" used gdb for symbol lookups and PC<->source resultions. I guess I need to stay that way for some (long) time. >> What would break in gdb if I just removed those calls to unset/re-set >> the breakpoints? I know that the setting is partly necessary as new >> breakpoints aren't yet set. > >I don't know. A lot of places may still read target memory without >using the routines that "remove" breakpoints from GDB's image of target >memory, for one thing; this is slowly being fixed. > >My goal is to stop the needless removing and reinserting some day, but >I don't think it will work yet. I hoped I could at least move the breakpoint/single-step stuff from our debugger to gdb as the routines in gdb are more advanced. I'll try some more... Thanks bye Fabi