[lldb-dev] [PATCH] For SBDebugger::Create assertion failure

Matthew Gardiner mg11 at csr.com
Wed Oct 8 22:18:39 PDT 2014


Thanks Zach,

Yes, as I wrote in my reply to Greg, the issue is the scoping, since
SBDebugger::Initialise/Terminate operate on the API as a whole, not just
an SBDebugger instance.

Matt

On Wed, 2014-10-08 at 13:26 -0700, Zachary Turner wrote:
> Want to say I agree with Greg on this one, but did want to answer one
> question you had.
> 
> On Tue, Oct 7, 2014 at 10:15 PM, Matthew Gardiner <mg11 at csr.com>
> wrote:
>         On Tue, 2014-10-07 at 17:10 -0700, Greg Clayton wrote:
>         > It is quite common for shared libraries to have initialize
>         and terminate calls. We have this in LLDB.
>         
>         Agreed. Lots of libraries have to initialise resource, then
>         release the
>         resource upon terminate.
>         
>         But why have an Initialise method when you _already_ have a
>         Create
>         method? Likewise a Terminate method when you _already_ have a
>         Destroy
>         method.
>         
>         Surely when a "thing" is created that is also when it is
>         initialised?
> 
> 
> Initialize() initializes global state that is a pre-requisite for
> using *any* SBDebugger instance.  Create() creates a single instance
> of an SBDebugger, assuming that the global state has already been
> initialized.  You can have multiple SBDebuggers, but you can only
> Initialize() once.
> 
> 
>                To report this email as spam click here.
> 




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-dev mailing list