This is the mail archive of the gdb-patches@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: [PATCH] Removal of markup annotations


 > Well, it is not as easy for me to just parse the output without the
 > annotations. Since I am still going to use annotate=2 (we are not
 > depricating the whole thing, right?), then if you remove the breakpoints
 > markup I'll have to handle old GDB's that have the markup, and new GDB's
 > that don't.
 > 
 > This would be a serious pain.

Its not that hard to do.  You have to filter the annotations in any case.
Emacs in CVS works with --annotate=2 or --annotate=3.  Lisp is ideally suited
to this kind of thing, but I think it should be quite straightforward in C
too.  An association list stores a list of keys (the annotations) with an
associated value (a function to call).  There are no keys for the markup
annotations so it just ignores them.

 > I really only need 3 annotations out of the ones you are removing.
 > breakpoint-table (to set a state that breakpoints are coming), field 5
 > (which we could rename to breakpoint-at), and breakpoint-table-end (to
 > set a state that the breakpoints are over.
 > 
 > To make things even easier, there could simply be a -breakpoint-begin,
 > and a -breakpoint-end annotation, and those two annotations could mark
 > up around the breakpoint. Would this clean up the code in breakpoint.c at
 > all?

I don't think we should introduce new annotations.  Until now I've never
really looked at breakpoint.c.  I've just submitted this patch to make it less
likely that they all get removed when I'm not following the mailing list.

If no-one else is interested in their removal, I will just submit another
much smaller patch that removes the breakpoints-invalid and frames-invalid
from level 3, which AFAIK only Emacs uses.

Nick


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