Skip to content

Commit 38baa90

Browse files
Fixed formating issues
1 parent ec3ac93 commit 38baa90

File tree

2 files changed

+11
-9
lines changed

2 files changed

+11
-9
lines changed

lldb/include/lldb/Expression/DWARFExpressionList.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ class DWARFExpressionList {
5959
}
6060

6161
lldb::addr_t GetFuncFileAddress() { return m_func_file_addr; }
62-
62+
6363
/// Represents an entry in the DWARFExpressionList with all needed metadata.
6464
struct DWARFExpressionEntry {
6565
/// Represents a DWARF location range in the DWARF unit’s file‐address space
@@ -69,7 +69,8 @@ class DWARFExpressionList {
6969

7070
/// Returns a DWARFExpressionEntry whose file_range contains the given
7171
/// load‐address. `func_load_addr` is the load‐address of the function
72-
/// start; `load_addr` is the full runtime PC. On success, `expr` is non-null.
72+
/// start; `load_addr` is the full runtime PC. On success, `expr` is
73+
/// non-null.
7374
std::optional<DWARFExpressionEntry>
7475
GetExpressionEntryAtAddress(lldb::addr_t func_load_addr,
7576
lldb::addr_t load_addr) const;

lldb/source/Expression/DWARFExpressionList.cpp

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
//
77
//===----------------------------------------------------------------------===//
88

9-
#include "lldb/Core/AddressRange.h"
109
#include "lldb/Expression/DWARFExpressionList.h"
10+
#include "lldb/Core/AddressRange.h"
1111
#include "lldb/Symbol/Function.h"
1212
#include "lldb/Target/RegisterContext.h"
1313
#include "lldb/Target/StackFrame.h"
@@ -21,7 +21,7 @@ bool DWARFExpressionList::IsAlwaysValidSingleExpr() const {
2121
return GetAlwaysValidExpr() != nullptr;
2222
}
2323

24-
const DWARFExpression * DWARFExpressionList::GetAlwaysValidExpr() const {
24+
const DWARFExpression *DWARFExpressionList::GetAlwaysValidExpr() const {
2525
if (m_exprs.GetSize() != 1)
2626
return nullptr;
2727
const auto *expr = m_exprs.GetEntryAtIndex(0);
@@ -56,28 +56,29 @@ bool DWARFExpressionList::ContainsAddress(lldb::addr_t func_load_addr,
5656

5757
std::optional<DWARFExpressionList::DWARFExpressionEntry>
5858
DWARFExpressionList::GetExpressionEntryAtAddress(lldb::addr_t func_load_addr,
59-
lldb::addr_t load_addr) const {
59+
lldb::addr_t load_addr) const {
6060
if (const DWARFExpression *always = GetAlwaysValidExpr()) {
6161
return DWARFExpressionEntry{std::nullopt, always};
6262
}
6363

6464
if (func_load_addr == LLDB_INVALID_ADDRESS)
6565
func_load_addr = m_func_file_addr;
6666

67-
// Guard against underflow when translating a load address back into file space.
67+
// Guard against underflow when translating a load address back into file
68+
// space.
6869
if (load_addr < func_load_addr)
69-
return std::nullopt;
70+
return std::nullopt;
7071

7172
// Guard against overflow.
7273
lldb::addr_t delta = load_addr - func_load_addr;
7374
if (delta > std::numeric_limits<lldb::addr_t>::max() - m_func_file_addr)
7475
return std::nullopt;
7576

7677
lldb::addr_t file_pc = (load_addr - func_load_addr) + m_func_file_addr;
77-
78+
7879
if (const auto *entry = m_exprs.FindEntryThatContains(file_pc)) {
7980
AddressRange range_in_file(entry->GetRangeBase(),
80-
entry->GetRangeEnd() - entry->GetRangeBase());
81+
entry->GetRangeEnd() - entry->GetRangeBase());
8182
return DWARFExpressionEntry{range_in_file, &entry->data};
8283
}
8384

0 commit comments

Comments
 (0)