[PATCH] D49111: [windows] LLDB shows the wrong values when register read is executed at a frame other than zero

Tatyana Krasnukha via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 10 03:49:12 PDT 2018


tatyana-krasnukha added inline comments.


================
Comment at: source/Plugins/Process/Windows/Common/TargetThreadWindows.cpp:92
+    Unwind *unwinder = GetUnwinder();
+    if (unwinder)
+      reg_ctx_sp = unwinder->CreateRegisterContextForFrame(frame);
----------------
aleksandr.urakov wrote:
> tatyana-krasnukha wrote:
> > Here you check plain pointer, don't cast it to bool - compare with nullptr.
> What are the disadvantages of casting to bool in comparison with nullptr checking?
That's a matter of opinion, but most coding styles consider implicit casts as less readable. E.g. if you run clang-tidy with enabled readability checks, you get readability-implicit-bool-conversion warning on this code.


Repository:
  rL LLVM

https://reviews.llvm.org/D49111





More information about the llvm-commits mailing list