[all-commits] [llvm/llvm-project] d20d84: [lldb] Make sure SBError is valid when SBDebugger:...

David Spickett via All-commits all-commits at lists.llvm.org
Tue Dec 2 02:58:43 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d20d84fec5945fcc16aa6f63879e1458d4af9ea6
      https://github.com/llvm/llvm-project/commit/d20d84fec5945fcc16aa6f63879e1458d4af9ea6
  Author: David Spickett <david.spickett at linaro.org>
  Date:   2025-12-02 (Tue, 02 Dec 2025)

  Changed paths:
    M lldb/source/API/SBDebugger.cpp
    M lldb/unittests/DAP/TestBase.cpp

  Log Message:
  -----------
  [lldb] Make sure SBError is valid when SBDebugger::InitializeWithErrorHandling succeeds (#170156)

Fixes #169788

When this function fails to initialise the debugger, it sets the SBError
using the returned error from the initialise function. This results in
Success being false and isVaid being true. This is expected behaviour.

When it does not fail to initialise, it was returning the default
constructed SBError which has Success() == true but IsValid == false.
IsValid should be true, to show that the success can be trusted.

To fix this, construct the SBError using a default constructed Status,
which results in Success and IsValid being true.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list