This is the mail archive of the mailing list for the Archer project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Pretty-printing backtraces when "python" is the inferior process

>>>>> "David" == David Malcolm <> writes:

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


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]