llvm-project/lldb/include/lldb
Aleksandr Urakov 9b087d2ce6 [Target] Do not skip a stop on a breakpoint if a plan was completed
Summary:
This patch fixes the next situation. On Windows clang-cl makes no stub before
the main function, so the main function is located exactly on module entry
point. May be it is the same on other platforms. So consider the following
sequence:

- set a breakpoint on main and stop there;
- try to evaluate expression, which requires a code execution on the debuggee
  side. Such an execution always returns to the module entry, and the plan waits
  for it there;
- the plan understands that it is complete now and removes its breakpoint. But
  the breakpoint site is still there, because we also have a breakpoint on
  entry;
- StopInfo analyzes a situation. It sees that we have stopped on the breakpoint
  site, and it sees that the breakpoint site has owners, and no one logical
  breakpoint is internal (because the plan is already completed and it have
  removed its breakpoint);
- StopInfo thinks that it's a user breakpoint and skips it to avoid recursive
  computations;
- the program continues.

So in this situation the program continues without a stop right after
the expression evaluation. To avoid this an additional check that
the plan was completed was added.

Reviewers: jingham, zturner, boris.ulasevich

Reviewed by: jingham

Tags: #lldb

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

llvm-svn: 347974
2018-11-30 09:45:52 +00:00
..
API [Target] Do not skip a stop on a breakpoint if a plan was completed 2018-11-30 09:45:52 +00:00
Breakpoint Add setting to require hardware breakpoints. 2018-11-15 01:18:15 +00:00
Core [Reproducers] Improve reproducer API and add unit tests. 2018-11-27 22:11:02 +00:00
DataFormatters Remove header grouping comments. 2018-11-11 23:17:06 +00:00
Expression Remove header grouping comments. 2018-11-11 23:17:06 +00:00
Host Move time cast to SymbolFileDWARFDebugMap 2018-11-27 15:25:58 +00:00
Initialization *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
Interpreter Remove header grouping comments. 2018-11-11 23:17:06 +00:00
Symbol [Symbol] Search symbols with name and type in a symbol file 2018-11-30 06:56:37 +00:00
Target [lldb] Add GetCurrentException APIs to SBThread, add frame recognizer for objc_exception_throw for Obj-C runtimes 2018-11-28 22:01:52 +00:00
Utility [Reproducers] Improve reproducer API and add unit tests. 2018-11-27 22:11:02 +00:00
lldb-defines.h Add a "scripted" breakpoint type to lldb. 2018-09-13 21:35:32 +00:00
lldb-enumerations.h [LLDB] - Recommit r346848 "[LLDB] - Support the single file split DWARF.". 2018-11-14 13:01:15 +00:00
lldb-forward.h Remove Go debugger plugin 2018-11-05 19:33:59 +00:00
lldb-private-defines.h Enable AUTOBRIEF in doxygen configuration. 2018-05-02 16:55:16 +00:00
lldb-private-enumerations.h Move AddressClass to private enums since API doesn't provide any functions to manage it. 2018-06-27 06:50:10 +00:00
lldb-private-forward.h NativeProcessProtocol: Simplify breakpoint setting code 2018-11-04 10:58:08 +00:00
lldb-private-interfaces.h Add setting to require hardware breakpoints. 2018-11-15 01:18:15 +00:00
lldb-private-types.h Replace "nullptr-terminated" C-arrays of OptionValueEnumeration with safer llvm::ArrayRef 2018-09-26 18:50:19 +00:00
lldb-private.h *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
lldb-public.h *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
lldb-types.h Reflow paragraphs in comments. 2018-04-30 16:49:04 +00:00
lldb-versioning.h Reflow paragraphs in comments. 2018-04-30 16:49:04 +00:00
module.modulemap Move SafeMachO from Utility to Host 2018-09-12 12:26:05 +00:00