This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Auto removing BPs on stop


On Fri, Sep 10, 2004 at 02:08:16PM +0200, Fabian Cenedese wrote:
> Hi
> 
> 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.

> 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.

-- 
Daniel Jacobowitz


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]