Bug 672235

Summary: new-backtrace command doesn't work
Product: [Fedora] Fedora Reporter: Jirka Klimes <jklimes>
Component: gdbAssignee: Phil Muldoon <pmuldoon>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: jan.kratochvil, pmuldoon, rkhan, sergiodj
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: gdb-7.2.50.20110125-16.fc15 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-01-27 11:03:00 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Jirka Klimes 2011-01-24 14:52:36 UTC
Description of problem:
I tried to use 'new-bactrace' command to get more readable backtrace, however it failed with:
(gdb) new-backtrace 
Traceback (most recent call last):
  File "/usr/share/gdb/python/gdb/command/backtrace.py", line 83, in invoke
    newest_frame = gdb.selected_thread ().newest_frame ()
AttributeError: 'gdb.InferiorThread' object has no attribute 'newest_frame'
Error occurred in Python command: 'gdb.InferiorThread' object has no attribute 'newest_frame'


Version-Release number of selected component (if applicable):
gdb-7.2-26.fc14.x86_64

How reproducible:
always

Actual results:
new-backtrace doesn't work


Expected results:
new-backtrace should work once is present.

Aditional info:
I found that the line newest_frame = gdb.selected_thread ().newest_frame () is indented with a tab instead of spaces. Sadly, correcting that doesn't help.
After googling a bit I've found:
http://permalink.gmane.org/gmane.comp.debugging.archer/2294
http://permalink.gmane.org/gmane.comp.debugging.archer/2283
http://sourceware.org/bugzilla/show_bug.cgi?id=12367

Is it possible to back-port that to F14?

Comment 1 Jan Kratochvil 2011-01-25 22:10:27 UTC
Sorry but this is going only for Rawhide+.

Current Rawhide with gdb-7.2.50.20110125-14.fc15 build which is at:
https://koji.fedoraproject.org/koji/buildinfo?buildID=215606

fails anyway:

(gdb) source /usr/share/gdb/python/gdb/command/backtrace.py
(gdb) new-backtrace 
#0  main (Traceback (most recent call last):
  File "/usr/share/gdb/python/gdb/command/backtrace.py", line 104, in invoke
    pair[1].describe (sys.stdout, full)
  File "/usr/share/gdb/python/gdb/FrameWrapper.py", line 93, in describe
    self.print_frame_args (stream, func)
  File "/usr/share/gdb/python/gdb/FrameWrapper.py", line 63, in print_frame_args
    block = func.value
AttributeError: 'gdb.Symbol' object has no attribute 'value'
Error occurred in Python command: 'gdb.Symbol' object has no attribute 'value'

This build uses archer-tromey-python commit:
582b61f4ca6a4f733d0c16234f5fc721f3fe16fd

Comment 2 Jan Kratochvil 2011-01-27 11:03:00 UTC
It is now in Rawhide, subject to Fedora patches pushing upstream.

* Thu Jan 27 2011 Jan Kratochvil <jan.kratochvil> - 7.2.50.20110125-16.fc15
- Fix Python new-backtrace command (BZ 672235, Phil Muldoon).

[patch] Fix RH BZ 672235
http://sourceware.org/ml/archer/2011-q1/msg00024.html

You should be able to also --rebuild it in F14 (changing librpm.so.2 to librpm.so.1 in gdb.spec).