This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
[rfc/breakpoint] breakpoint_1() re-structure
- To: GDB Discussion <gdb at sources dot redhat dot com>
- Subject: [rfc/breakpoint] breakpoint_1() re-structure
- From: Andrew Cagney <ac131313 at cygnus dot com>
- Date: Wed, 13 Jun 2001 16:20:47 -0400
Hello,
As part of finalizing MI I need to restructure the function
breakpoints.c:breakpoint_1().
At present it looks roughly like:
open table
for breakpoints do
if !printable breakpoint
continue
if first printable breakpoint
print table header
print breakpoint
if no printable breakpoints
do some stuff
close breakpoint
I'd like to change it to be roughly:
for breakpoints do
if printable
number of breakpoints ++
open table (number of breakpoints)
print table header (where needed)
for breakpoints do
if printable
print breakpoint
close breakpoint table
This means that the code gains an extra for loop (O(2N) instead of
O(N)). I can't see that being a problem, however, I'd like to first be
certain no one is going to raise an eyebrow.
Andrew