Bug 51967 - FAIL: libstdc++-prettyprinters/48362.cc
Summary: FAIL: libstdc++-prettyprinters/48362.cc
Status: RESOLVED INVALID
Alias: None
Product: gcc
Classification: Unclassified
Component: libstdc++ (show other bugs)
Version: 4.7.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-23 15:18 UTC by John David Anglin
Modified: 2012-02-21 15:20 UTC (History)
1 user (show)

See Also:
Host: hppa2.0w-hp-hpux11.11
Target: hppa2.0w-hp-hpux11.11
Build: hppa2.0w-hp-hpux11.11
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description John David Anglin 2012-01-23 15:18:33 UTC
Executing on host: /test/gnu/gcc/objdir/./gcc/g++ -shared-libgcc -B/test/gnu/gcc
/objdir/./gcc -nostdinc++ -L/test/gnu/gcc/objdir/hppa2.0w-hp-hpux11.11/libstdc++
-v3/src -L/test/gnu/gcc/objdir/hppa2.0w-hp-hpux11.11/libstdc++-v3/src/.libs -B/o
pt/gnu/gcc/gcc-4.7/hppa2.0w-hp-hpux11.11/bin/ -B/opt/gnu/gcc/gcc-4.7/hppa2.0w-hp
-hpux11.11/lib/ -isystem /opt/gnu/gcc/gcc-4.7/hppa2.0w-hp-hpux11.11/include -isy
stem /opt/gnu/gcc/gcc-4.7/hppa2.0w-hp-hpux11.11/sys-include -B/test/gnu/gcc/objd
ir/hppa2.0w-hp-hpux11.11/./libstdc++-v3/src/.libs -g -O2 -D_GLIBCXX_ASSERT -fmes
sage-length=0 -g -O2 -g -O2 -DLOCALEDIR="." -nostdinc++ -I/test/gnu/gcc/objdir/h
ppa2.0w-hp-hpux11.11/libstdc++-v3/include/hppa2.0w-hp-hpux11.11 -I/test/gnu/gcc/
objdir/hppa2.0w-hp-hpux11.11/libstdc++-v3/include -I/test/gnu/gcc/gcc/libstdc++-
v3/libsupc++ -I/test/gnu/gcc/gcc/libstdc++-v3/include/backward -I/test/gnu/gcc/g
cc/libstdc++-v3/testsuite/util /test/gnu/gcc/gcc/libstdc++-v3/testsuite/libstdc+
+-prettyprinters/48362.cc   -g -std=gnu++11 -O0 ./libtestc++.a   -lm   -o ./4836
2.exe    (timeout = 600)
spawn /test/gnu/gcc/objdir/./gcc/g++ -shared-libgcc -B/test/gnu/gcc/objdir/./gcc
 -nostdinc++ -L/test/gnu/gcc/objdir/hppa2.0w-hp-hpux11.11/libstdc++-v3/src -L/te
st/gnu/gcc/objdir/hppa2.0w-hp-hpux11.11/libstdc++-v3/src/.libs -B/opt/gnu/gcc/gc
c-4.7/hppa2.0w-hp-hpux11.11/bin/ -B/opt/gnu/gcc/gcc-4.7/hppa2.0w-hp-hpux11.11/li
b/ -isystem /opt/gnu/gcc/gcc-4.7/hppa2.0w-hp-hpux11.11/include -isystem /opt/gnu
/gcc/gcc-4.7/hppa2.0w-hp-hpux11.11/sys-include -B/test/gnu/gcc/objdir/hppa2.0w-h
p-hpux11.11/./libstdc++-v3/src/.libs -g -O2 -D_GLIBCXX_ASSERT -fmessage-length=0
 -g -O2 -g -O2 -DLOCALEDIR="." -nostdinc++ -I/test/gnu/gcc/objdir/hppa2.0w-hp-hpux11.11/libstdc++-v3/include/hppa2.0w-hp-hpux11.11 -I/test/gnu/gcc/objdir/hppa2.0w-hp-hpux11.11/libstdc++-v3/include -I/test/gnu/gcc/gcc/libstdc++-v3/libsupc++ -I/test/gnu/gcc/gcc/libstdc++-v3/include/backward -I/test/gnu/gcc/gcc/libstdc++-v3/testsuite/util /test/gnu/gcc/gcc/libstdc++-v3/testsuite/libstdc++-prettyprinters/48362.cc -g -std=gnu++11 -O0 ./libtestc++.a -lm -o ./48362.exe
Setting LD_LIBRARY_PATH to :/test/gnu/gcc/objdir/gcc:/test/gnu/gcc/objdir/hppa2.0w-hp-hpux11.11/./libstdc++-v3/../libgomp/.libs:/test/gnu/gcc/objdir/hppa2.0w-hp-hpux11.11/./libstdc++-v3/src/.libs::/test/gnu/gcc/objdir/gcc:/test/gnu/gcc/objdir/hppa2.0w-hp-hpux11.11/./libstdc++-v3/../libgomp/.libs:/test/gnu/gcc/objdir/hppa2.0w-hp-hpux11.11/./libstdc++-v3/src/.libs
spawn [open ...]
PASS: libstdc++-prettyprinters/48362.cc execution test
Spawning: gdb -nx -nw -quiet -batch -x 48362.gdb ./48362.exe
spawn gdb -nx -nw -quiet -batch -x 48362.gdb ./48362.exe
Breakpoint 1 at 0x34f8: file /test/gnu/gcc/gcc/libstdc++-v3/testsuite/libstdc++-prettyprinters/48362.cc, line 33.
warning: Private mapping of shared library text was not specified
by the executable; setting a breakpoint in a shared library which
is not privately mapped will not work.  See the HP-UX 11i v3 chatr
manpage for methods to privately map shared library text.

Breakpoint 1, main () at /test/gnu/gcc/gcc/libstdc++-v3/testsuite/libstdc++-prettyprinters/48362.cc:33
33        return 0; // Mark SPOT
$1 = {<No data fields>}
FAIL: libstdc++-prettyprinters/48362.cc print t1
$2 = {<_Tuple_impl> = {<_Tuple_impl> = {<_Tuple_impl> = {<_Tuple_impl> = {<No data fields>}, <_Head_base> = {<tuple> = {<No data fields>}, <No data fields>}, <No data fields>}, <_Head_base> = {_M_head_impl = 5}, <No data fields>}, <_Head_base> = {_M_head_impl = {static npos = 4294967295, _M_dataplus = {<allocator> = {<new_allocator> = {<No data fields>}, <No data fields>}, _M_p = 0x40003bd4 "Johnny"}}}, <No data fields>}, <No data fields>}
FAIL: libstdc++-prettyprinters/48362.cc print t2
extra_tool_flags are:
 -std=gnu++11 -g
Comment 1 John David Anglin 2012-01-23 15:20:35 UTC
Similar fail is libstdc++-prettyprinters/simple.cc:

Executing on host: /test/gnu/gcc/objdir/./gcc/g++ -shared-libgcc -B/test/gnu/gcc
/objdir/./gcc -nostdinc++ -L/test/gnu/gcc/objdir/hppa2.0w-hp-hpux11.11/libstdc++
-v3/src -L/test/gnu/gcc/objdir/hppa2.0w-hp-hpux11.11/libstdc++-v3/src/.libs -B/o
pt/gnu/gcc/gcc-4.7/hppa2.0w-hp-hpux11.11/bin/ -B/opt/gnu/gcc/gcc-4.7/hppa2.0w-hp
-hpux11.11/lib/ -isystem /opt/gnu/gcc/gcc-4.7/hppa2.0w-hp-hpux11.11/include -isy
stem /opt/gnu/gcc/gcc-4.7/hppa2.0w-hp-hpux11.11/sys-include -B/test/gnu/gcc/objd
ir/hppa2.0w-hp-hpux11.11/./libstdc++-v3/src/.libs -g -O2 -D_GLIBCXX_ASSERT -fmes
sage-length=0 -g -O2 -g -O2 -DLOCALEDIR="." -nostdinc++ -I/test/gnu/gcc/objdir/h
ppa2.0w-hp-hpux11.11/libstdc++-v3/include/hppa2.0w-hp-hpux11.11 -I/test/gnu/gcc/
objdir/hppa2.0w-hp-hpux11.11/libstdc++-v3/include -I/test/gnu/gcc/gcc/libstdc++-
v3/libsupc++ -I/test/gnu/gcc/gcc/libstdc++-v3/include/backward -I/test/gnu/gcc/g
cc/libstdc++-v3/testsuite/util /test/gnu/gcc/gcc/libstdc++-v3/testsuite/libstdc+
+-prettyprinters/simple.cc   -g ./libtestc++.a   -lm   -o ./simple.exe    (timeo
ut = 600)
spawn /test/gnu/gcc/objdir/./gcc/g++ -shared-libgcc -B/test/gnu/gcc/objdir/./gcc
 -nostdinc++ -L/test/gnu/gcc/objdir/hppa2.0w-hp-hpux11.11/libstdc++-v3/src -L/te
st/gnu/gcc/objdir/hppa2.0w-hp-hpux11.11/libstdc++-v3/src/.libs -B/opt/gnu/gcc/gc
c-4.7/hppa2.0w-hp-hpux11.11/bin/ -B/opt/gnu/gcc/gcc-4.7/hppa2.0w-hp-hpux11.11/li
b/ -isystem /opt/gnu/gcc/gcc-4.7/hppa2.0w-hp-hpux11.11/include -isystem /opt/gnu
/gcc/gcc-4.7/hppa2.0w-hp-hpux11.11/sys-include -B/test/gnu/gcc/objdir/hppa2.0w-h
p-hpux11.11/./libstdc++-v3/src/.libs -g -O2 -D_GLIBCXX_ASSERT -fmessage-length=0
 -g -O2 -g -O2 -DLOCALEDIR="." -nostdinc++ -I/test/gnu/gcc/objdir/hppa2.0w-hp-hp
ux11.11/libstdc++-v3/include/hppa2.0w-hp-hpux11.11 -I/test/gnu/gcc/objdir/hppa2.
0w-hp-hpux11.11/libstdc++-v3/include -I/test/gnu/gcc/gcc/libstdc++-v3/libsupc++ -I/test/gnu/gcc/gcc/libstdc++-v3/include/backward -I/test/gnu/gcc/gcc/libstdc++-v3/testsuite/util /test/gnu/gcc/gcc/libstdc++-v3/testsuite/libstdc++-prettyprinters/simple.cc -g ./libtestc++.a -lm -o ./simple.exe
Setting LD_LIBRARY_PATH to :/test/gnu/gcc/objdir/gcc:/test/gnu/gcc/objdir/hppa2.0w-hp-hpux11.11/./libstdc++-v3/../libgomp/.libs:/test/gnu/gcc/objdir/hppa2.0w-hp-hpux11.11/./libstdc++-v3/src/.libs::/test/gnu/gcc/objdir/gcc:/test/gnu/gcc/objdir/hppa2.0w-hp-hpux11.11/./libstdc++-v3/../libgomp/.libs:/test/gnu/gcc/objdir/hppa2.0w-hp-hpux11.11/./libstdc++-v3/src/.libs
spawn [open ...]
zardoz0010100001onetwoonetwozardozPASS: libstdc++-prettyprinters/simple.cc execution test
Spawning: gdb -nx -nw -quiet -batch -x simple.gdb ./simple.exe
spawn gdb -nx -nw -quiet -batch -x simple.gdb ./simple.exe
Breakpoint 1 at 0x4970: file /test/gnu/gcc/gcc/libstdc++-v3/testsuite/libstdc++-prettyprinters/simple.cc, line 78.
warning: Private mapping of shared library text was not specified
by the executable; setting a breakpoint in a shared library which
is not privately mapped will not work.  See the HP-UX 11i v3 chatr
manpage for methods to privately map shared library text.

Breakpoint 1, main () at /test/gnu/gcc/gcc/libstdc++-v3/testsuite/libstdc++-prettyprinters/simple.cc:79
79        std::cout << bs;
$1 = {static npos = 4294967295, _M_dataplus = {<allocator> = {<new_allocator> = {<No data fields>}, <No data fields>}, _M_p = 0x40004034 "zardoz"}}
FAIL: libstdc++-prettyprinters/simple.cc print str
$2 = {<_Base_bitset> = {_M_w = 161}, <No data fields>}
FAIL: libstdc++-prettyprinters/simple.cc print bs
$3 = {<_Deque_base> = {_M_impl = {<allocator> = {<new_allocator> = {<No data fields>}, <No data fields>}, _M_map = 0x40004048, _M_map_size = 8, _M_start = {_M_cur = 0x40004070, _M_first = 0x40004070, _M_last = 0x40004270, _M_node = 0x40004054}, _M_finish = {_M_cur = 0x40004078, _M_first = 0x40004070, _M_last = 0x40004270, _M_node = 0x40004054}}}, <No data fields>}
FAIL: libstdc++-prettyprinters/simple.cc print deq
$4 = {<_List_base> = {_M_impl = {<allocator> = {<new_allocator> = {<No data fields>}, <No data fields>}, _M_node = {_M_next = 0x400042c0, _M_prev = 0x400042f0}}}, <No data fields>}
FAIL: libstdc++-prettyprinters/simple.cc print lst
$5 = {_M_t = {_M_impl = {<allocator> = {<new_allocator> = {<No data fields>}, <No data fields>}, _M_key_compare = {<binary_function> = {<No data fields>}, <No data fields>}, _M_header = {_M_color = _S_red, _M_parent = 0x40004328, _M_left = 0x40004328, _M_right = 0x40004328}, _M_node_count = 1}}}
FAIL: libstdc++-prettyprinters/simple.cc print mp
testcase /test/gnu/gcc/gcc/libstdc++-v3/testsuite/libstdc++-prettyprinters/prettyprinters.exp completed in 67 seconds
Comment 2 Jonathan Wakely 2012-01-23 15:39:52 UTC
do the printers ever work, outside the testsuite?

i.e. if you build this:
#include <tuple>
int main() {
  std::tuple<int, int> t;
  return std::tuple_size<decltype(t)>::value;
}

then debug and run

  break 4
  run
  print t

you should see

$1 = std::tuple containing = {
  [1] = 0,
  [2] = 0
}


does it make any difference if you put this in ~/.gdbinit (with the correct path to the installed gcc)?

python
 import sys
 sys.path.insert(0, '/path/to/gcc/share/gcc-4.7.0/python')
 from libstdcxx.v6.printers import register_libstdcxx_printers
 register_libstdcxx_printers (None)
end
Comment 3 dave.anglin 2012-01-29 17:27:24 UTC
On 23-Jan-12, at 10:39 AM, redi at gcc dot gnu.org wrote:

> do the printers ever work, outside the testsuite?

No.

Need to study the gdb build for this target.  It looks like it should
support python and no errors are generated with the .gdbinit file.

I can see that there might be a problem with my 64-bit version
of gdb as I don't have a 64-bit build of python.

Dave
--
John David Anglin	dave.anglin@bell.net
Comment 4 Benjamin Kosnik 2012-02-02 20:17:02 UTC

> > do the printers ever work, outside the testsuite?
> 
> No.

Well then, then need to be disabled. 

dg-require-prettyprinters

Should be developed and all the failing pretty printing tests should use it.
Comment 5 dave.anglin 2012-02-02 20:41:07 UTC
On 2/2/2012 3:17 PM, bkoz at gcc dot gnu.org wrote:
>>> do the printers ever work, outside the testsuite?
>> >  
>> >  No.
> Well then, then need to be disabled.
At the moment, I'm not sure where the problem lies.  My python version 
might be too
old.  I know most prettyprinter tests in the gdb suite fail on 32-bit 
hpux.  My gdb is
current cvs source.
Comment 6 Benjamin Kosnik 2012-02-15 20:20:24 UTC
what's the python version you are using that is not working?

I am using 2.7.2
Comment 7 dave.anglin 2012-02-16 00:28:25 UTC
On 15-Feb-12, at 3:20 PM, bkoz at gcc dot gnu.org wrote:

> what's the python version you are using that is not working?


It's 2.4.2.  If I get a chance, I'll try an update it this weekend.

Dave
--
John David Anglin	dave.anglin@bell.net
Comment 8 John David Anglin 2012-02-21 15:20:06 UTC
Resolved by upgrading to python 2.7.2 and rebuilding gdb.