This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [RFA] breakpoints.c clear_command fix
- From: "Martin M. Hunt" <hunt at redhat dot com>
- To: Michael Snyder <msnyder at redhat dot com>
- Cc: gdb-patches at sources dot redhat dot com, eliz at is dot elta dot co dot il
- Date: Mon, 8 Apr 2002 12:23:59 -0700
- Subject: Re: [RFA] breakpoints.c clear_command fix
- Organization: Red Hat Inc
- References: <200203270001.g2R01sJ08019@localhost.localdomain> <3CAE5578.10B51383@redhat.com>
On Friday 05 April 2002 05:55 pm, Michael Snyder wrote:
> "Martin M. Hunt" wrote:
> > The clear command improperly detects overlays and fails
> > to clear breakpoints if overlays are not disabled.
> >
> > Tested with linux-x-mips (overlays enabled) and linux x86 native.
>
> Martin, you really made me think with this one. Sorry it took so long.
> I had to go back eleven years in the code base to understand what this
> code was trying to do -- which made me realize that it's painfully
> obsolete. It has two inner loops with identical control conditions
> (except that they've gotten out of sync), just because they didn't
> have ALL_BREAKPOINTS_SAFE when this code was written.
I was wondering why the two seperate loops. I didn't understand the comments
so I made the minimum changes that seemed logical.
> So I rewrote the whole damn function. ;-)
Great!
It looks fine and it passes all my test cases. Thanks.
--
Martin Hunt
GDB Engineer
Red Hat, Inc.