This revision was automatically updated to reflect the committed changes.
Closed by commit rG95e2949a5352: [LLDB] Fix possible nullptr exception
(authored by Emmmer).
Herald added a subscriber: lldb-commits.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D131945/new/
https://reviews.llvm.org/D131945
Files:
lldb/source/Plugins/Process/Utility/NativeProcessSoftwareSingleStep.cpp
Index: lldb/source/Plugins/Process/Utility/NativeProcessSoftwareSingleStep.cpp
===================================================================
--- lldb/source/Plugins/Process/Utility/NativeProcessSoftwareSingleStep.cpp
+++ lldb/source/Plugins/Process/Utility/NativeProcessSoftwareSingleStep.cpp
@@ -128,8 +128,10 @@
auto pc_it =
baton.m_register_values.find(reg_info_pc->kinds[eRegisterKindDWARF]);
- auto flags_it =
- baton.m_register_values.find(reg_info_flags->kinds[eRegisterKindDWARF]);
+ auto flags_it = reg_info_flags == nullptr
+ ? baton.m_register_values.end()
+ : baton.m_register_values.find(
+ reg_info_flags->kinds[eRegisterKindDWARF]);
lldb::addr_t next_pc;
lldb::addr_t next_flags;
Index: lldb/source/Plugins/Process/Utility/NativeProcessSoftwareSingleStep.cpp
===================================================================
--- lldb/source/Plugins/Process/Utility/NativeProcessSoftwareSingleStep.cpp
+++ lldb/source/Plugins/Process/Utility/NativeProcessSoftwareSingleStep.cpp
@@ -128,8 +128,10 @@
auto pc_it =
baton.m_register_values.find(reg_info_pc->kinds[eRegisterKindDWARF]);
- auto flags_it =
- baton.m_register_values.find(reg_info_flags->kinds[eRegisterKindDWARF]);
+ auto flags_it = reg_info_flags == nullptr
+ ? baton.m_register_values.end()
+ : baton.m_register_values.find(
+ reg_info_flags->kinds[eRegisterKindDWARF]);
lldb::addr_t next_pc;
lldb::addr_t next_flags;
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits