Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [RFA 0/5] Explicit linespecs
@ 2012-07-27  3:45 Keith Seitz
  2012-07-27 11:03 ` Eli Zaretskii
  0 siblings, 1 reply; 5+ messages in thread
From: Keith Seitz @ 2012-07-27  3:45 UTC (permalink / raw)
  To: gdb-patches@sourceware.org ml

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


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [RFA 0/5] Explicit linespecs
  2012-07-27  3:45 [RFA 0/5] Explicit linespecs Keith Seitz
@ 2012-07-27 11:03 ` Eli Zaretskii
  2012-07-29 18:51   ` Keith Seitz
  0 siblings, 1 reply; 5+ messages in thread
From: Eli Zaretskii @ 2012-07-27 11:03 UTC (permalink / raw)
  To: Keith Seitz; +Cc: gdb-patches

> Date: Thu, 26 Jul 2012 20:45:19 -0700
> From: Keith Seitz <keiths@redhat.com>
> 
> 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

What exactly does the "offset" option do?  Is it a line offset, or is
it measured in other units?  If it's a line offset, then why not call
it "-line"?  If "offset" means it's a relative line offset, then what
is it relative to?

(I've read the documentation patch, but these questions don't seem to
be answered there, either.)

Also, the above doesn't seem to cover the magical '*function' location
spec.

Thanks.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [RFA 0/5] Explicit linespecs
  2012-07-27 11:03 ` Eli Zaretskii
@ 2012-07-29 18:51   ` Keith Seitz
  2012-07-29 19:36     ` Eli Zaretskii
  2012-08-01 10:14     ` Pedro Alves
  0 siblings, 2 replies; 5+ messages in thread
From: Keith Seitz @ 2012-07-29 18:51 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: gdb-patches

On 07/27/2012 04:03 AM, Eli Zaretskii wrote:

> What exactly does the "offset" option do?  Is it a line offset, or is
> it measured in other units?  If it's a line offset, then why not call
> it "-line"?  If "offset" means it's a relative line offset, then what
> is it relative to?

It is completely analogous to the linespec parser. It could be an 
absolute line number (if -source given) or relative (if 
-function/-label). [Note that function/label relative offsets have not 
been implemented yet -- right now they are simply ignored (per 
maintainers request).]

I can certainly rename the option to be more user-friendly. I just used 
the same terminology that is used inside the parser.

> Also, the above doesn't seem to cover the magical '*function' location
> spec.

That's the -address option.

Keith


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [RFA 0/5] Explicit linespecs
  2012-07-29 18:51   ` Keith Seitz
@ 2012-07-29 19:36     ` Eli Zaretskii
  2012-08-01 10:14     ` Pedro Alves
  1 sibling, 0 replies; 5+ messages in thread
From: Eli Zaretskii @ 2012-07-29 19:36 UTC (permalink / raw)
  To: Keith Seitz; +Cc: gdb-patches

> Date: Sun, 29 Jul 2012 11:50:43 -0700
> From: Keith Seitz <keiths@redhat.com>
> CC: gdb-patches@sourceware.org
> 
> On 07/27/2012 04:03 AM, Eli Zaretskii wrote:
> 
> > What exactly does the "offset" option do?  Is it a line offset, or is
> > it measured in other units?  If it's a line offset, then why not call
> > it "-line"?  If "offset" means it's a relative line offset, then what
> > is it relative to?
> 
> It is completely analogous to the linespec parser. It could be an 
> absolute line number (if -source given) or relative (if 
> -function/-label).

We need to explain all that in the manual.  It is completely
non-obvious.

> I can certainly rename the option to be more user-friendly.

IMO, we should indeed rename it.

> > Also, the above doesn't seem to cover the magical '*function' location
> > spec.
> 
> That's the -address option.

This should also be explained.  "Valid code address" certainly does
not hint of it.

Thanks.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [RFA 0/5] Explicit linespecs
  2012-07-29 18:51   ` Keith Seitz
  2012-07-29 19:36     ` Eli Zaretskii
@ 2012-08-01 10:14     ` Pedro Alves
  1 sibling, 0 replies; 5+ messages in thread
From: Pedro Alves @ 2012-08-01 10:14 UTC (permalink / raw)
  To: Keith Seitz; +Cc: Eli Zaretskii, gdb-patches

On 07/29/2012 07:50 PM, Keith Seitz wrote:
> On 07/27/2012 04:03 AM, Eli Zaretskii wrote:
> 
>> What exactly does the "offset" option do?  Is it a line offset, or is
>> it measured in other units?  If it's a line offset, then why not call
>> it "-line"?  If "offset" means it's a relative line offset, then what
>> is it relative to?
> 
> It is completely analogous to the linespec parser. It could be an absolute line number (if -source given) or relative (if -function/-label). [Note that function/label relative offsets have not been implemented yet -- right now they are simply ignored (per maintainers request).]


ENOEXAMPLES :-)

It might be good to check what other debuggers spell these options.

> 
> I can certainly rename the option to be more user-friendly. I just used the same terminology that is used inside the parser.
> 
>> Also, the above doesn't seem to cover the magical '*function' location
>> spec.
> 
> That's the -address option.
> 
> Keith

-- 
Pedro Alves


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-08-01 10:14 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-27  3:45 [RFA 0/5] Explicit linespecs Keith Seitz
2012-07-27 11:03 ` Eli Zaretskii
2012-07-29 18:51   ` Keith Seitz
2012-07-29 19:36     ` Eli Zaretskii
2012-08-01 10:14     ` Pedro Alves

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox