> On Oct 9, 2014, at 3:53 AM, Matthew Gardiner <m...@csr.com> wrote:
> 
> Hi,
> 
> I'm starting to play with the C++ API some more. I'm looking at target
> creation on the SBDebugger class:
> 
>    lldb::SBTarget
>    CreateTarget (const char *filename,
>                  const char *target_triple,
>                  const char *platform_name,
>                  bool add_dependent_modules,
>                  lldb::SBError& error);
> 
>    lldb::SBTarget
>    CreateTargetWithFileAndTargetTriple (const char *filename,
>                                         const char *target_triple);
> 
>    lldb::SBTarget
>    CreateTargetWithFileAndArch (const char *filename,
>                                 const char *archname);
> 
>    lldb::SBTarget
>    CreateTarget (const char *filename);
> 
> Out of the 4 methods of target creation, why has only one function got a
> mechanism to pass back an error?
> 
> How can I use the remaining 3 functions without such a scheme?

You should always use the first one that has the error. The other 3 that take 
less args were there before this first one and are there for legacy reasons. 
Just pass NULL (C++) or None (Python) for anything that you don't want to 
specify. We should mark the other three as deprecated. The test suite uses 
these all over the place which we can/should fix to use the first.

Greg
_______________________________________________
lldb-dev mailing list
lldb-dev@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev

Reply via email to