[lldb-dev] rev119757

Greg Clayton gclayton at apple.com
Mon Nov 22 13:30:18 PST 2010


Yes, there is a static initialize call you must use:

int main (int argc, char const *argv[])
{
    SBDebugger::Initialize ();

    // Create scope so "debugger" goes away before we call SBDebugger::Terminate()...
    {
	SBDebugger debugger (SBDebugger::Create());
	....
    }

    SBDebugger::Terminate ();
}


If you are even in doubt, check out the main function in "Driver.cpp" (which is part of the command line application "lldb").


On Nov 22, 2010, at 5:00 AM, Arvid Ephraim Picciani wrote:

> since revision 119757 (according to git bisect) i am getting this crash 
> on my side.
> any idea what i"m doing wrong? do i have to initialize something before 
> calling SBDebugger::Create  ?
> 
> 
> #0  0x00007fff800096d7 in pthread_mutex_lock ()
> #1  0x00000001003292bf in 
> lldb_private::UserSettingsController::RegisterInstanceSettings 
> (this=0x0, instance_settings=0x103803210) at 
> /Users/aep/creator-master/src/plugins/debugger/lldb/guest/lldb/source/Core/UserSettingsController.cpp:940
> #2  0x0000000100289c62 in 
> lldb_private::DebuggerInstanceSettings::DebuggerInstanceSettings 
> (this=0x103803210, owner=@0x7fff5fbff340, live_instance=<value 
> temporarily unavailable, due to optimizations>, name=<value temporarily 
> unavailable, due to optimizations>) at 
> /Users/aep/creator-master/src/plugins/debugger/lldb/guest/lldb/source/Core/Debugger.cpp:1301
> #3  0x000000010028b697 in lldb_private::Debugger::Debugger 
> (this=0x103803200) at 
> /Users/aep/creator-master/src/plugins/debugger/lldb/guest/lldb/source/Core/Debugger.cpp:179
> #4  0x000000010028b948 in Debugger [inlined] () at 
> /Users/aep/creator-master/src/plugins/debugger/lldb/guest/lldb/source/Core/Debugger.cpp:182
> #5  0x000000010028b948 in lldb_private::Debugger::CreateInstance () at 
> /Users/aep/creator-master/src/plugins/debugger/lldb/guest/lldb/source/Core/Debugger.cpp:101
> #6  0x000000010030c1ac in lldb::SBDebugger::reset () at 
> /Users/aep/creator-master/src/plugins/debugger/lldb/guest/lldb/source/API/SBDebugger.cpp:71
> #7  0x000000010030c1ac in lldb::SBDebugger::Create () at 
> /Users/aep/creator-master/src/plugins/debugger/lldb/guest/lldb/source/API/SBDebugger.cpp:71
> _______________________________________________
> lldb-dev mailing list
> lldb-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev





More information about the lldb-dev mailing list