[all-commits] [llvm/llvm-project] 0018c7: Fix "break delete --disabled" with no arguments.

jimingham via All-commits all-commits at lists.llvm.org
Tue Jul 27 13:38:28 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 0018c7123be3e090ba546fb730ed316fa2567655
      https://github.com/llvm/llvm-project/commit/0018c7123be3e090ba546fb730ed316fa2567655
  Author: Jim Ingham <jingham at apple.com>
  Date:   2021-07-27 (Tue, 27 Jul 2021)

  Changed paths:
    M lldb/source/Commands/CommandObjectBreakpoint.cpp
    M lldb/test/API/functionalities/breakpoint/breakpoint_command/TestBreakpointCommand.py

  Log Message:
  -----------
  Fix "break delete --disabled" with no arguments.

The code that figured out which breakpoints to delete was supposed
to set the result status if it found breakpoints, and then the code
that actually deleted them checked that the result's status was set.

The code for "break delete --disabled" failed to set the status if
no "protected" breakpoints were provided.  This was a confusing way
to implement this, so I reworked it with early returns so it was less
error prone, and added a test case for the no arguments case.

Differential Revision: https://reviews.llvm.org/D106623


  Commit: 910353c1048e5efac64b639a65b4d968aba3aa81
      https://github.com/llvm/llvm-project/commit/910353c1048e5efac64b639a65b4d968aba3aa81
  Author: Jim Ingham <jingham at apple.com>
  Date:   2021-07-27 (Tue, 27 Jul 2021)

  Changed paths:
    M lldb/source/Target/Process.cpp

  Log Message:
  -----------
  When calculating the "currently selected thread" in
Process::HandleStateChangedEvent, we check whether a thread stopped
for eStopReasonSignal is stopped for a signal that's currently set to
"no-stop". If it is, then we don't set that thread as the currently
selected thread.

But that only happens in the part of the algorithm that's handling the
case where the previously selected thread has no stop reason. Since we
want to keep on a thread as long as it is doing something interesting,
we always prefer the current thread. That's almost right, but we
forgot to check whether the previously selected thread stopped with an
eStopReasonSignal for a "no-stop" signal. If it did, then we shouldn't
select it.

This patch adds that check. I can't figure out a good way to test
this. This is the sort of thing that Ismail's scripted process plugin
will make easy once it is a real boy. But figuring out how to do this
in a real process is not trivial.

Differential Revision: https://reviews.llvm.org/D106712


  Commit: 69529286ce2dcd90563bca97537ce570c6d115b4
      https://github.com/llvm/llvm-project/commit/69529286ce2dcd90563bca97537ce570c6d115b4
  Author: Jim Ingham <jingham at apple.com>
  Date:   2021-07-27 (Tue, 27 Jul 2021)

  Changed paths:
    M lldb/test/API/commands/expression/top-level/TestTopLevelExprs.py

  Log Message:
  -----------
  Add a test for top-level expressions using "expr --top-level".

This was broken for a while even though the Python version
continued to work.  This adds a test so it doesn't regress.


Compare: https://github.com/llvm/llvm-project/compare/71909de37495...69529286ce2d


More information about the All-commits mailing list