[Lldb-commits] [PATCH] D147292: [lldb] Add support for the DW_AT_trampoline attribute with a boolean
Jonas Devlieghere via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Sun Apr 2 13:09:57 PDT 2023
JDevlieghere added inline comments.
================
Comment at: lldb/source/Core/Module.cpp:780
+ bool is_trampoline =
+ Target::GetGlobalProperties().GetEnableTrampolineSupport() &&
+ sc.function && sc.function->IsGenericTrampoline();
----------------
You can hoist `target::GetGlobalProperties().GetEnableTrampolineSupport()` out of the loop. Right now it will need to be recomputed every time in because someone could change the setting in the meantime and although it's a little far fetched, that's probably not what you want anyway.
================
Comment at: lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp:2443
+ bool is_generic_trampoline = die.IsGenericTrampoline();
+
----------------
Let's make this `const` for consistence with `func_user_id` (and remove the newline as they're related).
================
Comment at: lldb/source/Target/ThreadPlanStepRange.cpp:509-527
+ bool return_value;
+
+ if (stop_info_sp) {
+ StopReason reason = stop_info_sp->GetStopReason();
+
+ if (reason == eStopReasonTrace) {
+ return_value = true;
----------------
I know you copy pasted this but this can be simplified quite a bit.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D147292/new/
https://reviews.llvm.org/D147292
More information about the lldb-commits
mailing list