public inbox for archer@sourceware.org
 help / color / mirror / Atom feed
From: Tom Tromey <tromey@redhat.com>
To: David Malcolm <dmalcolm@redhat.com>
Cc: archer@sourceware.org
Subject: Re: Pretty-printing backtraces when "python" is the inferior process
Date: Wed, 23 Dec 2009 19:33:00 -0000	[thread overview]
Message-ID: <m37hsd4haz.fsf@fleche.redhat.com> (raw)
In-Reply-To: <1261524321.2228.70.camel@brick> (David Malcolm's message of "Tue, 22 Dec 2009 18:25:21 -0500")

>>>>> "David" == David Malcolm <dmalcolm@redhat.com> writes:

David> I'm experimenting with archer, and adding python hooks for when the
David> inferior process is itself Python.

Awesome.

David> I've attempted to do this, but am running into an issue.  (this is on
David> Fedora 12 i386)

David> $ git checkout --track -b archer-tromey-python origin/archer-tromey-python

David> (gdb) frame 9
David> #9  PyEval_EvalFrameEx (f=<value optimized out>, throwflag=<value
David> optimized out>) at Python/ceval.c:2389
David> 2389				x = call_function(&sp, oparg);

I tried this same example on my F11 box.

I am not sure exactly what bug you are hitting, but I think it is
something that is fixed either in CVS head or in some other Fedora
patch.  I say that because the example fails with archer-tromey-python,
but works with the F11 system gdb.  I think it has to do with the
representation of inlined frames -- when I trace into lookup_symbol, if
I look at the blocks I eventually see:

    (gdb) p *block.superblock.function
    $5 = {
      ginfo = {
        name = 0x92be5e8 "call_function", 

I don't fully understand this, because I would have expected the
selected frame to be PyEval_EvalFrameEx, not call_function.  However,
I'm planning to do a merge from trunk in early January, which may fix
the problem.  In the meantime, maybe using archer-jankratochvil-fedora12
would be better.  Or even using the system gdb... though that will make
it a bit harder if you need to modify the python libraries.

Tom

  reply	other threads:[~2009-12-23 19:33 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-22 23:24 David Malcolm
2009-12-23 19:33 ` Tom Tromey [this message]
2009-12-23 21:28   ` David Malcolm
2011-01-06 14:55 ` Tom Tromey

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=m37hsd4haz.fsf@fleche.redhat.com \
    --to=tromey@redhat.com \
    --cc=archer@sourceware.org \
    --cc=dmalcolm@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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).