This is the mail archive of the
libstdc++@sourceware.cygnus.com
mailing list for the libstdc++ project.
RE: vector/algorithm breaks iostream?
- To: libstdc++@sourceware.cygnus.com
- Subject: RE: vector/algorithm breaks iostream?
- From: "Edwards, Phil" <pedwards@ball.com>
- Date: Sun, 23 May 1999 15:44:43 -0600
+ Odd. Can you look at
+
+ libstdc++/std/iostream
+
+ and see if there is an __ioinit object in it? If so, your
+ sources are not up to date.
Nope, it's been removed.
+ Right. You can just do this in gdb:
Aw, but I've fallen in love with DDD's vertex/edge graphing of data...
+ print *__ioinit._M_cerr._M_file
Didn't work. I checked out a brand new CVS repository just now and
built hello-world, then ran it through gdb. The build (with -H to show
the include file tree) and the gdb session is captured in a script(1)
below.
_M_cerr is still NULL, even though the _M_ios_base_init is 5.
+ Could your include paths be mixed up? Or are you taking
+ headers from an old
+ install directory? Try building, then do a "make check" in your build
+ directory. After that's built up all the exe's, try running
+ iostream_objects.st-exe. You should get something like this:
With the same new build, I get
[skylab 37]> ./iostream_objects.st-exe
[skylab 38]> echo $status
0
[skylab 39]>
The #!/usr/unsupported/bin/bash in mkcheck gave me some really good
error messages, though, until I tracked it down. :-)
I will continue to play with the problem.
Phil
(If you reply to the list, please don't cc another copy to me. Thanks.)
Script started on Sun May 23 17:19:14 1999
[skylab 2]> g++ -I$HOME/3/include/g++-v3 -L$HOME/3/lib -ggdb -H ~/src/hw.cc
/home/pedwards/3/include/g++-v3/iostream
/home/pedwards/3/include/g++-v3/bits/std_iostream.h
/home/pedwards/3/include/g++-v3/bits/c++config.h
/home/pedwards/3/include/g++-v3/bits/std_ostream.h
/home/pedwards/3/include/g++-v3/bits/std_ios.h
/home/pedwards/3/include/g++-v3/bits/std_iosfwd.h
/home/pedwards/3/include/g++-v3/bits/std_cwchar.h
/usr/include/wchar.h
/usr/include/features.h
/usr/include/sys/cdefs.h
/usr/include/features.h
/usr/include/gnu/stubs.h
/home/pedwards/EGCS/lib/gcc-lib/i586-pc-linux-gnu/egcs-2.93.21/include/stdde
f.h
/usr/include/libio.h
/usr/include/_G_config.h
/home/pedwards/EGCS/lib/gcc-lib/i586-pc-linux-gnu/egcs-2.93.21/include/gnu/t
ypes.h
/usr/include/gnu/types.h
/home/pedwards/EGCS/lib/gcc-lib/i586-pc-linux-gnu/egcs-2.93.21/include/stdde
f.h
/home/pedwards/EGCS/lib/gcc-lib/i586-pc-linux-gnu/egcs-2.93.21/include/stdar
g.h
/home/pedwards/3/include/g++-v3/bits/char_traits.h
/home/pedwards/3/include/g++-v3/bits/std_cstring.h
/usr/include/string.h
/home/pedwards/EGCS/lib/gcc-lib/i586-pc-linux-gnu/egcs-2.93.21/include/stdde
f.h
/home/pedwards/3/include/g++-v3/bits/fpos.h
/home/pedwards/3/include/g++-v3/bits/std_exception.h
/home/pedwards/EGCS/lib/gcc-lib/i586-pc-linux-gnu/egcs-2.93.21/include/excep
tion
/home/pedwards/3/include/g++-v3/bits/stl_string_fwd.h
/home/pedwards/3/include/g++-v3/bits/stl_config.h
/home/pedwards/3/include/g++-v3/bits/std_cstddef.h
/home/pedwards/EGCS/lib/gcc-lib/i586-pc-linux-gnu/egcs-2.93.21/include/stdde
f.h
/home/pedwards/3/include/g++-v3/bits/stl_alloc.h
/home/pedwards/3/include/g++-v3/bits/std_new.h
/home/pedwards/EGCS/lib/gcc-lib/i586-pc-linux-gnu/egcs-2.93.21/include/new
/home/pedwards/EGCS/lib/gcc-lib/i586-pc-linux-gnu/egcs-2.93.21/include/stdde
f.h
/home/pedwards/3/include/g++-v3/exception
/home/pedwards/3/include/g++-v3/bits/std_cstdlib.h
/usr/include/stdlib.h
/home/pedwards/EGCS/lib/gcc-lib/i586-pc-linux-gnu/egcs-2.93.21/include/stdde
f.h
/usr/include/sys/types.h
/usr/include/time.h
/home/pedwards/EGCS/lib/gcc-lib/i586-pc-linux-gnu/egcs-2.93.21/include/stdde
f.h
/usr/include/endian.h
/usr/include/bytesex.h
/usr/include/sys/select.h
/home/pedwards/EGCS/lib/gcc-lib/i586-pc-linux-gnu/egcs-2.93.21/include/selec
tbits.h
/usr/include/selectbits.h
/usr/include/time.h
/usr/include/alloca.h
/home/pedwards/EGCS/lib/gcc-lib/i586-pc-linux-gnu/egcs-2.93.21/include/stdde
f.h
/home/pedwards/3/include/g++-v3/bits/std_cassert.h
/usr/include/assert.h
/home/pedwards/3/include/g++-v3/bits/std_cstdio.h
/usr/include/stdio.h
/usr/include/stdio_lim.h
/home/pedwards/3/include/g++-v3/bits/localefwd.h
/home/pedwards/3/include/g++-v3/bits/std_climits.h
/home/pedwards/EGCS/lib/gcc-lib/i586-pc-linux-gnu/egcs-2.93.21/include/limit
s.h
/home/pedwards/EGCS/lib/gcc-lib/i586-pc-linux-gnu/egcs-2.93.21/include/sysli
mits.h
/home/pedwards/EGCS/lib/gcc-lib/i586-pc-linux-gnu/egcs-2.93.21/include/limit
s.h
/usr/include/limits.h
/usr/include/posix1_lim.h
/usr/include/local_lim.h
/usr/include/linux/limits.h
/usr/include/posix2_lim.h
/home/pedwards/3/include/g++-v3/bits/std_string.h
/home/pedwards/3/include/g++-v3/bits/std_iterator.h
/home/pedwards/3/include/g++-v3/bits/stl_relops.h
/home/pedwards/3/include/g++-v3/bits/stl_iterator_base.h
/home/pedwards/3/include/g++-v3/bits/stl_iterator.h
/home/pedwards/3/include/g++-v3/bits/basic_string.h
/home/pedwards/3/include/g++-v3/bits/string.tcc
/home/pedwards/3/include/g++-v3/bits/ios_base.h
/home/pedwards/3/include/g++-v3/bits/std_streambuf.h
/home/pedwards/3/include/g++-v3/bits/streambuf.tcc
/home/pedwards/3/include/g++-v3/bits/basic_ios.h
/home/pedwards/3/include/g++-v3/bits/sbuf_iter.h
/home/pedwards/3/include/g++-v3/bits/ostream.tcc
/home/pedwards/3/include/g++-v3/bits/std_locale.h
/home/pedwards/3/include/g++-v3/bits/locale_facets.h
/home/pedwards/3/include/g++-v3/bits/std_ctime.h
/usr/include/time.h
/home/pedwards/EGCS/lib/gcc-lib/i586-pc-linux-gnu/egcs-2.93.21/include/stdde
f.h
/usr/include/timebits.h
/home/pedwards/3/include/g++-v3/bits/std_typeinfo.h
/home/pedwards/EGCS/lib/gcc-lib/i586-pc-linux-gnu/egcs-2.93.21/include/typei
nfo
/home/pedwards/3/include/g++-v3/exception
/home/pedwards/3/include/g++-v3/bits/std_istream.h
/home/pedwards/3/include/g++-v3/bits/std_limits.h
/home/pedwards/3/include/g++-v3/bits/std_cfloat.h
/home/pedwards/EGCS/lib/gcc-lib/i586-pc-linux-gnu/egcs-2.93.21/include/float
.h
/home/pedwards/3/include/g++-v3/bits/istream.tcc
/home/pedwards/3/include/g++-v3/bits/std_cctype.h
/usr/include/ctype.h
[skylab 3]> ./a.out
[skylab 4]> gdb ./a.out
(gdb) break main
Breakpoint 1 at 0x804a18a: file /home/pedwards/src/hw.cc, line 6.
(gdb) run
Starting program: /home/pedwards/t/t/./a.out
Breakpoint 1, main () at /home/pedwards/src/hw.cc:6
6 std::cerr << "Hello, World!" << std::endl;
(gdb) print *__ioinit._M_cerr._M_file
Cannot access memory at address 0x2c.
(gdb) print *__ioinit._M_cerr.
Cannot access memory at address 0x0.
(gdb) quit
The program is running. Exit anyway? (y or n) y
[skylab 5]> exit
Script done on Sun May 23 17:27:38 1999