On Wed, 2009-07-08 at 09:41 +0100, Dave Korn wrote: > Danny Backx wrote: > > > global constructors keyed to main () at hello.C:8 > > 8 } > > Current language: auto; currently c++ > > (gdb) > > __static_initialization_and_destruction_0 (__initialize_p=1, > > __priority=65535) at hello.C:8 > > 8 } > > (gdb) > > 72 static ios_base::Init __ioinit; > > (gdb) > > Cannot access memory at address 0x4235174a > > (gdb) > > Cannot find bounds of current function > > (gdb) up > > #1 0x0040109e in _fu2___ZNSt8ios_base4InitC1Ev () > > > > at > > /opt/x86mingw32ce/lib/gcc/i386-mingw32ce/4.4.0/../../../../i386-mingw32ce/include/c++/4.4.0/iostream:72 > > 72 static ios_base::Init __ioinit; > > (gdb) fin > > Run till exit from #1 0x0040109e in _fu2___ZNSt8ios_base4InitC1Ev () > > > > at > > /opt/x86mingw32ce/lib/gcc/i386-mingw32ce/4.4.0/../../../../i386-mingw32ce/include/c++/4.4.0/iostream:72 > > > > Program received signal SIGSEGV, Segmentation fault. > > 0x4235174a in ?? () > > (gdb) bt > > #0 0x4235174a in ?? () > > #1 0x0040109e in _fu2___ZNSt8ios_base4InitC1Ev () > > at > > /opt/x86mingw32ce/lib/gcc/i386-mingw32ce/4.4.0/../../../../i386-mingw32ce/include/c++/4.4.0/iostream:72 > > > Hmmpf. Maybe a linker bug is mangling that auto-import fixup somehow. > > What does "disass 0x401000 0x4010af" show? > > cheers, > DaveK
pavilion: {35} i386-mingw32ce-gdb hello2.exe GNU gdb 6.8 Copyright (C) 2008 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "--host=i686-pc-linux-gnu --target=i386-mingw32ce"... (gdb) target remote ebox:9999 Remote debugging using ebox:9999 [New Thread 92536850] Error while mapping shared library sections: \network\x86\libgcc_s_sjlj-1.dll: No such file or directory. Error while mapping shared library sections: li: No such file or directory. Error while mapping shared library sections: \Windows\coredll.dll: No such file or directory. Symbol file not found for \network\x86\libgcc_s_sjlj-1.dll Symbol file not found for li Symbol file not found for \Windows\coredll.dll WinMainCRTStartup (hInst=0x5830012, hPrevInst=0x0, lpCmdLine=0xe01fc70, nCmdShow=5) at /home/danny/src/cegcc/svn.sf.net/cegcc/trunk/cegcc/src/mingw/crt3.c:35 35 { Current language: auto; currently c (gdb) s 41 _fpreset (); /* Supplied by the runtime library. */ (gdb) 44 _pei386_runtime_relocator (); (gdb) _pei386_runtime_relocator () at /home/danny/src/cegcc/svn.sf.net/cegcc/trunk/cegcc/src/mingw/pseudo-reloc.c:33 33 for (r = (runtime_pseudo_reloc*) start; r < (runtime_pseudo_reloc*) end; r++) (gdb) 46 } (gdb) WinMainCRTStartup (hInst=0x5830012, hPrevInst=0x0, lpCmdLine=0xe01fc70, nCmdShow=5) at /home/danny/src/cegcc/svn.sf.net/cegcc/trunk/cegcc/src/mingw/crt3.c:49 49 __atexit_init(); (gdb) disass 0x401000 0x4010af Dump of assembler code from 0x401000 to 0x4010af: 0x00401000 <WinMainCRTStartup+0>: push %ebp 0x00401001 <WinMainCRTStartup+1>: mov %esp,%ebp 0x00401003 <WinMainCRTStartup+3>: push %ebx 0x00401004 <WinMainCRTStartup+4>: sub $0x14,%esp 0x00401007 <WinMainCRTStartup+7>: call 0x40162c <_fpreset> 0x0040100c <WinMainCRTStartup+12>: call 0x4010f4 <_pei386_runtime_relocator> 0x00401011 <WinMainCRTStartup+17>: call 0x4012a0 <__atexit_init> 0x00401016 <WinMainCRTStartup+22>: call 0x401354 <__gccmain> 0x0040101b <WinMainCRTStartup+27>: mov 0x14(%ebp),%eax 0x0040101e <WinMainCRTStartup+30>: mov %eax,0xc(%esp) 0x00401022 <WinMainCRTStartup+34>: mov 0x10(%ebp),%eax 0x00401025 <WinMainCRTStartup+37>: mov %eax,0x8(%esp) 0x00401029 <WinMainCRTStartup+41>: mov 0xc(%ebp),%eax 0x0040102c <WinMainCRTStartup+44>: mov %eax,0x4(%esp) 0x00401030 <WinMainCRTStartup+48>: mov 0x8(%ebp),%eax 0x00401033 <WinMainCRTStartup+51>: mov %eax,(%esp) 0x00401036 <WinMainCRTStartup+54>: call 0x401600 <WinMain> 0x0040103b <WinMainCRTStartup+59>: mov %eax,%ebx 0x0040103d <WinMainCRTStartup+61>: call 0x40126c <_cexit> 0x00401042 <WinMainCRTStartup+66>: mov %ebx,0x4(%esp) 0x00401046 <WinMainCRTStartup+70>: movl $0x42,(%esp) 0x0040104d <WinMainCRTStartup+77>: call 0x401634 <TerminateProcess> 0x00401052 <WinMainCRTStartup+82>: jmp 0x401052 <WinMainCRTStartup+82> 0x00401054 <main+0>: push %ebp 0x00401055 <main+1>: mov %esp,%ebp 0x00401057 <main+3>: and $0xfffffff0,%esp 0x0040105a <main+6>: sub $0x10,%esp 0x0040105d <main+9>: call 0x401354 <__gccmain> 0x00401062 <main+14>: movl $0x402004,0x4(%esp) 0x0040106a <main+22>: movl $0x41f6c160,(%esp) 0x00401071 <_fu0___ZSt4cout+4>: call 0x4235c492 0x00401076 <_fu1___ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc+4>: mov $0x0,%eax 0x0040107b <_fu1___ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc+9>: leave 0x0040107c <_fu1___ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc+10>: ret 0x0040107d <__static_initialization_and_destruction_0+0>: push % ebp 0x0040107e <__static_initialization_and_destruction_0+1>: mov % esp,%ebp 0x00401080 <__static_initialization_and_destruction_0+3>: sub $0x18,%esp 0x00401083 <__static_initialization_and_destruction_0+6>: cmpl $0x1,0x8(%ebp) 0x00401087 <__static_initialization_and_destruction_0+10>: jne 0x40109e <_fu2___ZNSt8ios_base4InitC1Ev+4> 0x00401089 <__static_initialization_and_destruction_0+12>: cmpl $0xffff,0xc(%ebp) 0x00401090 <__static_initialization_and_destruction_0+19>: jne 0x40109e <_fu2___ZNSt8ios_base4InitC1Ev+4> 0x00401092 <__static_initialization_and_destruction_0+21>: movl $0x403000,(%esp) 0x00401099 <__static_initialization_and_destruction_0+28>: call 0x4235174a 0x0040109e <_fu2___ZNSt8ios_base4InitC1Ev+4>: cmpl $0x0,0x8(%ebp) 0x004010a2 <_fu2___ZNSt8ios_base4InitC1Ev+8>: jne 0x4010b9 <_fu3___ZNSt8ios_base4InitD1Ev+4> 0x004010a4 <_fu2___ZNSt8ios_base4InitC1Ev+10>: cmpl $0xffff,0xc(%ebp) ---Type <return> to continue, or q <return> to quit--- 0x004010ab <_fu2___ZNSt8ios_base4InitC1Ev+17>: jne 0x4010b9 <_fu3___ZNSt8ios_base4InitD1Ev+4> 0x004010ad <_fu2___ZNSt8ios_base4InitC1Ev+19>: movl $0x403000,(%esp) End of assembler dump. (gdb) s __atexit_init () at /home/danny/src/cegcc/svn.sf.net/cegcc/trunk/cegcc/src/mingw/atexit.c:65 65 first_atexit = (p_atexit_fn*) malloc (32 * sizeof (p_atexit_fn)); (gdb) 66 if (first_atexit == NULL ) /* can't allocate memory */ (gdb) 73 *first_atexit = NULL; (gdb) 74 next_atexit = first_atexit; (gdb) 76 } (gdb) WinMainCRTStartup (hInst=0x5830012, hPrevInst=0x0, lpCmdLine=0xe01fc70, nCmdShow=5) at /home/danny/src/cegcc/svn.sf.net/cegcc/trunk/cegcc/src/mingw/crt3.c:54 54 __gccmain(); (gdb) s __gccmain () at /home/danny/src/cegcc/svn.sf.net/cegcc/trunk/cegcc/src/mingw/gccmain.c:79 79 if (!initialized) (gdb) 81 initialized = 1; (gdb) 86 } (gdb) __gccmain () at /home/danny/src/cegcc/svn.sf.net/cegcc/trunk/cegcc/src/mingw/gccmain.c:83 83 __mingw_do_global_ctors (); (gdb) __mingw_do_global_ctors () at /home/danny/src/cegcc/svn.sf.net/cegcc/trunk/cegcc/src/mingw/gccmain.c:40 40 { (gdb) 41 unsigned long nptrs = (unsigned long) __CTOR_LIST__[0]; (gdb) 49 if (nptrs == -1) (gdb) 58 for (i = nptrs; i >= 1; i--) (gdb) 60 __CTOR_LIST__[i] (); (gdb) global constructors keyed to main () at hello.C:8 8 } Current language: auto; currently c++ (gdb) __static_initialization_and_destruction_0 (__initialize_p=1, __priority=65535) at hello.C:8 8 } (gdb) 72 static ios_base::Init __ioinit; (gdb) Cannot access memory at address 0x4235174a (gdb) Cannot find bounds of current function (gdb) -- Danny Backx ; danny.backx - at - scarlet.be ; http://danny.backx.info ------------------------------------------------------------------------------ Enter the BlackBerry Developer Challenge This is your chance to win up to $100,000 in prizes! For a limited time, vendors submitting new applications to BlackBerry App World(TM) will have the opportunity to enter the BlackBerry Developer Challenge. See full prize details at: http://p.sf.net/sfu/Challenge _______________________________________________ Cegcc-devel mailing list Cegcc-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/cegcc-devel