Bug 609157 - Python (=pretty printing) for GDB
Summary: Python (=pretty printing) for GDB
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: gdb
Version: 5.5
Hardware: All
OS: Linux
low
medium
Target Milestone: rc
: ---
Assignee: Jan Kratochvil
QA Contact: qe-baseos-tools-bugs
URL:
Whiteboard:
Depends On:
Blocks: 547870 625372 644661
TreeView+ depends on / blocked
 
Reported: 2010-06-29 14:36 UTC by Jan Kratochvil
Modified: 2018-11-14 16:34 UTC (History)
4 users (show)

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.
Clone Of:
Environment:
Last Closed: 2011-01-13 23:54:51 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:0099 0 normal SHIPPED_LIVE gdb bug fix update 2011-01-12 17:21:16 UTC

Description Jan Kratochvil 2010-06-29 14:36:52 UTC
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 23:41:10 UTC
* Tue Sep 21 2010 Jan Kratochvil <jan.kratochvil> - 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 17:13:40 UTC
    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 23:54:51 UTC
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.