[RFA 0/5] Explicit linespecs

Keith Seitz keiths@redhat.com
Fri Jul 27 03:45:00 GMT 2012


Hi,

For some time now, I've been toying with mi/13139, which is a feature 
request for "explicit linespecs" -- linespecs which bypass the linespec 
parser. This might provide some relief for very large applications where 
linespec can get egregiously slow.

To cut to the chase, they may be used by either CLI or MI right now. 
For the CLI, the generic syntax is:

-source XXX
-function XXX
-label XXX
-offset XXX
-address XXX

The option names may be truncated, e.g., "break -s XX -func YY".

One of the side effects of this patchset is that ALL linespecs (for 
breakpoints) are converted to explicit after parsing.

I've chosen to implement this as an extension to the breakpoint API. 
That is, I've added (yet another) parameter to create_breakpoint and 
several internal breakpoint functions.

This patch is split into five smaller patches:

1) els-refactor-linespec-parsing.patch : This patch may be applied 
independently of other patches. It refactors some code in linespec.c to 
facilitate sharing of code.

2) els-breakpoint-api.patch : This patch does all the mechanical work of 
adding the new explicit linespec parameter to the required breakpoint 
API functions and updates all callers. This patch is also a nop and may 
be applied independently of the others.

3) els-explicit-linespecs.patch : This is the patch where the real work 
of explicit linespecs is done, including CLI/MI lexing/parsing functions.

4) els-tests.patch : New test suite additions for the feature.

5) els-doc.patch : Documentation changes for the new feature.

While patches 1 & 2 may be applied independently, I am not advocating 
that approach. I consider this patchset all-or-nothing.

Patch #3 must be applied /after/ #2. While a bit inconvenient, I thought 
it nicer to separate the huge mechanical change in #2 from the real guts 
of the patch, which is #3. I apologize if this aggravates anyone.

I have tested the patchset on x86_64-linux native and native-gdbserver, 
and all patches are regression-free with --enable-targets=all.

Keith



More information about the Gdb-patches mailing list