Skip to content

Commit b257017

Browse files
committed
Add GetRangeContainingLoadAddress
1 parent a00392e commit b257017

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

lldb/include/lldb/Symbol/Function.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -454,6 +454,11 @@ class Function : public UserID, public SymbolContextScope {
454454
/// and variables).
455455
const Address &GetAddress() const { return m_address; }
456456

457+
bool GetRangeContainingLoadAddress(lldb::addr_t load_addr, Target &target,
458+
AddressRange &range) {
459+
return m_block.GetRangeContainingLoadAddress(load_addr, target, range);
460+
}
461+
457462
lldb::LanguageType GetLanguage() const;
458463
/// Find the file and line number of the source location of the start of the
459464
/// function. This will use the declaration if present and fall back on the

lldb/source/API/SBThread.cpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -841,9 +841,6 @@ SBError SBThread::StepOverUntil(lldb::SBFrame &sb_frame,
841841
// function, and then if there are no addresses remaining, give an
842842
// appropriate error message.
843843

844-
// Function block range information is valid even without parsing the entire
845-
// block.
846-
Block &fun_block = frame_sc.function->GetBlock(/*can_create=*/false);
847844
bool all_in_function = true;
848845

849846
std::vector<addr_t> step_over_until_addrs;
@@ -862,8 +859,8 @@ SBError SBThread::StepOverUntil(lldb::SBFrame &sb_frame,
862859
sc.line_entry.range.GetBaseAddress().GetLoadAddress(target);
863860
if (step_addr != LLDB_INVALID_ADDRESS) {
864861
AddressRange unused_range;
865-
if (fun_block.GetRangeContainingLoadAddress(step_addr, *target,
866-
unused_range))
862+
if (frame_sc.function->GetRangeContainingLoadAddress(step_addr, *target,
863+
unused_range))
867864
step_over_until_addrs.push_back(step_addr);
868865
else
869866
all_in_function = false;

0 commit comments

Comments
 (0)