[all-commits] [llvm/llvm-project] a11117: [dexter] Remove unnecessary double check on condit...

Orlando Cazalet-Hyams via All-commits all-commits at lists.llvm.org
Mon May 17 01:03:20 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a11117a7c0a23f37bdee5c611bbaac22e89c775d
      https://github.com/llvm/llvm-project/commit/a11117a7c0a23f37bdee5c611bbaac22e89c775d
  Author: OCHyams <orlando.hyams at sony.com>
  Date:   2021-05-17 (Mon, 17 May 2021)

  Changed paths:
    M debuginfo-tests/dexter/dex/debugger/DebuggerControllers/ConditionalController.py
    M debuginfo-tests/dexter/dex/debugger/lldb/LLDB.py

  Log Message:
  -----------
  [dexter] Remove unnecessary double check on conditional breakpoints

Remove the `ConditionalController._conditional_met` method. This was missed in
the recent ConditionalController refactor (D98699). We don't need to check that
the conditions for a conditional breakpoint have been met because
`DebuggerBase.get_triggered_breakpoint_ids` returns the set of ids for
breakpoints which have been triggered.

To get the "triggered breakpoints" from lldb we use `GetStopReasonDataCount`
and `GetStopReasonDataAtIndex`. It seems that these functions count all
breakpoints associated with the location which lldb has stopped at, regardless
of their condition. i.e. Even if we have two breakpoints at the same source
location that have mutually exclusive conditions, both will be found this way
when either condition is true. To get around this, we store a map of breakpoint
{id: condition} `_breakpoint_conditions` and evaluate the conditions of the
triggered breakpoints to filter the set down to those which are unconditional
or have a condition which evaluates to true.

Essentially we are just moving the condition double check from a general
debugger controller into the lldb specific wrapper. This tidy up will help make
upcoming patches simpler.

Reviewed By: chrisjackson

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




More information about the All-commits mailing list