Bug 609157 - Python (=pretty printing) for GDB
Python (=pretty printing) for GDB
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: gdb (Show other bugs)
5.5
All Linux
low Severity medium
: rc
: ---
Assigned To: Jan Kratochvil
qe-baseos-tools
:
Depends On:
Blocks: 547870 625372 644661
  Show dependency treegraph
 
Reported: 2010-06-29 10:36 EDT by Jan Kratochvil
Modified: 2011-05-13 08:50 EDT (History)
4 users (show)

See Also:
Fixed In Version: gdb-7.0.1-28.el5
Doc Type: Bug Fix
Doc Text:
When debugging a C++ program, GDB displayed values of simple data types as they were implemented. With this update, GDB uses a Python feature to display such values in a human-readable format.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-01-13 18:54:51 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:0099 normal SHIPPED_LIVE gdb bug fix update 2011-01-12 12:21:16 EST

  None (edit)
Description Jan Kratochvil 2010-06-29 10:36:52 EDT
Description of problem:
There is a highly visible GDB feature called Python Pretty Printing primarily for user friendly C++ data types displaying.  It has been implemented by Red Hat (primarily Tom Tromey).
http://sourceware.org/gdb/wiki/PythonGdb
http://tromey.com/blog/?cat=17

Version-Release number of selected component (if applicable):
gdb-7.0.1-23.el5

How reproducible:
Always.

Steps to Reproduce:
Have C++ program with:
  std::string s = "abcd";
(gdb) print s

Actual results:
$1 = {static npos = 18446744073709551615, _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, _M_p = 0x601028 "abcd"}}

Expected results:
$1 = "abcd"

Additional info:
The python support can be enabled on existing gdb-7.0.1-23.el5.src.rpm just by:
rpmbuild --with python
But it requires python libraries in the same arch as GDB which is on powerpc ppc64 for gdb byt ppc (32bit) for python.  Just for this reason RHEL-5.5 currently has --without python for all its arches.
Comment 1 Jan Kratochvil 2010-09-21 19:41:10 EDT
* Tue Sep 21 2010 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.0.1-28.el5
- Enable python by default even in Brew and on all the arches (BZ 609157).
- Resolves: rhbz#609157
Comment 4 Eva Kopalova 2010-11-16 12:13:40 EST
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
When debugging a C++ program, GDB displayed values of simple data types as they were implemented. With this update, GDB uses a Python feature to display such values in a human-readable format.
Comment 11 errata-xmlrpc 2011-01-13 18:54:51 EST
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2011-0099.html

Note You need to log in before you can comment on or make changes to this bug.