From: "Ulrich Weigand" <uweigand@de.ibm.com>
To: martin.galvan@tallertechnologies.com (Martin Galvan)
Cc: gdb-patches@sourceware.org, dje@google.com (Doug Evans),
eliz@gnu.org (Eli Zaretskii),
palves@redhat.com (Pedro Alves),
daniel.gutson@tallertechnologies.com (Daniel Gutson)
Subject: Re: [PING][RFC][PATCH v2] Python API: add gdb.stack_may_be_invalid
Date: Fri, 07 Nov 2014 17:27:00 -0000 [thread overview]
Message-ID: <201411071727.sA7HRNIQ007851@d03av02.boulder.ibm.com> (raw)
In-Reply-To: <CAOKbPbZd+ppseGQW2OirBm4y5O=LgUMP-Pf8=RF00hnPOuMutw@mail.gmail.com> from "Martin Galvan" at Nov 07, 2014 10:32:15 AM
Martin Galvan wrote:
> +stack_is_destroyed (gdb_py_ulongest pc)
> +{
> + return gdbarch_in_function_epilogue_p (python_gdbarch, pc);
> +}
Just one comment here: python_gdbarch isn't really correct here.
If you have a platform that supports multiple architectures, then
you really should use the appropriate gdbarch for PC.
(python_gdbarch is unfortunately one of those hacks; it would be
preferable if we didn't have it at all ...)
Ideally, the Python interface should carry enough information to
determine the appropriate gdbarch, e.g. by operating on a Frame
instead of a plain PC value.
If that isn't possible, one fall-back might be to look up the
symbol table from the PC, and use the associated objfile arch.
Bye,
Ulrich
--
Dr. Ulrich Weigand
GNU/Linux compilers and toolchain
Ulrich.Weigand@de.ibm.com
next prev parent reply other threads:[~2014-11-07 17:27 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-07 13:32 Martin Galvan
2014-11-07 17:09 ` Pedro Alves
2014-11-07 17:18 ` Martin Galvan
2014-11-07 17:27 ` Ulrich Weigand [this message]
2014-11-07 17:37 ` Martin Galvan
2014-11-12 15:55 ` Martin Galvan
2014-11-12 17:06 ` Doug Evans
2014-11-12 17:20 ` Pedro Alves
2014-11-12 17:26 ` Martin Galvan
2014-11-12 17:32 ` Doug Evans
2014-11-12 17:24 ` Martin Galvan
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=201411071727.sA7HRNIQ007851@d03av02.boulder.ibm.com \
--to=uweigand@de.ibm.com \
--cc=daniel.gutson@tallertechnologies.com \
--cc=dje@google.com \
--cc=eliz@gnu.org \
--cc=gdb-patches@sourceware.org \
--cc=martin.galvan@tallertechnologies.com \
--cc=palves@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