[Lldb-commits] [lldb] [lldb-dap] Migrating DAP 'initialize' to new typed RequestHandler. (PR #133007)
Jonas Devlieghere via lldb-commits
lldb-commits at lists.llvm.org
Wed Mar 26 16:16:25 PDT 2025
================
@@ -23,10 +23,240 @@
#include "llvm/Support/JSON.h"
#include <cstdint>
#include <optional>
+#include <set>
#include <string>
namespace lldb_dap::protocol {
+/// An `ExceptionBreakpointsFilter` is shown in the UI as an filter option for
+/// configuring how exceptions are dealt with.
+struct ExceptionBreakpointsFilter {
+ /// The internal ID of the filter option. This value is passed to the
+ /// `setExceptionBreakpoints` request.
+ std::string filter;
+
+ /// The name of the filter option. This is shown in the UI.
+ std::string label;
+
+ /// A help text providing additional information about the exception filter.
+ /// This string is typically shown as a hover and can be translated.
+ std::optional<std::string> description;
+
+ /// Initial value of the filter option. If not specified a value false is
+ /// assumed.
+ std::optional<bool> defaultState;
+
+ /// Controls whether a condition can be specified for this filter option. If
+ /// false or missing, a condition can not be set.
+ std::optional<bool> supportsCondition;
+
+ /// A help text providing information about the condition. This string is
+ /// shown as the placeholder text for a text box and can be translated.
+ std::optional<std::string> conditionDescription;
+};
+llvm::json::Value toJSON(const ExceptionBreakpointsFilter &);
+
+/// A ColumnDescriptor specifies what module attribute to show in a column of
+/// the modules view, how to format it, and what the column’s label should be.
+///
+/// It is only used if the underlying UI actually supports this level of
+/// customization.
+struct ColumnDescriptor {
+ /// Name of the attribute rendered in this column.
+ std::string attributeName;
+
+ /// Header UI label of column.
+ std::string label;
+
+ /// Format to use for the rendered values in this column. TBD how the format
+ /// strings looks like.
+ std::optional<std::string> format;
+
+ enum class Type { String, Number, Boolean, Timestamp };
+
+ /// Datatype of values in this column. Defaults to `string` if not specified.
+ /// Values: 'string', 'number', 'boolean', 'unixTimestampUTC'.
+ std::optional<Type> type;
+
+ /// Width of this column in characters (hint only).
+ std::optional<int> width;
+};
+llvm::json::Value toJSON(const ColumnDescriptor &);
+
+/// Names of checksum algorithms that may be supported by a debug adapter.
+/// Values: ‘MD5’, ‘SHA1’, ‘SHA256’, ‘timestamp’.
+enum class ChecksumAlgorithm { md5, sha1, sha256, timestamp };
----------------
JDevlieghere wrote:
Shouldn't these match the spec?
```suggestion
enum class ChecksumAlgorithm { MD5, SHA1, SHA256, timestamp };
```
https://github.com/llvm/llvm-project/pull/133007
More information about the lldb-commits
mailing list