[Lldb-commits] [lldb] r240435 - Mark SBFrame::GetFunctionName and SBFrame::IsInlined as const.

Jim Ingham jingham at apple.com
Wed Jun 24 09:54:05 PDT 2015


Pavel is right.  Our agreement was we wouldn't take anything AWAY from the SB API's.  If you want to add a const version, you have to add one, not change an existing API.

Jim

> On Jun 24, 2015, at 12:43 AM, Pavel Labath <labath at google.com> wrote:
> 
> Hi,
> 
> how will this affect the stability of the SB interface? I had a
> feeling we were trying to maintain backward compatibility
> <http://lldb.llvm.org/SB-api-coding-rules.html>? I think a more
> backward compatible solution would be to introduce a new const method
> if you need it and leave the old one intact.
> 
> pl
> 
> On 23 June 2015 at 19:21, Oleksiy Vyalov <ovyalov at google.com> wrote:
>> Author: ovyalov
>> Date: Tue Jun 23 13:21:55 2015
>> New Revision: 240435
>> 
>> URL: http://llvm.org/viewvc/llvm-project?rev=240435&view=rev
>> Log:
>> Mark SBFrame::GetFunctionName and SBFrame::IsInlined as const.
>> 
>> Modified:
>>    lldb/trunk/include/lldb/API/SBFrame.h
>>    lldb/trunk/scripts/interface/SBFrame.i
>>    lldb/trunk/source/API/SBFrame.cpp
>> 
>> Modified: lldb/trunk/include/lldb/API/SBFrame.h
>> URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBFrame.h?rev=240435&r1=240434&r2=240435&view=diff
>> ==============================================================================
>> --- lldb/trunk/include/lldb/API/SBFrame.h (original)
>> +++ lldb/trunk/include/lldb/API/SBFrame.h Tue Jun 23 13:21:55 2015
>> @@ -89,18 +89,18 @@ public:
>>     ///
>>     /// See also IsInlined().
>>     const char *
>> -    GetFunctionName();
>> +    GetFunctionName() const;
>> 
>>     /// Return true if this frame represents an inlined function.
>>     ///
>>     /// See also GetFunctionName().
>>     bool
>> -    IsInlined();
>> +    IsInlined() const;
>> 
>>     /// The version that doesn't supply a 'use_dynamic' value will use the
>>     /// target's default.
>>     lldb::SBValue
>> -    EvaluateExpression (const char *expr);
>> +    EvaluateExpression (const char *expr);
>> 
>>     lldb::SBValue
>>     EvaluateExpression (const char *expr, lldb::DynamicValueType use_dynamic);
>> 
>> Modified: lldb/trunk/scripts/interface/SBFrame.i
>> URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/interface/SBFrame.i?rev=240435&r1=240434&r2=240435&view=diff
>> ==============================================================================
>> --- lldb/trunk/scripts/interface/SBFrame.i (original)
>> +++ lldb/trunk/scripts/interface/SBFrame.i Tue Jun 23 13:21:55 2015
>> @@ -126,7 +126,7 @@ public:
>>     /// See also IsInlined().
>>     ") GetFunctionName;
>>     const char *
>> -    GetFunctionName();
>> +    GetFunctionName() const;
>> 
>>     %feature("docstring", "
>>     /// Return true if this frame represents an inlined function.
>> @@ -134,7 +134,7 @@ public:
>>     /// See also GetFunctionName().
>>     ") IsInlined;
>>     bool
>> -    IsInlined();
>> +    IsInlined() const;
>> 
>>     %feature("docstring", "
>>     /// The version that doesn't supply a 'use_dynamic' value will use the
>> 
>> Modified: lldb/trunk/source/API/SBFrame.cpp
>> URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBFrame.cpp?rev=240435&r1=240434&r2=240435&view=diff
>> ==============================================================================
>> --- lldb/trunk/source/API/SBFrame.cpp (original)
>> +++ lldb/trunk/source/API/SBFrame.cpp Tue Jun 23 13:21:55 2015
>> @@ -1499,7 +1499,7 @@ SBFrame::EvaluateExpression (const char
>> }
>> 
>> bool
>> -SBFrame::IsInlined()
>> +SBFrame::IsInlined() const
>> {
>>     Log *log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
>>     ExecutionContext exe_ctx(m_opaque_sp.get());
>> @@ -1536,7 +1536,7 @@ SBFrame::IsInlined()
>> }
>> 
>> const char *
>> -SBFrame::GetFunctionName()
>> +SBFrame::GetFunctionName() const
>> {
>>     Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
>>     const char *name = NULL;
>> 
>> 
>> _______________________________________________
>> lldb-commits mailing list
>> lldb-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits
> _______________________________________________
> lldb-commits mailing list
> lldb-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits





More information about the lldb-commits mailing list