summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg Clayton <gclayton@apple.com>2013-06-13 21:23:23 +0000
committerGreg Clayton <gclayton@apple.com>2013-06-13 21:23:23 +0000
commit1d4c540688dbd7033485d41aa3ad064c106f3893 (patch)
treee0f53539a6537f8b83244d5553bcbfa5529c7fa9
parent4f35da77a6f7da332f9e2f2e0016230df4e78661 (diff)
downloadbcm5719-llvm-1d4c540688dbd7033485d41aa3ad064c106f3893.tar.gz
bcm5719-llvm-1d4c540688dbd7033485d41aa3ad064c106f3893.zip
Added a SBSection::GetParent() to the API.
llvm-svn: 183948
-rw-r--r--lldb/include/lldb/API/SBSection.h6
-rw-r--r--lldb/scripts/Python/interface/SBSection.i3
-rw-r--r--lldb/source/API/SBSection.cpp14
3 files changed, 22 insertions, 1 deletions
diff --git a/lldb/include/lldb/API/SBSection.h b/lldb/include/lldb/API/SBSection.h
index d1b127f1729..3386484f649 100644
--- a/lldb/include/lldb/API/SBSection.h
+++ b/lldb/include/lldb/API/SBSection.h
@@ -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;
diff --git a/lldb/scripts/Python/interface/SBSection.i b/lldb/scripts/Python/interface/SBSection.i
index cf41bdf2038..5bbf9ee10d5 100644
--- a/lldb/scripts/Python/interface/SBSection.i
+++ b/lldb/scripts/Python/interface/SBSection.i
@@ -54,6 +54,9 @@ public:
GetName ();
lldb::SBSection
+ GetParent();
+
+ lldb::SBSection
FindSubSection (const char *sect_name);
size_t
diff --git a/lldb/source/API/SBSection.cpp b/lldb/source/API/SBSection.cpp
index 354779984c3..3fb84e81465 100644
--- a/lldb/source/API/SBSection.cpp
+++ b/lldb/source/API/SBSection.cpp
@@ -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)
OpenPOWER on IntegriCloud