This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 1259051 - Gdb-heap fails with Python backtrace
Gdb-heap fails with Python backtrace
Status: CLOSED DUPLICATE of bug 1240340
Product: Fedora
Classification: Fedora
Component: gdb-heap (Show other bugs)
23
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Dave Malcolm
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-09-01 16:35 EDT by Göran Uddeborg
Modified: 2016-01-17 08:05 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-01-17 08:05:27 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Göran Uddeborg 2015-09-01 16:35:42 EDT
Description of problem:
When starting gdb, I get error messages about incorrect Python syntax in gdb-heap/heap/__init__.py

Version-Release number of selected component (if applicable):
gdb-heap-0.5-22.fc23.x86_64


How reproducible:
Every time.


Steps to Reproduce:
1. Create a file with debug information.  E.g.:
cat > c.c << EOF
int main()
{
  return 0;
}

2. Compile with debug information.
cc -g c.c -o c

3. Start gdb on it.
gdb c

4. Set a breakpoint.
b main

5. Run
r


Actual results:
Gdb prints an error message:
Traceback (most recent call last):
  File "/usr/share/gdb/auto-load/usr/lib64/ld-2.22.so-gdb.py", line 18, in <module>
    from heap.commands import register_commands
  File "/usr/share/gdb-heap/heap/__init__.py", line 58
    print 'type cache miss: %r' % typename
                              ^
SyntaxError: invalid syntax


Expected results:
No error message.


Additional info:
To me, this looks very much like a python2/python3 issue.  The print statement is apparently in python2 syntax, but gdb links with the python3 libraries.

If I add parenthesis around the string and variable, I instead get an error message around the except clause two lines further down.  Again, it uses python2 syntax.

From what I can understand, a conversion 2to3 is needed on the Python files in the package.
Comment 1 Jan Kratochvil 2016-01-17 08:05:27 EST

*** This bug has been marked as a duplicate of bug 1240340 ***

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