[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi] Unable to use gdb
From: |
Greg Chicares |
Subject: |
[lmi] Unable to use gdb |
Date: |
Fri, 09 Dec 2005 00:58:08 +0000 |
User-agent: |
Mozilla Thunderbird 1.0.2 (Windows/20050317) |
Vadim--Do you have any idea how I might attack this problem?
I'm using wx-2.5.4, MinGW gcc-3.4.2, and lmi current cvs HEAD.
When I run this outside of gdb, it seems to work OK.
Running it in gdb is another story:
C:/opt/lmi/bin[3]$/MinGW-20050120/bin/gdb ./lmi_wx_shared
GNU gdb 6.3
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i686-pc-mingw32"...
(gdb) set arg --ash_nazg --data_path=../data
(gdb) r
The application never seemed to start. This happened immediately:
[snip a lot of stuff...]
ContinueDebugEvent (cpid=2796, ctid=2632, DBG_CONTINUE);
gdb: kernel event for pid=2796 tid=2632 code=EXCEPTION_DEBUG_EVENT)
gdb: Target exception EXCEPTION_BREAKPOINT at 0x77f75a58
Program received signal SIGTRAP, Trace/breakpoint trap.
0x77f75a59 in ntdll!DbgUiConnectToDbg () from ntdll.dll
(gdb) bt
[snip a lot of stuff...]
#35 0x00000001 in ?? ()
#36 0x005297a0 in _data_end__ ()
#37 0xffffffff in ?? ()
Clearly this is garbage, so I snipped everything above it.
#38 0x0045fce0 in check_exception_spec ()
at C:/usr/local/include/wx/event.h:2143
#39 0x004604d5 in operator delete () at C:/usr/local/include/wx/event.h:2143
/usr/local/include/wx/event.h:2143 is in a ctor:
2137 wxEventTableEntryBase(int winid, int idLast,
2138 wxObjectEventFunction fn, wxObject *data)
2139 : m_id(winid),
2140 m_lastId(idLast),
2141 m_fn(fn),
2142 m_callbackUserData(data)
2143 { }
#40 0x005005e0 in std::string::_Rep::_M_destroy ()
at
/MinGW-20050120//bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4
.2/bits/basic_string.h:198
#41 0x005012af in std::string::assign ()
at
/MinGW-20050120//bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4
.2/bits/basic_string.h:198
#42 0x0044ca54 in Skeleton::Skeleton (this=0x3c723a0)
at
/MinGW-20050120//bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4
.2/bits/basic_string.h:423
/MinGW-20050120/include/c++/3.4.2/bits/basic_string.h :
110 class basic_string
196 _CharT*
197 _M_refdata() throw()
198 { return reinterpret_cast<_CharT*>(this + 1); }
420 basic_string&
421 operator=(const basic_string& __str)
422 {
423 this->assign(__str);
424 return *this;
425 }
#43 0x0044cd34 in wxCreateApp () at C:/lmi/src/lmi/main_wx.cpp:80
80 IMPLEMENT_APP_NO_MAIN(Skeleton)
81 IMPLEMENT_WX_THEME_SUPPORT
#44 0x1003bcbd in wxEntryStart (address@hidden, argv=0x3c72248)
at ../../src/common/init.cpp:249
#45 0x1003c108 in wxEntryReal (address@hidden, argv=0x3c72248)
at ../../src/common/init.cpp:386
223 bool wxEntryStart(int& argc, wxChar **argv)
224 {
235 // first of all, we need an application object
236 // -------------------------------------------
237
238 // the user might have already created it himself somehow
239 wxAppPtr app(wxTheApp);
240 if ( !app.get() )
241 {
242 // if not, he might have used IMPLEMENT_APP() to give us a
function to
243 // create it
244 wxAppInitializerFunction fnCreate =
wxApp::GetInitializerFunction();
245
246 if ( fnCreate )
247 {
248 // he did, try to create the custom wxApp object
249 app.Set((*fnCreate)());
250 }
#46 0x100a13e8 in wxEntry (address@hidden, argv=0x3c72248)
at ../../src/msw/main.cpp:244
240 int wxEntry(int& argc, wxChar **argv)
241 {
242 DisableAutomaticSETranslator();
243
244 return wxEntryReal(argc, argv);
245 }
#47 0x100a15ac in wxEntry (hInstance=0x400000, nCmdShow=10)
at ../../src/msw/main.cpp:296
257 WXDLLEXPORT int wxEntry(HINSTANCE hInstance,
258 HINSTANCE WXUNUSED(hPrevInstance),
259 wxCmdLineArgType WXUNUSED(pCmdLine),
260 int nCmdShow)
261 {
296 return wxEntry(argc, argv);
#48 0x0044d69a in WinMain (hInstance=0x400000, hPrevInstance=0x0,
lpCmdLine=0x251f03 "--ash_nazg --data_path=../data", nCmdShow=10)
at C:/lmi/src/lmi/main_wx.cpp:186
173 bool wxHandleFatalExceptions(bool doit)
174 {
175 // assume this can only be called from the main thread
176 gs_handleExceptions = doit;
177
178 #if wxUSE_CRASHREPORT
179 if ( doit )
180 {
181 // try to find a place where we can put out report file later
182 wxChar fullname[MAX_PATH];
183 if ( !::GetTempPath(WXSIZEOF(fullname), fullname) )
184 {
185 wxLogLastError(_T("GetTempPath"));
186
187 // when all else fails...
188 wxStrcpy(fullname, _T("c:\\"));
189 }
#49 0x0046a0ca in main () at C:/usr/local/include/wx/event.h:2143
(gdb)
49 class WXDLLIMPEXP_CORE wxWindowBase;
[it seems weird that a forward declaration appears in a stack
trace, but sometimes gdb can't find the right source line; here,
I suspect main() is in the MinGW startup code]
- [lmi] Unable to use gdb,
Greg Chicares <=