[Lldb-commits] [lldb] More refinement of call site handling in stepping. (PR #114628)
via lldb-commits
lldb-commits at lists.llvm.org
Fri Nov 1 17:30:53 PDT 2024
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff 80b9f07436617d650bdab7035394705f643d1b19 042ac07ed67a5465aaf5c2dc8c4396adf5da2948 --extensions cpp -- lldb/source/Target/ThreadPlanStepRange.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/lldb/source/Target/ThreadPlanStepRange.cpp b/lldb/source/Target/ThreadPlanStepRange.cpp
index e53b189d49..6a0d8257fe 100644
--- a/lldb/source/Target/ThreadPlanStepRange.cpp
+++ b/lldb/source/Target/ThreadPlanStepRange.cpp
@@ -379,7 +379,8 @@ bool ThreadPlanStepRange::SetNextBranchBreakpoint() {
!m_next_branch_bp_sp->HasResolvedLocations())
m_could_not_resolve_hw_bp = true;
- BreakpointLocationSP bp_loc = m_next_branch_bp_sp->GetLocationAtIndex(0);
+ BreakpointLocationSP bp_loc =
+ m_next_branch_bp_sp->GetLocationAtIndex(0);
if (log) {
lldb::break_id_t bp_site_id = LLDB_INVALID_BREAK_ID;
if (bp_loc) {
@@ -402,33 +403,40 @@ bool ThreadPlanStepRange::SetNextBranchBreakpoint() {
if (bp_loc && block) {
LineEntry top_most_line_entry;
lldb::addr_t run_to_addr = run_to_address.GetFileAddress();
- for (Block *inlined_parent = block->GetContainingInlinedBlock(); inlined_parent;
- inlined_parent = inlined_parent->GetInlinedParent()) {
+ for (Block *inlined_parent = block->GetContainingInlinedBlock();
+ inlined_parent;
+ inlined_parent = inlined_parent->GetInlinedParent()) {
AddressRange range;
- if (!inlined_parent->GetRangeContainingAddress(run_to_address, range))
- break;
+ if (!inlined_parent->GetRangeContainingAddress(run_to_address,
+ range))
+ break;
Address range_start_address = range.GetBaseAddress();
// Only compare addresses here, we may have different symbol
// contexts (for virtual inlined stacks), but we just want to know
// that they are all at the same address.
- if (range_start_address.GetFileAddress() != run_to_addr)
+ if (range_start_address.GetFileAddress() != run_to_addr)
break;
- const InlineFunctionInfo *inline_info = inlined_parent->GetInlinedFunctionInfo();
+ const InlineFunctionInfo *inline_info =
+ inlined_parent->GetInlinedFunctionInfo();
if (!inline_info)
break;
const Declaration &call_site = inline_info->GetCallSite();
top_most_line_entry.line = call_site.GetLine();
top_most_line_entry.column = call_site.GetColumn();
FileSpec call_site_file_spec = call_site.GetFile();
- top_most_line_entry.original_file_sp.reset(new SupportFile(call_site_file_spec));
+ top_most_line_entry.original_file_sp.reset(
+ new SupportFile(call_site_file_spec));
top_most_line_entry.range = range;
top_most_line_entry.file_sp.reset();
- top_most_line_entry.ApplyFileMappings(GetThread().CalculateTarget());
+ top_most_line_entry.ApplyFileMappings(
+ GetThread().CalculateTarget());
if (!top_most_line_entry.file_sp)
- top_most_line_entry.file_sp = top_most_line_entry.original_file_sp;
+ top_most_line_entry.file_sp =
+ top_most_line_entry.original_file_sp;
}
if (top_most_line_entry.IsValid()) {
- LLDB_LOG(log, "Setting preferred line entry: {0}:{1}", top_most_line_entry.GetFile(), top_most_line_entry.line);
+ LLDB_LOG(log, "Setting preferred line entry: {0}:{1}",
+ top_most_line_entry.GetFile(), top_most_line_entry.line);
bp_loc->SetPreferredLineEntry(top_most_line_entry);
}
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/114628
More information about the lldb-commits
mailing list