[Lldb-commits] [lldb] r183948 - Added a SBSection::GetParent() to the API.
Greg Clayton
gclayton at apple.com
Thu Jun 13 14:23:23 PDT 2013
Author: gclayton
Date: Thu Jun 13 16:23:23 2013
New Revision: 183948
URL: http://llvm.org/viewvc/llvm-project?rev=183948&view=rev
Log:
Added a SBSection::GetParent() to the API.
Modified:
lldb/trunk/include/lldb/API/SBSection.h
lldb/trunk/scripts/Python/interface/SBSection.i
lldb/trunk/source/API/SBSection.cpp
Modified: lldb/trunk/include/lldb/API/SBSection.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBSection.h?rev=183948&r1=183947&r2=183948&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBSection.h (original)
+++ lldb/trunk/include/lldb/API/SBSection.h Thu Jun 13 16:23:23 2013
@@ -33,7 +33,10 @@ public:
const char *
GetName ();
-
+
+ lldb::SBSection
+ GetParent();
+
lldb::SBSection
FindSubSection (const char *sect_name);
@@ -77,6 +80,7 @@ public:
bool
GetDescription (lldb::SBStream &description);
+
private:
friend class SBAddress;
Modified: lldb/trunk/scripts/Python/interface/SBSection.i
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/Python/interface/SBSection.i?rev=183948&r1=183947&r2=183948&view=diff
==============================================================================
--- lldb/trunk/scripts/Python/interface/SBSection.i (original)
+++ lldb/trunk/scripts/Python/interface/SBSection.i Thu Jun 13 16:23:23 2013
@@ -54,6 +54,9 @@ public:
GetName ();
lldb::SBSection
+ GetParent();
+
+ lldb::SBSection
FindSubSection (const char *sect_name);
size_t
Modified: lldb/trunk/source/API/SBSection.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBSection.cpp?rev=183948&r1=183947&r2=183948&view=diff
==============================================================================
--- lldb/trunk/source/API/SBSection.cpp (original)
+++ lldb/trunk/source/API/SBSection.cpp Thu Jun 13 16:23:23 2013
@@ -69,6 +69,20 @@ SBSection::GetName ()
return NULL;
}
+lldb::SBSection
+SBSection::GetParent()
+{
+ lldb::SBSection sb_section;
+ SectionSP section_sp (GetSP());
+ if (section_sp)
+ {
+ SectionSP parent_section_sp (section_sp->GetParent());
+ if (parent_section_sp)
+ sb_section.SetSP(parent_section_sp);
+ }
+ return sb_section;
+}
+
lldb::SBSection
SBSection::FindSubSection (const char *sect_name)
More information about the lldb-commits
mailing list