[Lldb-commits] [PATCH] D131945: [LLDB] Fix possible nullptr exception
Emmmer S via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Tue Aug 16 08:41:12 PDT 2022
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;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D131945.453028.patch
Type: text/x-patch
Size: 797 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20220816/02d1851b/attachment-0001.bin>
More information about the lldb-commits
mailing list