RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1350436 - Typo in Python support breaks info type-printers command
Summary: Typo in Python support breaks info type-printers command
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: gdb
Version: 7.2
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: rc
: ---
Assignee: Jan Kratochvil
QA Contact: Martin Cermak
URL:
Whiteboard:
Depends On: 1085576
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-06-27 12:47 UTC by Deepu K S
Modified: 2019-11-14 08:31 UTC (History)
13 users (show)

Fixed In Version: gdb-7.6.1-93.el7
Doc Type: No Doc Update
Doc Text:
undefined
Clone Of: 1085576
Environment:
Red Hat Enterprise Linux 7.2 gdb-7.6.1-80.el7.x86_64
Last Closed: 2016-11-04 03:51:11 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:2328 0 normal SHIPPED_LIVE gdb bug fix and enhancement update 2016-11-03 13:44:08 UTC
Sourceware 17136 0 None None None 2016-06-27 12:47:18 UTC

Description Deepu K S 2016-06-27 12:47:18 UTC
+++ This bug was initially created as a clone of Bug #1085576 +++

Description of problem:

In gdb, 'info type-printers' command is broken when any loaded object files have type printers.

Issue is fixed upstream in https://sourceware.org/bugzilla/show_bug.cgi?id=17136
Patch : https://sourceware.org/ml/gdb-patches/2015-06/msg00572.html

Version-Release number of selected component (if applicable):
gdb-7.6.1-80.el7.x86_64

How reproducible:
100%.

Steps to Reproduce:
1. Create and compile a trivial C++ program:
   echo 'int main() {}' > tm.C
   g++ -o tm -g tm.C
2. Run it under gdb, breaking at 'main' (after the C++ library is loaded).
   $ gdb tm
   (gdb) b main
   (gdb) r
3. Ask gdb for 
   (gdb) info type-printers

Actual results:

Python Exception <type 'exceptions.AttributeError'> 'gdb.Objfile' object has no attribute 'name': 
Error occurred in Python command: 'gdb.Objfile' object has no attribute 'name'

Expected results:

Type printers for /lib64/libstdc++.so.6:
  std::cmatch
  std::cregex_iterator
  std::cregex_token_iterator

etc.

Additional info:

Line 50 of /usr/share/gdb/python/gdb/command/type_printers.py is
  print ("%sType printers for %s:" % (sep, objfile.name))
It should be
  print ("%sType printers for %s:" % (sep, objfile.filename))

--- Additional comment from Fedora End Of Life on 2015-05-29 07:30:50 EDT ---

This message is a reminder that Fedora 20 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 20. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '20'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 20 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

--- Additional comment from Jonathan Wakely on 2015-05-29 08:10:44 EDT ---

Still present in F22

--- Additional comment from Jonathan Wakely on 2015-05-29 08:12:05 EDT ---

(In reply to Clem Dickey from comment #0)
> 
> Line 50 of /usr/share/gdb/python/gdb/command/type_printers.py is
>   print ("%sType printers for %s:" % (sep, objfile.name))
> It should be
>   print ("%sType printers for %s:" % (sep, objfile.filename))

I can confirm that this solves the problem.

--- Additional comment from Fedora Update System on 2015-06-26 10:10:12 EDT ---

gdb-7.8.2-39.fc21 has been submitted as an update for Fedora 21.
https://admin.fedoraproject.org/updates/gdb-7.8.2-39.fc21

--- Additional comment from Fedora Update System on 2015-06-26 10:19:05 EDT ---

gdb-7.9.1-17.fc22 has been submitted as an update for Fedora 22.
https://admin.fedoraproject.org/updates/gdb-7.9.1-17.fc22

--- Additional comment from Fedora Update System on 2015-06-27 08:40:38 EDT ---

Package gdb-7.9.1-17.fc22:
* should fix your issue,
* was pushed to the Fedora 22 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing gdb-7.9.1-17.fc22'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2015-10822/gdb-7.9.1-17.fc22
then log in and leave karma (feedback).

--- Additional comment from Fedora Update System on 2015-07-02 13:05:16 EDT ---

gdb-7.9.1-17.fc22 has been pushed to the Fedora 22 stable repository.  If problems still persist, please make note of it in this bug report.

--- Additional comment from Fedora Update System on 2015-07-14 11:36:42 EDT ---

gdb-7.8.2-39.fc21 has been pushed to the Fedora 21 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 2 Jan Kratochvil 2016-06-27 14:33:03 UTC
RHEL-6 does not contain "info type-printers" at all.

Comment 3 Jan Kratochvil 2016-06-27 21:15:41 UTC
[testsuite patch] PR python/17136: 'info type-printers' causes an exception when there are per-objfile printers
https://sourceware.org/ml/gdb-patches/2016-06/msg00455.html

QA: New testcases:
PASS: gdb.python/py-typeprint.exp: info type-printers for other
PASS: gdb.python/py-typeprint.exp: whatis ovar

Comment 7 errata-xmlrpc 2016-11-04 03:51:11 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2016-2328.html


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