[all-commits] [llvm/llvm-project] 56de73: [lldb-server] Reset stop reason of all threads whe...

Pavel Labath via All-commits all-commits at lists.llvm.org
Wed May 20 02:09:06 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 56de738d18e11c86169f0248b97b2854c37e35ce
      https://github.com/llvm/llvm-project/commit/56de738d18e11c86169f0248b97b2854c37e35ce
  Author: Jaroslav Sevcik <jarin at google.com>
  Date:   2020-05-20 (Wed, 20 May 2020)

  Changed paths:
    M lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp
    M lldb/source/Plugins/Process/Linux/NativeThreadLinux.cpp
    M lldb/source/Plugins/Process/Linux/NativeThreadLinux.h
    A lldb/test/API/functionalities/thread/break_step_other/Makefile
    A lldb/test/API/functionalities/thread/break_step_other/TestThreadBreakStepOther.py
    A lldb/test/API/functionalities/thread/break_step_other/main.cpp

  Log Message:
  -----------
  [lldb-server] Reset stop reason of all threads when resuming

Summary:
This patch makes the stop reason reset logic similar to MacOS' debugserver, where exceptions are reset for all threads when resuming process for stepping or continuing (see [[ https://github.com/llvm/llvm-project/blob/96f3ea0d21b48ca088355db10d4d1a2e9bc9f884/lldb/tools/debugserver/source/MacOSX/MachThreadList.cpp#L433 | MachThreadList::ProcessWillResume ]] and [[ https://github.com/llvm/llvm-project/blob/96f3ea0d21b48ca088355db10d4d1a2e9bc9f884/lldb/tools/debugserver/source/MacOSX/MachThread.cpp#L363 | MachThread::ThreadWillResume ]]).

Resetting stop reasons on resume fixes problems where LLDB spuriously reports SIGTRAP signal stop reason for deleted breakpoints (both internal and public) and where  LLDB stops on an internal breakpoint while stepping over while a breakpoint is hit in another thread. See [[ https://bugs.llvm.org/show_bug.cgi?id=45642 | PR45642 ]] for details.

Reviewed By: jingham, labath

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




More information about the All-commits mailing list