This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Disabling breakpoints does not work if rejected from remote stub
- From: "Sascha" <sascha at pasalacqua dot de>
- To: <gdb at sourceware dot org>
- Date: Tue, 27 Feb 2007 10:29:36 +0100
- Subject: Disabling breakpoints does not work if rejected from remote stub
Hi,
I guess the following problem is a bug, but I'm not sure:
I have a remote stub which only allows two breakpoints. If GDB tries to
insert another breakpoint the Z0 (yes, I only use Z0) packet will get
rejected with an error code.
So when I have three breakpoints...
1: 0x100000
2: 0x200000
3: 0x300000
The third will be rejected. GDB won't resume and report an error. That's ok.
Z0,0x10000.... OK
Z0,0x20000.... OK
Z0,0x30000.... REJECTED (ENN)
Alright. Removing ONE (no matter which) of the breakpoints will fix the
situation. If BP3 gets deleted GDB simply won't try to insert BP3 any more.
If BP1/BP2 gets deleted, GDB will remove this breakpoint (z0 packet) and
insert BP3 instead. GDB is able to resume now.
NOW THE PROBLEM:
Disabling a breakpoint does not have the same effect. If I disable BP3 GDB
simply won't try to insert BP3 any more (like before). But when I disable
BP1/BP2, GDB will still try to insert BP3 without removing BP1/BP2 first. So
even if all breakpoints except BP3 have been disabled, GDB will still try to
insert BP3 without removing the other (already inserted) breakpoints first.
GDB does not send the required z0 packets BEFORE trying the Z0 packet.
I had a look at breakpoints.c but I'm still not sure why this happens.
I'd appreciate any advice. Thanks.
Sascha