Bug 1028679 - gdb prints Python Exception <type 'exceptions.IndexError'> list index out of range
gdb prints Python Exception <type 'exceptions.IndexError'> list index out of ...
Status: CLOSED EOL
Product: Fedora
Classification: Fedora
Component: gcc (Show other bugs)
19
Unspecified Linux
unspecified Severity unspecified
: ---
: ---
Assigned To: Phil Muldoon
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-11-09 08:22 EST by alberth289346
Modified: 2015-02-17 14:09 EST (History)
9 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-02-17 14:09:38 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 alberth289346 2013-11-09 08:22:08 EST
Description of problem:
When running gdb, it speaks about a Python exception, even when debugging a C++ program.
See below. I replaced my home directory path with $HOME, and added the empty lines above the (gdb) prompt.

The Python Exception line is at the 5th line of the "r" command.

$ gdb freerct 
GNU gdb (GDB) Fedora 7.6.1-42.fc19
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from $HOME/freerct/coaster_cars/src/freerct...done.

(gdb) b track_piece.cpp:184
Breakpoint 1 at 0x4414b4: file $HOME/freerct/coaster_cars/src/track_piece.cpp, line 184.

(gdb) r
Starting program: $HOME/freerct/coaster_cars/src/freerct 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".

Python Exception <type 'exceptions.IndexError'> list index out of range: 
Breakpoint 1, TrackPiece::Load (this=0x704908, rcd_file=0x7fffffffdca0, length=119, 
    sprites=std::map with 2 elements) at $HOME/freerct/coaster_cars/src/track_piece.cpp:184
184             if (length < 2+3+1+2+4+2) return false;
Missing separate debuginfos, use: debuginfo-install SDL-1.2.15-11.fc19.x86_64 SDL_ttf-2.0.11-3.fc19.x86_64 freetype-2.4.11-7.fc19.x86_64
Comment 1 Jan Kratochvil 2013-11-09 12:58:46 EST
I debug with f19 GDB daily and I do not see such problem, even for C++ code.
Could you provide a better reproducer?  Maybe your 'freerct' binary would be sufficient.
Comment 2 Jan Kratochvil 2013-11-10 04:28:37 EST
(gdb) l 1
1	#include <set>
2	int main() {
3	  std::set<int> a,&b(a);
4	  return 0; /* line 4 */
5	}
(gdb) b 4
(gdb) r
4	  return 0; /* line 4 */
(gdb) p a
$1 = std::set with 0 elements
(gdb) p b
Python Exception <type 'exceptions.IndexError'> list index out of range: 
$2 = std::set with 0 elements
Comment 3 Tom Tromey 2013-11-11 10:56:21 EST
Seems like:

http://sourceware.org/bugzilla/show_bug.cgi?id=15195

Fixed here:

2013-08-20  Phil Muldoon  <pmuldoon@redhat.com>

	PR libstdc++/53477
	http://sourceware.org/bugzilla/show_bug.cgi?id=15195

	* python/libstdcxx/v6/printers.py (Printer.__call__): If a value
	is a reference, fetch referenced value.
	(RxPrinter.invoke): Ditto.
	* testsuite/libstdc++-prettyprinters/cxx11.cc (main): Add -O0
	flag. Add referenced value tests.


Though I don't see std::set in the test case -- so it is possibly an
oversight, though the implementation approach makes me think it 
most likely really is fixed.
Comment 4 Jan Kratochvil 2013-11-11 11:52:56 EST
Jakub,
/usr/share/gcc-*/python/libstdcxx/v6/printers.py
needs to be patched by
http://gcc.gnu.org/viewcvs/gcc?view=revision&revision=201888
GIT commit df1ac917c9ce90beb8c3804c2d92cb47b337de30
The patch is applicable to F18/F19/F20/Rawhide.
Comment 5 Fedora End Of Life 2015-01-09 15:32:14 EST
This message is a notice that Fedora 19 is now at end of life. Fedora 
has stopped maintaining and issuing updates for Fedora 19. It is 
Fedora's policy to close all bug reports from releases that are no 
longer maintained. Approximately 4 (four) weeks from now this bug will
be closed as EOL if it remains open with a Fedora 'version' of '19'.

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 19 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.
Comment 6 Fedora End Of Life 2015-02-17 14:09:38 EST
Fedora 19 changed to end-of-life (EOL) status on 2015-01-06. Fedora 19 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.

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