[Lldb-commits] [lldb] r240660 - Add const versions of SBFrame::GetFunctionName and SBFrame::IsInlined.

Oleksiy Vyalov ovyalov at google.com
Thu Jun 25 10:41:41 PDT 2015


Author: ovyalov
Date: Thu Jun 25 12:41:41 2015
New Revision: 240660

URL: http://llvm.org/viewvc/llvm-project?rev=240660&view=rev
Log:
Add const versions of SBFrame::GetFunctionName and SBFrame::IsInlined.

http://reviews.llvm.org/D10711


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=240660&r1=240659&r2=240660&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBFrame.h (original)
+++ lldb/trunk/include/lldb/API/SBFrame.h Thu Jun 25 12:41:41 2015
@@ -91,12 +91,18 @@ public:
     const char *
     GetFunctionName();
 
+    const char *
+    GetFunctionName() const;
+
     /// Return true if this frame represents an inlined function.
     ///
     /// See also GetFunctionName().
     bool
     IsInlined();
-    
+
+    bool
+    IsInlined() const;
+
     /// The version that doesn't supply a 'use_dynamic' value will use the
     /// target's default.
     lldb::SBValue

Modified: lldb/trunk/scripts/interface/SBFrame.i
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/interface/SBFrame.i?rev=240660&r1=240659&r2=240660&view=diff
==============================================================================
--- lldb/trunk/scripts/interface/SBFrame.i (original)
+++ lldb/trunk/scripts/interface/SBFrame.i Thu Jun 25 12:41:41 2015
@@ -128,6 +128,9 @@ public:
     const char *
     GetFunctionName();
 
+    const char *
+    GetFunctionName() const;
+
     %feature("docstring", "
     /// Return true if this frame represents an inlined function.
     ///
@@ -135,7 +138,10 @@ public:
     ") IsInlined;
     bool
     IsInlined();
-    
+
+    bool
+    IsInlined() const;
+
     %feature("docstring", "
     /// The version that doesn't supply a 'use_dynamic' value will use the
     /// target's default.

Modified: lldb/trunk/source/API/SBFrame.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBFrame.cpp?rev=240660&r1=240659&r2=240660&view=diff
==============================================================================
--- lldb/trunk/source/API/SBFrame.cpp (original)
+++ lldb/trunk/source/API/SBFrame.cpp Thu Jun 25 12:41:41 2015
@@ -1501,6 +1501,12 @@ SBFrame::EvaluateExpression (const char
 bool
 SBFrame::IsInlined()
 {
+    return static_cast<const SBFrame*>(this)->IsInlined();
+}
+
+bool
+SBFrame::IsInlined() const
+{
     Log *log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
     ExecutionContext exe_ctx(m_opaque_sp.get());
     StackFrame *frame = NULL;
@@ -1538,6 +1544,12 @@ SBFrame::IsInlined()
 const char *
 SBFrame::GetFunctionName()
 {
+    return static_cast<const SBFrame*>(this)->GetFunctionName();
+}
+
+const char *
+SBFrame::GetFunctionName() const
+{
     Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
     const char *name = NULL;
     ExecutionContext exe_ctx(m_opaque_sp.get());
@@ -1590,4 +1602,3 @@ SBFrame::GetFunctionName()
     }
     return name;
 }
-





More information about the lldb-commits mailing list