[Lldb-commits] [PATCH] D22863: Improve code of loading plugins that provide cmnds
Pavel Labath via lldb-commits
lldb-commits at lists.llvm.org
Thu Jul 28 03:15:47 PDT 2016
labath added a subscriber: labath.
================
Comment at: include/lldb/API/SBCommandInterpreter.h:141-142
@@ -140,4 +140,4 @@
lldb::SBCommand
- AddCommand (const char* name, lldb::SBCommandPluginInterface *impl, const char* help);
+ AddCommand (const char* name, lldb::SBCommandPluginInterface *impl, const char* help, const char* syntax);
----------------
abhishek.aggarwal wrote:
> clayborg wrote:
> > You can't change public API, you can only add to it. Just add another function with syntax and leave the other one alone.
> After reading your review, I suggest to keep the following prototype of this function:
>
> AddCommand (const char* name, lldb::SBCommandPluginInterface *impl, const char* help, const char* syntax = nullptr);
>
> This will not break anyone's plugins written with old version of lldb shared library as syntax will be an optional argument.
> This way, we will not need to add another API in this class thereby keeping the public APIs as minimal as possible and complete at the same time.
>
> Please let me know if this fits our public API development conditions. Else I will add another variant of AddCommand API with syntax argument.
We are trying to maintain binary compatibility. So, while your proposal maintains source-code level compatibilty, it will still break precompiled binaries, as the mangled function name changes.
</drive-by>
https://reviews.llvm.org/D22863
More information about the lldb-commits
mailing list