public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "tomga at wp dot pl" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug libstdc++/53477] pretty printer fails with: Python Exception <type 'exceptions.IndexError'> list index out of range
Date: Fri, 14 Jun 2013 20:39:00 -0000	[thread overview]
Message-ID: <bug-53477-4-PvhYFKoYVA@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-53477-4@http.gcc.gnu.org/bugzilla/>

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53477

Tomasz Gajewski <tomga at wp dot pl> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |tomga at wp dot pl

--- Comment #8 from Tomasz Gajewski <tomga at wp dot pl> ---
The testcase can be reduced to:

#include <map>

typedef std::map<int, int> IntToIntMap;

int main()
{
  IntToIntMap amap;
  IntToIntMap & mapref = amap;
  amap[1] = 1;
  return 0;
}

and the problem is with map references. Executing on line with 'amap[1] = 1;'
commands to print 'amap' and 'mapref' I get:

(gdb) set python print-stack full
(gdb) p mapref
Traceback (most recent call last):
  File "/home/tomga/devel/gdb-scripts/python/libstdcxx/v6/printers.py", line
438, in children
    rep_type = find_type(self.val.type, '_Rep_type')
  File "/home/tomga/devel/gdb-scripts/python/libstdcxx/v6/printers.py", line
52, in find_type
    field = typ.fields()[0]
IndexError: list index out of range
$3 = std::map with 0 elements
(gdb) p amap
$4 = std::map with 0 elements

I get this with:

$ g++ --version
g++ (Ubuntu/Linaro 4.7.3-1ubuntu1) 4.7.3
...
$ gdb --version
GNU gdb (GDB) 7.5.91.20130417-cvs-ubuntu
...

Pretty printers from svn://gcc.gnu.org/svn/gcc/trunk/libstdc++-v3/python
(currently latest revision: 200105.

Currently I don't know how to debug this further.


  parent reply	other threads:[~2013-06-14 20:39 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-24 17:02 [Bug libstdc++/53477] New: " pluto at agmk dot net
2012-07-13 18:38 ` [Bug libstdc++/53477] " tromey at gcc dot gnu.org
2012-07-16 17:57 ` pinskia at gcc dot gnu.org
2012-07-16 19:03 ` pluto at agmk dot net
2013-06-03  3:41 ` asmwarrior at gmail dot com
2013-06-03  3:47 ` asmwarrior at gmail dot com
2013-06-03  4:05 ` asmwarrior at gmail dot com
2013-06-03  7:21 ` asmwarrior at gmail dot com
2013-06-03  7:34 ` asmwarrior at gmail dot com
2013-06-14 20:39 ` tomga at wp dot pl [this message]
2013-06-15 12:06 ` tomga at wp dot pl
2013-07-07 14:16 ` tomga at wp dot pl
2013-08-21  9:01 ` pmuldoon at redhat dot com
2013-08-21  9:42 ` redi at gcc dot gnu.org
2013-08-21 13:44 ` pmuldoon at redhat dot com
2013-08-21 13:46 ` mpolacek at gcc dot gnu.org
2013-08-22 19:14 ` pluto at agmk dot net
2014-01-06 11:36 ` pluto at agmk dot net
2014-05-06  8:36 ` jiyouguo at gmail dot com
2014-05-06  9:11 ` redi at gcc dot gnu.org
2014-05-07 12:55 ` jiyouguo at gmail dot com
2015-05-22 16:49 ` redi at gcc dot gnu.org
2015-05-22 20:12 ` tomga at wp dot pl
2015-05-23  9:57 ` redi at gcc dot gnu.org
2015-05-24  8:09 ` tomga at wp dot pl
2015-05-24 22:49 ` redi at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-53477-4-PvhYFKoYVA@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).