Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [RFA 0/9] Explicit locations v2 - Introduction
@ 2014-05-08 17:56 Keith Seitz
  2014-05-15 17:56 ` Joel Brobecker
  2014-10-12 19:50 ` Doug Evans
  0 siblings, 2 replies; 5+ messages in thread
From: Keith Seitz @ 2014-05-08 17:56 UTC (permalink / raw)
  To: gdb-patches@sourceware.org ml

Hi,

I would like to resurrect this project from last year.

This patch series introduces "explicit" locations, which allow users to 
explicitly specify location attributes when setting breakpoints. This 
feature can be especially handy, for example, when an application 
defines multiple functions of the same name:

(gdb) break -source file1.c -function multiple_symbols_with_this_name

In this case, gdb will only attempt to set a breakpoint in the given 
source file. If the given symbol is not defined in the file, gdb will do 
the usual pending breakpoint query.

This revision is largely the same as the one I posted last year with one 
notable change: I have implemented probe locations.

Consequently, this API change now supports the following "event 
locations": linespec, address (formerly "*EXPR"), explicit, and probe.

I have attempted to break up the patch to assist review. The intent is 
to apply all patches approved. Nonetheless, each patch may be applied 
sequentially and should not cause any build failures or introduce any 
test suite regressions.

I have tested each patch on both x86_64 native and native-gdbserver.

Keith


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

* Re: [RFA 0/9] Explicit locations v2 - Introduction
  2014-05-08 17:56 [RFA 0/9] Explicit locations v2 - Introduction Keith Seitz
@ 2014-05-15 17:56 ` Joel Brobecker
  2014-05-15 18:09   ` Keith Seitz
  2014-10-12 19:50 ` Doug Evans
  1 sibling, 1 reply; 5+ messages in thread
From: Joel Brobecker @ 2014-05-15 17:56 UTC (permalink / raw)
  To: Keith Seitz; +Cc: gdb-patches@sourceware.org ml

Hey Keith,

I did a quick testing session of those patches. First of all, it passes
our internal testsuite on x86_64-linux :). But more interestingly, you
asked me if I could try it out with some of operators, whose name have
double-quotes in them. It seems to be working pretty well, for instance:

    (gdb) break -f "+"
    Breakpoint 1 at 0x401d8a: -f "+". (2 locations)

Or using the fully-qualified symbol name:

    (gdb) b -f ops."-"
    Breakpoint 3 at 0x401da4: -f ops."-". (2 locations)

The only part that I found to be odd was that I tried to be a little
more selective in which operator I wanted to break on, by specifying
the line number:

    (gdb) b -f ops."-" -l 15
    Breakpoint 4 at 0x401da4: -f ops."-" -l 15. (2 locations)

I still got 2 locations, one of them not being at line 15:

    (gdb) info break
    4       breakpoint [...] <MULTIPLE>
    4.1                [...]   0x0000000000401da4 in ops."-" at ops.adb:15
    4.2                [...]   0x0000000000401ff3 in ops."-" at ops.adb:109

But maybe this part wasn't part of this patch's objectives yet...

-- 
Joel


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

* Re: [RFA 0/9] Explicit locations v2 - Introduction
  2014-05-15 17:56 ` Joel Brobecker
@ 2014-05-15 18:09   ` Keith Seitz
  2014-05-15 20:03     ` Joel Brobecker
  0 siblings, 1 reply; 5+ messages in thread
From: Keith Seitz @ 2014-05-15 18:09 UTC (permalink / raw)
  To: Joel Brobecker; +Cc: gdb-patches@sourceware.org ml

On 05/15/2014 10:56 AM, Joel Brobecker wrote:

> I did a quick testing session of those patches. First of all, it passes
> our internal testsuite on x86_64-linux :).

Great news, thank you!

> The only part that I found to be odd was that I tried to be a little
> more selective in which operator I wanted to break on, by specifying
> the line number:
>
>      (gdb) b -f ops."-" -l 15
>      Breakpoint 4 at 0x401da4: -f ops."-" -l 15. (2 locations)
>
> I still got 2 locations, one of them not being at line 15:
>
>      (gdb) info break
>      4       breakpoint [...] <MULTIPLE>
>      4.1                [...]   0x0000000000401da4 in ops."-" at ops.adb:15
>      4.2                [...]   0x0000000000401ff3 in ops."-" at ops.adb:109
>
> But maybe this part wasn't part of this patch's objectives yet...

Right. Linespecs don't support this yet, either. This patch was simply 
to be at parity with linespec. When linespecs gain the ability, explicit 
should, too.

Keith


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

* Re: [RFA 0/9] Explicit locations v2 - Introduction
  2014-05-15 18:09   ` Keith Seitz
@ 2014-05-15 20:03     ` Joel Brobecker
  0 siblings, 0 replies; 5+ messages in thread
From: Joel Brobecker @ 2014-05-15 20:03 UTC (permalink / raw)
  To: Keith Seitz; +Cc: gdb-patches@sourceware.org ml

> >But maybe this part wasn't part of this patch's objectives yet...
> 
> Right. Linespecs don't support this yet, either. This patch was
> simply to be at parity with linespec. When linespecs gain the
> ability, explicit should, too.

I'm not really all that sure whether this is something we want to
try to support with the current linespec syntax! IMO, the current
syntax seems OK and maybe even clever in its compactness, but in
the end, the efforts you and others have been putting into making
the parser work, lead me to believe that perhaps the future is
with more explicit identification of each part of the location
as you do here.

-- 
Joel


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

* Re: [RFA 0/9] Explicit locations v2 - Introduction
  2014-05-08 17:56 [RFA 0/9] Explicit locations v2 - Introduction Keith Seitz
  2014-05-15 17:56 ` Joel Brobecker
@ 2014-10-12 19:50 ` Doug Evans
  1 sibling, 0 replies; 5+ messages in thread
From: Doug Evans @ 2014-10-12 19:50 UTC (permalink / raw)
  To: Keith Seitz; +Cc: gdb-patches@sourceware.org ml

Keith Seitz <keiths@redhat.com> writes:
> Hi,
>
> I would like to resurrect this project from last year.
>
> This patch series introduces "explicit" locations, which allow users
> to explicitly specify location attributes when setting
> breakpoints. This feature can be especially handy, for example, when
> an application defines multiple functions of the same name:
>
> (gdb) break -source file1.c -function multiple_symbols_with_this_name
>
> In this case, gdb will only attempt to set a breakpoint in the given
> source file. If the given symbol is not defined in the file, gdb will
> do the usual pending breakpoint query.
>
> This revision is largely the same as the one I posted last year with
> one notable change: I have implemented probe locations.
>
> Consequently, this API change now supports the following "event
> locations": linespec, address (formerly "*EXPR"), explicit, and probe.
>
> I have attempted to break up the patch to assist review. The intent is
> to apply all patches approved. Nonetheless, each patch may be applied
> sequentially and should not cause any build failures or introduce any
> test suite regressions.
>
> I have tested each patch on both x86_64 native and native-gdbserver.

Hi.

I've read the patch set twice more now, including reading the patched code.
[That's what weekends are for, right? :-)]

I've got a high level question, and a few nits.
Before I impose submitting another version of the patch I'm hoping
we can get the remaining high level issues resolved first.

I think I better understand the things you have to go through to parse
linespecs, but there's still something here that needs more work.
I think it'll just involve a bit of API tweaking, so nothing major.
I'll leave the discussion to the email with the patch.

Thanks for the effort so far!
Sorry this is taking awhile to review.


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

end of thread, other threads:[~2014-10-12 19:50 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-05-08 17:56 [RFA 0/9] Explicit locations v2 - Introduction Keith Seitz
2014-05-15 17:56 ` Joel Brobecker
2014-05-15 18:09   ` Keith Seitz
2014-05-15 20:03     ` Joel Brobecker
2014-10-12 19:50 ` Doug Evans

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