[Lldb-commits] [PATCH] D88682: [lldb] [Process/NetBSD] Fix crash on unsupported i386 regs
Kamil Rytarowski via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Fri Oct 2 10:30:25 PDT 2020
krytarowski added inline comments.
================
Comment at: lldb/source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD_x86_64.cpp:398
assert(false && "Unhandled i386 register.");
- return 0;
+ return -1;
}
----------------
Use `llvm_unreachable` ? Same in other places where we add similar `assert()`.
================
Comment at: lldb/source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD_x86_64.cpp:414
+ return -1; // MPXR
+ if (reg_num >= k_first_mpxr_i386 && reg_num <= k_last_mpxc_i386)
+ return -1; // MPXC
----------------
k_first_mpxr_i386 -> k_first_mpxc_i386 ?
================
Comment at: lldb/source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD_x86_64.cpp:428
return -1; // MPXR
- else if (reg_num <= k_last_mpxc_x86_64)
+ if (reg_num >= k_first_mpxr_x86_64 && reg_num <= k_last_mpxc_x86_64)
return -1; // MPXC
----------------
k_first_mpxr_x86_64 -> k_first_mpxc_x86_64?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D88682/new/
https://reviews.llvm.org/D88682
More information about the lldb-commits
mailing list