summaryrefslogtreecommitdiff
path: root/lldb/source/API/SBFunction.cpp
diff options
context:
space:
mode:
authorMiro Bucko <mbucko@meta.com>2024-05-28 23:29:10 +0700
committerGitHub <noreply@github.com>2024-05-28 09:29:10 -0700
commit42944e4600827738fae868f0df831fb2678be8b4 (patch)
tree49d4085e53e62895f8404181aa65bd32bedc4fa7 /lldb/source/API/SBFunction.cpp
parentd582958618cc5aeff58c512399bef7b263fedd59 (diff)
Add SBAddressRange and SBAddressRangeList to SB API (#92014)
This adds new SB API calls and classes to allow a user of the SB API to obtain an address ranges from SBFunction and SBBlock.
Diffstat (limited to 'lldb/source/API/SBFunction.cpp')
-rw-r--r--lldb/source/API/SBFunction.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/lldb/source/API/SBFunction.cpp b/lldb/source/API/SBFunction.cpp
index a01c7f79bbd3..6a97352fc2c2 100644
--- a/lldb/source/API/SBFunction.cpp
+++ b/lldb/source/API/SBFunction.cpp
@@ -7,6 +7,7 @@
//===----------------------------------------------------------------------===//
#include "lldb/API/SBFunction.h"
+#include "lldb/API/SBAddressRange.h"
#include "lldb/API/SBProcess.h"
#include "lldb/API/SBStream.h"
#include "lldb/Core/Disassembler.h"
@@ -160,6 +161,19 @@ SBAddress SBFunction::GetEndAddress() {
return addr;
}
+lldb::SBAddressRangeList SBFunction::GetRanges() {
+ LLDB_INSTRUMENT_VA(this);
+
+ lldb::SBAddressRangeList ranges;
+ if (m_opaque_ptr) {
+ lldb::SBAddressRange range;
+ (*range.m_opaque_up) = m_opaque_ptr->GetAddressRange();
+ ranges.Append(std::move(range));
+ }
+
+ return ranges;
+}
+
const char *SBFunction::GetArgumentName(uint32_t arg_idx) {
LLDB_INSTRUMENT_VA(this, arg_idx);