[Lldb-commits] [PATCH] D88682: [lldb] [Process/NetBSD] Fix crash on unsupported i386 regs

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Fri Oct 2 10:51:20 PDT 2020


labath accepted this revision.
labath added inline comments.


================
Comment at: lldb/source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD_x86_64.cpp:398
     assert(false && "Unhandled i386 register.");
-    return 0;
+    return -1;
   }
----------------
mgorny wrote:
> krytarowski wrote:
> > Use `llvm_unreachable` ? Same in other places where we add similar `assert()`.
> @labath, what is the recommended practice for LLDB? Should I just replace these asserts with `llvm_unreachable(message)`?
Yes, llvm_unreachable is better.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D88682/new/

https://reviews.llvm.org/D88682



More information about the lldb-commits mailing list