Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Simon Marchi <simon.marchi@ericsson.com>
To: Phil Muldoon <pmuldoon@redhat.com>,
	Keith Seitz <keiths@redhat.com>,
	"gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: Re: [python] Allow explicit locations in breakpoints.
Date: Mon, 16 Oct 2017 22:26:00 -0000	[thread overview]
Message-ID: <31ad8fb7-0e20-13a5-45d1-c9fa67b76e27@ericsson.com> (raw)
In-Reply-To: <1765bb88-8ab0-bdcd-8551-69f8dff3bcb9@redhat.com>

On 2017-10-16 06:01 PM, Phil Muldoon wrote:
> On 16/10/17 22:25, Simon Marchi wrote:
> 
>>
>>> For now, though, I'll add the keywords (as strings) in. This really
>>> prompts me to think we should rewrite the gdb.Breakpoint constructor
>>> to not use create_breakpoint and be more MI-like in the creation of
>>> breakpoints.
>> I'm not sure what you mean, MI uses create_breakpoint in mi_cmd_break_insert_1.
>>
>> Simon
>>
> Simon,
> 
> My apologies, on reading back I see I was pretty vague. I meant to
> create an explicit location using "new_explicit_location" function as
> MI does in that function you mentioned instead of
> "string_to_event_location". Keith mentioned it in the original email,
> I think, and that "string_to_event_location" was designed expressly
> for the command-line invocation. I wanted to see if Keith's comment
> would work in a gdb.Breakpoint.  The downside is, if we do that (use
> new_explicit_location), we won't be able to accept explicit locations
> in the spec keyword and only via specific line, function, source-file,
> etc keyword based instantiation.  I'll hack on the patch tomorrow and
> try to decide which.  I'll repost the patch soon.

But why can't we support both modes?

If "spec" is set, it's a CLI-like location, so you can feed it to
string_to_event_location.

If the keywords line/function/file are set (some of them), use them
with new_explicit_location.

If both spec and line/function/file are used, throw an error.

Simon


  reply	other threads:[~2017-10-16 22:26 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <04ccc2c4-7827-eedc-d8db-a83a0167acb6@redhat.com>
2017-08-23 17:51 ` Keith Seitz
2017-08-23 18:31   ` Phil Muldoon
2017-10-16 18:23     ` Simon Marchi
2017-10-16 18:33       ` Simon Marchi
2017-10-16 20:24       ` Phil Muldoon
2017-10-16 21:26         ` Simon Marchi
2017-10-16 22:01           ` Phil Muldoon
2017-10-16 22:26             ` Simon Marchi [this message]
2017-11-17 11:02               ` Phil Muldoon
2017-11-17 13:31                 ` Eli Zaretskii
2017-11-17 14:02                   ` Phil Muldoon
2017-11-23 22:17                 ` Simon Marchi
2017-11-24 14:07                   ` Phil Muldoon
2017-12-07 10:02                   ` Phil Muldoon
2017-12-07 12:16                     ` Phil Muldoon
2017-12-07 14:54                       ` Simon Marchi
2017-12-07 15:12                         ` Phil Muldoon
2017-12-07 16:41                           ` Simon Marchi
2017-12-08 13:50                     ` Eli Zaretskii
2017-09-12 10:03 ` Phil Muldoon
2017-10-02 15:18   ` Phil Muldoon
2017-10-16 11:14     ` Phil Muldoon
2017-10-16 18:31 ` Simon Marchi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=31ad8fb7-0e20-13a5-45d1-c9fa67b76e27@ericsson.com \
    --to=simon.marchi@ericsson.com \
    --cc=gdb-patches@sourceware.org \
    --cc=keiths@redhat.com \
    --cc=pmuldoon@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox