1// SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
2//
3// SPDX-License-Identifier: GPL-3.0-or-later
4
5#include "breakpoint.h"
6
7namespace Internal
8{
9Breakpoint::Breakpoint()
10{
11
12}
13
14void Breakpoint::update(dap::Breakpoint &bp)
15{
16 if (bp.source.has_value() && bp.source.value().name.has_value()
17 && bp.source.value().path.has_value()) {
18 fileName = bp.source.value().name.value().c_str();
19 filePath = bp.source.value().path.value().c_str();
20 }
21
22 if (bp.line.has_value()) {
23 lineNumber = static_cast<int>(bp.line.value());
24 }
25}
26} // end namespace.
27