Bug 1053438 - std::list<>::iterator cannot be pretty-printed
Summary: std::list<>::iterator cannot be pretty-printed
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: gcc
Version: 32
Hardware: x86_64
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Jonathan Wakely
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-01-15 09:12 UTC by Jan Kratochvil
Modified: 2021-01-11 10:39 UTC (History)
9 users (show)

Fixed In Version: gcc-10.0.1-0.3.fc32
Clone Of:
Environment:
Last Closed: 2021-01-11 10:33:49 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
reproducer (186 bytes, text/plain)
2014-01-15 09:12 UTC, Jan Kratochvil
no flags Details


Links
System ID Private Priority Status Summary Last Updated
GNU Compiler Collection 91997 0 P3 ASSIGNED pretty printers: The __node_type type alias in _Hashtable is not available 2021-01-11 10:27:38 UTC

Description Jan Kratochvil 2014-01-15 09:12:17 UTC
Created attachment 850395 [details]
reproducer

Description of problem:
SSIA

Version-Release number of selected component (if applicable):
gdb-7.6.50.20130731-16.fc20.x86_64
gcc-4.8.2-7.fc20.x86_64
Tried also printers.py from GCC r201888 2013-08-20.

How reproducible:
Always.

Steps to Reproduce:
g++ -o list3 list3.C -Wall -g
gdb ./list3
(gdb) b 8
(gdb) r
(gdb) p it

Actual results:
Python Exception <type 'exceptions.ValueError'> Cannot find type std::list<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >::iterator::_Node: 
$1 = 
(gdb) 

Expected results:
$1 = "a"

Additional info:
But I do not understand why Fedora GCC testsuite PASSes:
$6 = "one"
got: $6 = "one"
PASS: libstdc++-prettyprinters/simple.cc print lstiter

Comment 1 Fedora End Of Life 2015-05-29 10:30:39 UTC
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.

Comment 2 Jan Kratochvil 2015-06-26 13:21:24 UTC
gdb-7.9.1-14.fc23.x86_64
gcc-5.1.1-1.fc23.x86_64
(gdb) p it
Python Exception <class 'ValueError'> Cannot find type std::__cxx11::list<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >::iterator::_Node: 
$1 =

Comment 3 Jan Kurik 2015-07-15 14:43:49 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 23 development cycle.
Changing version to '23'.

(As we did not run this process for some time, it could affect also pre-Fedora 23 development
cycle bugs. We are very sorry. It will help us with cleanup during Fedora 23 End Of Life. Thank you.)

More information and reason for this action is here:
https://fedoraproject.org/wiki/BugZappers/HouseKeeping/Fedora23

Comment 4 Fedora End Of Life 2016-11-24 11:05:58 UTC
This message is a reminder that Fedora 23 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 23. 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 '23'.

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 23 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 5 Jan Kratochvil 2016-12-13 13:13:16 UTC
gcc-6.2.1-2.fc26.x86_64
gdb-7.12-29.fc26.x86_64

Comment 6 Jonathan Wakely 2016-12-13 13:19:24 UTC
Fixed upstream by https://gcc.gnu.org/r243362 which should make it into Fedora with a gcc-6.3.1 update at some point.

Comment 7 Jonathan Wakely 2016-12-13 13:22:41 UTC
Actually this seems to be a different problem, I'll look into it.

Comment 8 Jonathan Wakely 2016-12-13 13:29:02 UTC
It looks like the std::list<T>::iterator::_Node typedef is not emitted in the debug info unless the iterator gets dereferenced.

The testsuite passes because it has such a dereference:

  std::list<std::string>::iterator lstiter = lst.begin();
  tem = *lstiter;
// { dg-final { note-test lstiter {"one"}} }

Comment 9 Fedora End Of Life 2017-02-28 09:36:20 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 26 development cycle.
Changing version to '26'.

Comment 10 Fedora End Of Life 2018-05-03 08:55:05 UTC
This message is a reminder that Fedora 26 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 26. 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 '26'.

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 26 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 11 Jan Kratochvil 2018-05-03 09:21:23 UTC
gdb-8.1-14.fc29.x86_64
gcc-8.0.1-0.23.fc29.x86_64

Comment 12 Jan Kurik 2018-08-14 10:24:35 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 29 development cycle.
Changing version to '29'.

Comment 13 Ben Cotton 2019-10-31 19:58:34 UTC
This message is a reminder that Fedora 29 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora 29 on 2019-11-26.
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 '29'.

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 29 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 14 Jan Kratochvil 2019-11-01 13:41:05 UTC
Python Exception <class 'ValueError'> Cannot find type std::__cxx11::list<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >::iterator::_Node: 
gdb-9.0.50.20191018-1.fc32.x86_64
gcc-9.2.1-1.fc32.3.x86_64

Comment 15 Ben Cotton 2020-02-11 15:42:42 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 32 development cycle.
Changing version to 32.

Comment 16 Jonathan Wakely 2021-01-11 10:33:49 UTC
This works in F32 and later, because the upstream bug is fixed in GCC 10.1 

$ gdb -q  -ex 'b 8' -ex r -ex 'p it' ./list3
Reading symbols from ./list3...
Breakpoint 1 at 0x401237: file mozilla_jwakely0/list3.C, line 8.
Starting program: /tmp/list3 

Breakpoint 1, main () at mozilla_jwakely0/list3.C:8
8         return 0;
$1 = "a"


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