Mail Archives: djgpp/2002/11/09/07:46:28
Charles Wilkins <chas AT pcscs DOT com> wrote:
: welcome2.out
: ============================================================
: 0x00040175 __djgpp_memory_handle_size+553, file libgcc2.c
: 0x000402d2 __djgpp_memory_handle_size+902, file libgcc2.c
: 0x000314e1 std::basic_fstream<char, std::char_traits<char>
:>::basic_fstream(char const*, std::_Ios_Openmode)+113, file
: fstream-inst.cc, line 510
: 0x00002f2e std::__throw_bad_alloc()+14, file functexcept.cc
: 0x0003f528 emergency_buffer+1384, file eh_alloc.cc
: 0x0001a11f std::ostream::sentry::sentry(std::ostream&)+15, file
: ostream-inst.cc, line 99
: 0x0001a36e std::basic_ostream<char, std::char_traits<char> >&
: std::operator<< <std::char_traits<char> >(std::basic_ostream<char,
: std::char_traits<char> >&, char const*)+30, file ostream-inst.cc, line
: 624
: 0x0000167e main+36, file crt0.s
: 0x0000d1f8 __crt1_startup+176, file crt1.c
: 0x0001a11f std::ostream::sentry::sentry(std::ostream&)+15, file
: ostream-inst.cc, line 99
: 0x0001a36e std::basic_ostream<char, std::char_traits<char> >&
: std::operator<< <std::char_traits<char> >(std::basic_ostream<char,
: std::char_traits<char> >&, char const*)+30, file ostream-inst.cc, line
: 624
: 0x0000167e main+36, file crt0.s
: 0x0000d1f8 __crt1_startup+176, file crt1.c
: ss: sel=01af base=01dd0000 limit=0075ffff
: App stack: [000d6a6c..00056a6c] Exceptn stack: [000569c0..00054a80]
:
: Call frame traceback EIPs:
: 0x00040175 __djgpp_memory_handle_size+553, file libgcc2.c
: 0x000402d2 __djgpp_memory_handle_size+902, file libgcc2.c
: 0x000314e1 std::basic_fstream<char, std..+113, file
: fstream-..nst.cc, line 510
: 0x00002f2e std::__throw_bad_alloc()+14, file functexcept.cc
: 0x0003f528 emergency_buffer+1384, file eh_alloc.cc
What's this? Nevermind.
: C:\Archives\RIP2\DJGPP\bin>welcome
: Exiting due to signal SIGSEGV
: General Protection Fault at eip=0001a11f
: eax=00000000 ebx=0003eb58 ecx=0003eb58 edx=007cffa0 esi=00000054
: edi=00001630
: ebp=007cff68 esp=007cff64
: program=C:\ARCHIVES\RIP2\DJGPP\BIN\WELCOME.EXE
: cs: sel=01a7 base=01670000 limit=007dffff
: ds: sel=01af base=01670000 limit=007dffff
: es: sel=01af base=01670000 limit=007dffff
: fs: sel=017f base=00005870 limit=0000ffff
: gs: sel=01bf base=00000000 limit=0010ffff
: ss: sel=01af base=01670000 limit=007dffff
: App stack: [007d0000..00750000] Exceptn stack: [00042c88..00040d48]
:
: Call frame traceback EIPs:
: 0x0001a11f std::ostream::sentry::sentry(..+15, file ostream-inst.cc,
: line 99
: 0x0001a36e std::basic_ostream<char, std:..+30, file
: ostream-..nst.cc, line 624
: 0x0000167e main+36, file crt0.s
: 0x0000d1f8 __crt1_startup+176, file crt1.c
:
1. Note that the addresses are the same as in the symify case but now
they make much more sense. I. e. don't trust symify (right now at
least).
2. Ok. We get to main which calls some C++ output which crashes.
3. If you run out of ideas, make sure that your libstdcxx.a does
contain debug information and try to run this program in gdb to see
what's amiss. You'll probably need to copy libstdcxx.a's source files
to where your program run or add the corresponding .o or .c or .cpp
files to the link line. I don't do C++, but if it was libc's printf()
that was the problem I'd just link add printf.c to the compile line
before any libraries. Then that file might be calling other ones which
I'd need to add after the first etc.
Right,
MartinS
- Raw text -