diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2019-01-19 10:06:29 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2019-01-19 10:06:29 +0000 |
| commit | 94994d372d014ce4c8758b9605d63fae651bd8aa (patch) | |
| tree | 51c0b708bd59f205d6b35cb2a8c24d62f0c33d77 /tools/lldb-vscode/FunctionBreakpoint.cpp | |
| parent | 39be7ce23363d12ae3e49aeb1fdb2bfeb892e836 (diff) | |
Notes
Diffstat (limited to 'tools/lldb-vscode/FunctionBreakpoint.cpp')
| -rw-r--r-- | tools/lldb-vscode/FunctionBreakpoint.cpp | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/tools/lldb-vscode/FunctionBreakpoint.cpp b/tools/lldb-vscode/FunctionBreakpoint.cpp new file mode 100644 index 000000000000..f83333dc9895 --- /dev/null +++ b/tools/lldb-vscode/FunctionBreakpoint.cpp @@ -0,0 +1,28 @@ +//===-- FunctionBreakpoint.cpp ----------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#include "FunctionBreakpoint.h" +#include "VSCode.h" + +namespace lldb_vscode { + +FunctionBreakpoint::FunctionBreakpoint(const llvm::json::Object &obj) + : BreakpointBase(obj), functionName(GetString(obj, "name")) {} + +void FunctionBreakpoint::SetBreakpoint() { + if (functionName.empty()) + return; + bp = g_vsc.target.BreakpointCreateByName(functionName.c_str()); + if (!condition.empty()) + SetCondition(); + if (!hitCondition.empty()) + SetHitCondition(); +} + +} |
