================ @@ -0,0 +1,17 @@ +//===-- ProtocolUtils.cpp -------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#include "Protocol/ProtocolUtils.h" + +namespace lldb_dap::protocol { + +bool IsAssemblySource(const protocol::Source &source) { + return source.sourceReference.value_or(0) != 0; +} ---------------- eronnen wrote:
When creating the source object if there is source code available we set the `path`, otherwise we set `sourceReference`, which means we fall back to assembly. According to the spec: ```js /** * The source location of the breakpoints; either `source.path` or * `source.sourceReference` must be specified. */ ``` Also added a comment to the function to make it clearer https://github.com/llvm/llvm-project/pull/141426 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits