Files
RedBear-OS/local/recipes/dev/libclc/source/lldb/tools/lldb-dap/ExceptionBreakpoint.h
T
vasilito cb424d7448 build: static patch-sanity linter (shift-left the malformed-patch class)
verify-patch-sanity.py validates every active recipe .patch has internally-
consistent hunk line counts — catching the 'malformed patch at line N' failure
at commit/CI/preflight time instead of hours into a cook. This cycle hit that
class three times (qtwaylandscanner, sddm, xwayland), each only discovered when
cookbook tried to apply the patch.

Running it across the repo found 29 latent malformed patches (validated against
GNU patch: e.g. relibc/P3-sysv-ipc reproduces 'malformed patch at line 22').
They were harmless only because they sit in vendored recipes (baked, not re-
applied) — but would fail on any version-bump re-derivation. --fix recounts the
hunk headers (body untouched) and repaired all 29.

Wired into build-preflight.sh (Phase 1.0D) and redbear-ci.yml, with a unit test
(test-patch-sanity.sh). Skips archived/legacy trees and unvalidatable formats
(empty placeholders, bare-@@ git hunks).
2026-08-01 05:13:02 +03:00

56 lines
1.6 KiB
C++

//===-- ExceptionBreakpoint.h -----------------------------------*- C++ -*-===//
//
// 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
//
//===----------------------------------------------------------------------===//
#ifndef LLDB_TOOLS_LLDB_DAP_EXCEPTIONBREAKPOINT_H
#define LLDB_TOOLS_LLDB_DAP_EXCEPTIONBREAKPOINT_H
#include "DAPForward.h"
#include "Protocol/ProtocolTypes.h"
#include "lldb/API/SBBreakpoint.h"
#include "lldb/lldb-enumerations.h"
#include "llvm/ADT/StringRef.h"
#include <string>
#include <utility>
namespace lldb_dap {
enum ExceptionKind : unsigned {
eExceptionKindCatch,
eExceptionKindThrow,
};
class ExceptionBreakpoint {
public:
ExceptionBreakpoint(DAP &d, std::string f, std::string l,
lldb::LanguageType lang, ExceptionKind kind)
: m_dap(d), m_filter(std::move(f)), m_label(std::move(l)),
m_language(lang), m_kind(kind), m_bp() {}
protocol::Breakpoint SetBreakpoint() { return SetBreakpoint(""); };
protocol::Breakpoint SetBreakpoint(llvm::StringRef condition);
void ClearBreakpoint();
lldb::break_id_t GetID() const { return m_bp.GetID(); }
llvm::StringRef GetFilter() const { return m_filter; }
llvm::StringRef GetLabel() const { return m_label; }
static constexpr bool kDefaultValue = false;
protected:
DAP &m_dap;
std::string m_filter;
std::string m_label;
lldb::LanguageType m_language;
ExceptionKind m_kind;
lldb::SBBreakpoint m_bp;
};
} // namespace lldb_dap
#endif