[Lldb-commits] [lldb] r219102 - Call SBDebugger::Initialize/Terminate from within Create/Destroy.

Matthew Gardiner mg11 at csr.com
Mon Oct 6 22:19:32 PDT 2014


Sorry about that Ed.

The change caused no problem against the suite on linux. I made the
change as it seemed unnecessary to require:

SBDebugger::Initialize
AND
SBDebugger::Create

and similarly

SBDebugger::Terminate
AND
SBDebugger::Destroy

I did post about making this simple change to lldb-dev last week:

http://lists.cs.uiuc.edu/pipermail/lldb-dev/2014-October/005438.html


I'd like to make a couple of future additions to the SB API at some
stage. I'll raise a review when I do these and add you.

Matt 


On Mon, 2014-10-06 at 09:52 -0400, Ed Maste wrote:
> On 6 October 2014 01:22, Matthew Gardiner <mg11 at csr.com> wrote:
> > Author: mg11
> > Date: Mon Oct  6 00:22:29 2014
> > New Revision: 219102
> >
> > URL: http://llvm.org/viewvc/llvm-project?rev=219102&view=rev
> > Log:
> > Call SBDebugger::Initialize/Terminate from within Create/Destroy.
> >
> > The above change permits developers using the lldb C++ API to
> > code applications in a more logical manner.
> 
> I've reverted this change because it caused a large number of tests to
> segfault in Python, like so:
> 
> * thread #1: tid = 0, 0x00000000004a0b1b python2.7`??? + 267, name =
> 'python2.7', stop reason = signal SIGSEGV
>   * frame #0: 0x00000000004a0b1b python2.7`??? + 267
>     frame #1: 0x00000000004a0bbc python2.7`PyGILState_Ensure + 76
>     frame #2: 0x00000008063d6b79
> _lldb.so`lldb_private::ScriptInterpreterPython::Locker::DoAcquireLock()
> + 41
>     frame #3: 0x00000008063d6aec
> _lldb.so`lldb_private::ScriptInterpreterPython::Locker::Locker(lldb_private::ScriptInterpreterPython*,
> unsigned short, unsigned short, __sFILE*, __sFILE*, __sFILE*) + 124
>     frame #4: 0x00000008063e30cf
> _lldb.so`lldb_private::ScriptInterpreterPython::Clear() + 79
>     frame #5: 0x0000000806366e28
> _lldb.so`lldb_private::CommandInterpreter::Clear() + 408
>     frame #6: 0x0000000806186bef _lldb.so`lldb_private::Debugger::Clear() + 623
>     frame #7: 0x00000008061885b5
> _lldb.so`lldb_private::Debugger::~Debugger() + 53
>     frame #8: 0x0000000806188569
> _lldb.so`lldb_private::Debugger::~Debugger() + 25
>     frame #9: 0x00000008061a179c
> _lldb.so`std::__1::__shared_ptr_pointer<lldb_private::Debugger*,
> std::__1::default_delete<lldb_private::Debugger>,
> std::__1::allocator<lldb_private::Debugger> >::__on_zero_shared() +
> 156
>     frame #10: 0x000000080abf8bbc
> libc++.so.1`std::__1::__shared_weak_count::__release_shared()
> [inlined] std::__1::__shared_count::__release_shared(this=0x0000000804262ac0)
> + 44 at memory.cpp:61
>     frame #11: 0x000000080abf8ba8
> libc++.so.1`std::__1::__shared_weak_count::__release_shared(this=0x0000000804262ac0)
> + 24 at memory.cpp:86
>     frame #12: 0x0000000806199ecf
> _lldb.so`std::__1::shared_ptr<lldb_private::Debugger>::~shared_ptr() +
> 47
>     frame #13: 0x00000008061aca51
> _lldb.so`std::__1::__vector_base<std::__1::shared_ptr<lldb_private::Debugger>,
> std::__1::allocator<std::__1::shared_ptr<lldb_private::Debugger> >
> >::~__vector_base() + 273
>     frame #14: 0x00000008061ac935
> _lldb.so`std::__1::vector<std::__1::shared_ptr<lldb_private::Debugger>,
> std::__1::allocator<std::__1::shared_ptr<lldb_private::Debugger> >
> >::~vector() + 21
>     frame #15: 0x00000008012d4610
> libc.so.7`__cxa_finalize(dso=0x0000000000000000) + 320 at atexit.c:198
>     frame #16: 0x00000008012760cc libc.so.7`exit(status=0) + 28 at exit.c:67
>     frame #17: 0x0000000000414025 python2.7`_start + 149
> 
> Bot link: http://llvm-amd64.freebsd.your.org/b/builders/lldb-amd64-freebsd/builds/2675
> 
> 
>  To report this email as spam click https://www.mailcontrol.com/sr/MZbqvYs5QwJvpeaetUwhCQ== .




Member of the CSR plc group of companies. CSR plc registered in England and Wales, registered number 4187346, registered office Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, United Kingdom
More information can be found at www.csr.com. Keep up to date with CSR on our technical blog, www.csr.com/blog, CSR people blog, www.csr.com/people, YouTube, www.youtube.com/user/CSRplc, Facebook, www.facebook.com/pages/CSR/191038434253534, or follow us on Twitter at www.twitter.com/CSR_plc.
New for 2014, you can now access the wide range of products powered by aptX at www.aptx.com.



More information about the lldb-commits mailing list