Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Keith Seitz <keiths@redhat.com>
To: Markus Metzger <markus.t.metzger@intel.com>, gdb-patches@sourceware.org
Subject: Re: [PATCH] python: accept address and explicit locations in gdb.decode_line
Date: Wed, 22 Jun 2016 20:14:00 -0000	[thread overview]
Message-ID: <576AF19B.1090804@redhat.com> (raw)
In-Reply-To: <1466433185-29434-1-git-send-email-markus.t.metzger@intel.com>

On 06/20/2016 07:33 AM, Markus Metzger wrote:
> The gdb.decode_line python function is documented to support the same location
> expressions as the "break" command.  It currently expects a linespec location.
> 
> Instead of creating a linespec location directly, create the location via
> string_to_event_location_basic.
> 

I must have missed python when Joel asked me to take a look at this.
Your patch is correct (with the language correction below).

> It's not clear to me whether I should use python_language or current_language,
> though.  Is there some comment that explains it?

Although string_to_event_location_basic does not use the language
parameter, I kept it for parallelism with string_to_event_location. What
can I say? I really dislike using globals!

The correct language to use is the language in which the linespec is to
be evaluated. Most typically, that is current_language.

Keith


  reply	other threads:[~2016-06-22 20:14 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-20 14:33 Markus Metzger
2016-06-22 20:14 ` Keith Seitz [this message]
2016-06-23  9:15   ` Metzger, Markus T
2016-06-23 15:27     ` Keith Seitz
2016-06-29 14:15       ` Metzger, Markus T
2016-10-06 17:42         ` Pedro Alves

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=576AF19B.1090804@redhat.com \
    --to=keiths@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=markus.t.metzger@intel.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