Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Siva Chandra <sivachandra@google.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [RFC] - Exposing find_pc_line through Python API
Date: Wed, 09 May 2012 20:05:00 -0000	[thread overview]
Message-ID: <83txzpyveh.fsf@gnu.org> (raw)
In-Reply-To: <CAGyQ6gwkpvLwhO_gEcEtQFEND_A+fk5ive6qgFfBqgTn4fa_0w@mail.gmail.com>

> Date: Wed, 9 May 2012 13:05:01 +0530
> From: Siva Chandra <sivachandra@google.com>
> Cc: gdb-patches@sourceware.org
> 
> 
> [1:text/plain Hide]
> 
> Eli> If I were that user, I would "feel" that the execution is at the first
> Eli> line (or maybe in the prologue) of 'func', since PC is (in my mind)
> Eli> unaffected by commands that walk the call stack.  And if you are
> Eli> talking about the value of PC saved in the frame of the caller of
> Eli> 'func', then saying that line 22 is the "actual" location is again
> Eli> confusing, because execution did not yet reach that point.
> 
> Eli> So I have hard time understanding why we need the distinction.  And
> Eli> since you say that the current Symtab_and_line.line gives the second
> Eli> alternatives, I'm confused even more.
> 
> Eli> It's possible that I'm the only confused person here, but in that
> Eli> case, at least the example should be fixed to show and explain the
> Eli> distinction more clearly and unequivocally, and also in which
> Eli> situations the "actual" value is useful.
> 
> The more I think about your comments, the more I feel that exposing
> this 'actual' argument is not a good idea.  I am now of the opinion
> that the 'notcurrent' argument to the internal function find_pc_line
> caters to a internal usage which depends on much more than just what
> the user feels.  Hence, I have modified the patch to remove the
> 'actual' argument.  The new version of the patch is attached.
> 
> 2012-05-07  Siva Chandra Reddy  <sivachandra@google.com>
> 
>         Add a new function gdb.find_pc_line to the Python API.
>         * NEWS (Python Scripting): Add entry about the new function.
>         * python/python.c (gdbpy_find_pc_line): New function which
>         implements gdb.find_pc_line.
>         (GdbMethods): Add entry for the new function.
> 
>         doc/
>         * gdb.texinfo (Basic Python): Add description about the function
>         gdb.find_pc_line

OK for these two parts.


  reply	other threads:[~2012-05-09 20:05 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-07 18:11 Siva Chandra
2012-05-07 19:36 ` Eli Zaretskii
2012-05-08  2:35   ` Siva Chandra
2012-05-09  7:35   ` Siva Chandra
2012-05-09 20:05     ` Eli Zaretskii [this message]
2012-05-10 21:16     ` Doug Evans
2012-05-11 16:35       ` Siva Chandra
2012-05-11 18:14         ` Doug Evans
2012-05-13 11:37           ` Siva Chandra

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=83txzpyveh.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=gdb-patches@sourceware.org \
    --cc=sivachandra@google.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