Update to 1.65.0
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7328c58..9e34e17 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -14,7 +14,7 @@
 
 cmake_minimum_required(VERSION 3.13)
 
-project(cppdap VERSION 1.59.0 LANGUAGES CXX C)
+project(cppdap VERSION 1.65.0 LANGUAGES CXX C)
 
 set (CMAKE_CXX_STANDARD 11)
 
diff --git a/fuzz/dictionary.txt b/fuzz/dictionary.txt
index 73a343c..0fcdbcd 100644
--- a/fuzz/dictionary.txt
+++ b/fuzz/dictionary.txt
@@ -15,6 +15,7 @@
 "allThreadsStopped"
 "allowPartial"
 "always"
+"appliesTo"
 "areas"
 "args"
 "argsCanBeInterpretedByShell"
@@ -29,6 +30,7 @@
 "breakMode"
 "breakpoint"
 "breakpointLocations"
+"breakpointModes"
 "breakpoints"
 "bytesWritten"
 "canPersist"
@@ -98,6 +100,7 @@
 "expensive"
 "expression"
 "external"
+"failed"
 "field"
 "file"
 "filter"
@@ -138,6 +141,7 @@
 "integrated"
 "interface"
 "internal"
+"invalid"
 "invalidated"
 "isLocalProcess"
 "isOptimized"
@@ -163,6 +167,7 @@
 "message"
 "method"
 "mimeType"
+"mode"
 "module"
 "moduleCount"
 "moduleId"
@@ -190,6 +195,7 @@
 "path"
 "pathFormat"
 "pause"
+"pending"
 "percentage"
 "pointerSize"
 "presentationHint"
diff --git a/fuzz/fuzz.h b/fuzz/fuzz.h
index a35800c..6f1effd 100644
--- a/fuzz/fuzz.h
+++ b/fuzz/fuzz.h
@@ -15,7 +15,7 @@
 // Generated with protocol_gen.go -- do not edit this file.
 //   go run scripts/protocol_gen/protocol_gen.go
 //
-// DAP version 1.59.0
+// DAP version 1.65.0
 
 #ifndef dap_fuzzer_h
 #define dap_fuzzer_h
diff --git a/include/dap/protocol.h b/include/dap/protocol.h
index e4c479e..96a18c9 100644
--- a/include/dap/protocol.h
+++ b/include/dap/protocol.h
@@ -15,7 +15,7 @@
 // Generated with protocol_gen.go -- do not edit this file.
 //   go run scripts/protocol_gen/protocol_gen.go
 //
-// DAP version 1.59.0
+// DAP version 1.65.0
 
 #ifndef dap_protocol_h
 #define dap_protocol_h
@@ -141,6 +141,18 @@
   // The offset from the instruction reference.
   // This can be negative.
   optional<integer> offset;
+  // A machine-readable explanation of why a breakpoint may not be verified. If
+  // a breakpoint is verified or a specific reason is not known, the adapter
+  // should omit this property. Possible values include:
+  //
+  // - `pending`: Indicates a breakpoint might be verified in the future, but
+  // the adapter cannot verify it in the current state.
+  //  - `failed`: Indicates a breakpoint was not able to be verified, and the
+  //  adapter does not believe it can be verified without intervention.
+  //
+  // Must be one of the following enumeration values:
+  // 'pending', 'failed'
+  optional<string> reason;
   // The source where the breakpoint is located.
   optional<Source> source;
   // If true, the breakpoint could be set (but not necessarily at the desired
@@ -214,7 +226,7 @@
   // line is specified, the request returns all possible locations in that line.
   integer line;
   // The source location of the breakpoints; either `source.path` or
-  // `source.reference` must be specified.
+  // `source.sourceReference` must be specified.
   Source source;
 };
 
@@ -229,18 +241,19 @@
 // The `cancel` request is used by the client in two situations:
 // - to indicate that it is no longer interested in the result produced by a
 // specific request issued earlier
-// - to cancel a progress sequence. Clients should only call this request if the
-// corresponding capability `supportsCancelRequest` is true. This request has a
-// hint characteristic: a debug adapter can only be expected to make a 'best
-// effort' in honoring this request but there are no guarantees. The `cancel`
-// request may return an error if it could not cancel an operation but a client
-// should refrain from presenting this error to end users. The request that got
-// cancelled still needs to send a response back. This can either be a normal
-// result (`success` attribute true) or an error response (`success` attribute
-// false and the `message` set to `cancelled`). Returning partial results from a
-// cancelled request is possible but please note that a client has no generic
-// way for detecting that a response is partial or not. The progress that got
-// cancelled still needs to send a `progressEnd` event back.
+// - to cancel a progress sequence.
+// Clients should only call this request if the corresponding capability
+// `supportsCancelRequest` is true. This request has a hint characteristic: a
+// debug adapter can only be expected to make a 'best effort' in honoring this
+// request but there are no guarantees. The `cancel` request may return an error
+// if it could not cancel an operation but a client should refrain from
+// presenting this error to end users. The request that got cancelled still
+// needs to send a response back. This can either be a normal result (`success`
+// attribute true) or an error response (`success` attribute false and the
+// `message` set to `cancelled`). Returning partial results from a cancelled
+// request is possible but please note that a client has no generic way for
+// detecting that a response is partial or not. The progress that got cancelled
+// still needs to send a `progressEnd` event back.
 //  A client should not assume that progress just got cancelled after sending
 //  the `cancel` request.
 struct CancelRequest : public Request {
@@ -280,6 +293,28 @@
 
 DAP_DECLARE_STRUCT_TYPEINFO(ColumnDescriptor);
 
+// Describes one or more type of breakpoint a `BreakpointMode` applies to. This
+// is a non-exhaustive enumeration and may expand as future breakpoint types are
+// added.
+using BreakpointModeApplicability = string;
+
+// A `BreakpointMode` is provided as a option when setting breakpoints on
+// sources or instructions.
+struct BreakpointMode {
+  // Describes one or more type of breakpoint this mode applies to.
+  array<BreakpointModeApplicability> appliesTo;
+  // A help text providing additional information about the breakpoint mode.
+  // This string is typically shown as a hover and can be translated.
+  optional<string> description;
+  // The name of the breakpoint mode. This is shown in the UI.
+  string label;
+  // The internal ID of the mode. This value is passed to the `setBreakpoints`
+  // request.
+  string mode;
+};
+
+DAP_DECLARE_STRUCT_TYPEINFO(BreakpointMode);
+
 // An `ExceptionBreakpointsFilter` is shown in the UI as an filter option for
 // configuring how exceptions are dealt with.
 struct ExceptionBreakpointsFilter {
@@ -308,6 +343,13 @@
 struct Capabilities {
   // The set of additional module information exposed by the debug adapter.
   optional<array<ColumnDescriptor>> additionalModuleColumns;
+  // Modes of breakpoints supported by the debug adapter, such as 'hardware' or
+  // 'software'. If present, the client may allow the user to select a mode and
+  // include it in its `setBreakpoints` request.
+  //
+  // Clients may present the first applicable mode in this array as the
+  // 'default' mode in gestures that set breakpoints.
+  optional<array<BreakpointMode>> breakpointModes;
   // The set of characters that should trigger completion in a REPL. If not
   // specified, the UI should assume the `.` character.
   optional<array<string>> completionTriggerCharacters;
@@ -579,7 +621,11 @@
   optional<boolean> canPersist;
   // An identifier for the data on which a data breakpoint can be registered
   // with the `setDataBreakpoints` request or null if no data breakpoint is
-  // available.
+  // available. If a `variablesReference` or `frameId` is passed, the `dataId`
+  // is valid in the current suspended state, otherwise it's valid indefinitely.
+  // See 'Lifetime of Object References' in the Overview section for details.
+  // Breakpoints set using the `dataId` in the `setDataBreakpoints` request may
+  // outlive the lifetime of the associated `dataId`.
   variant<string, null> dataId;
   // UI string that describes on what data the breakpoint is set on or why a
   // data breakpoint is not available.
@@ -597,6 +643,9 @@
   // If not specified, the expression is evaluated in the global scope. When
   // `variablesReference` is specified, this property has no effect.
   optional<integer> frameId;
+  // The mode of the desired breakpoint. If defined, this must be one of the
+  // `breakpointModes` the debug adapter advertised in its `Capabilities`.
+  optional<string> mode;
   // The name of the variable's child to obtain data breakpoint information for.
   // If `variablesReference` isn't specified, this can be an expression.
   string name;
@@ -634,6 +683,15 @@
   // but can be omitted afterwards if this instruction maps to the same source
   // file as the previous instruction.
   optional<Source> location;
+  // A hint for how to present the instruction in the UI.
+  //
+  // A value of `invalid` may be used to indicate this instruction is 'filler'
+  // and cannot be reached by the program. For example, unreadable memory
+  // addresses may be presented is 'invalid.'
+  //
+  // Must be one of the following enumeration values:
+  // 'normal', 'invalid'
+  optional<string> presentationHint;
   // Name of the symbol that corresponds with the location of this instruction,
   // if any.
   optional<string> symbol;
@@ -785,9 +843,8 @@
   optional<integer> indexedVariables;
   // A memory reference to a location appropriate for this result.
   // For pointer type eval results, this is generally a reference to the memory
-  // address contained in the pointer. This attribute should be returned by a
-  // debug adapter if corresponding capability `supportsMemoryReferences` is
-  // true.
+  // address contained in the pointer. This attribute may be returned by a debug
+  // adapter if corresponding capability `supportsMemoryReferences` is true.
   optional<string> memoryReference;
   // The number of named child variables.
   // The client can use this information to present the variables in a paged UI
@@ -979,6 +1036,13 @@
 struct InitializeResponse : public Response {
   // The set of additional module information exposed by the debug adapter.
   optional<array<ColumnDescriptor>> additionalModuleColumns;
+  // Modes of breakpoints supported by the debug adapter, such as 'hardware' or
+  // 'software'. If present, the client may allow the user to select a mode and
+  // include it in its `setBreakpoints` request.
+  //
+  // Clients may present the first applicable mode in this array as the
+  // 'default' mode in gestures that set breakpoints.
+  optional<array<BreakpointMode>> breakpointModes;
   // The set of characters that should trigger completion in a REPL. If not
   // specified, the UI should assume the `.` character.
   optional<array<string>> completionTriggerCharacters;
@@ -1774,6 +1838,9 @@
   // `hitCondition` or `condition` is specified, then the message should only be
   // logged if those conditions are met.
   optional<string> logMessage;
+  // The mode of this breakpoint. If defined, this must be one of the
+  // `breakpointModes` the debug adapter advertised in its `Capabilities`.
+  optional<string> mode;
 };
 
 DAP_DECLARE_STRUCT_TYPEINFO(SourceBreakpoint);
@@ -1846,13 +1913,13 @@
 // the returned array must start with `filters` information first, followed by
 // `filterOptions` information. The `verified` property of a `Breakpoint` object
 // signals whether the exception breakpoint or filter could be successfully
-// created and whether the condition or hit count expressions are valid. In case
-// of an error the `message` property explains the problem. The `id` property
-// can be used to introduce a unique ID for the exception breakpoint or filter
-// so that it can be updated subsequently by sending breakpoint events. For
-// backward compatibility both the `breakpoints` array and the enclosing `body`
-// are optional. If these elements are missing a client is not able to show
-// problems for individual exception breakpoints or filters.
+// created and whether the condition is valid. In case of an error the `message`
+// property explains the problem. The `id` property can be used to introduce a
+// unique ID for the exception breakpoint or filter so that it can be updated
+// subsequently by sending breakpoint events. For backward compatibility both
+// the `breakpoints` array and the enclosing `body` are optional. If these
+// elements are missing a client is not able to show problems for individual
+// exception breakpoints or filters.
 struct SetExceptionBreakpointsResponse : public Response {
   // Information about the exception breakpoints or filters.
   // The breakpoints returned are in the same order as the elements of the
@@ -1901,15 +1968,20 @@
   // ID of an exception filter returned by the `exceptionBreakpointFilters`
   // capability.
   string filterId;
+  // The mode of this exception breakpoint. If defined, this must be one of the
+  // `breakpointModes` the debug adapter advertised in its `Capabilities`.
+  optional<string> mode;
 };
 
 DAP_DECLARE_STRUCT_TYPEINFO(ExceptionFilterOptions);
 
-// The request configures the debugger's response to thrown exceptions.
-// If an exception is configured to break, a `stopped` event is fired (with
-// reason `exception`). Clients should only call this request if the
-// corresponding capability `exceptionBreakpointFilters` returns one or more
-// filters.
+// The request configures the debugger's response to thrown exceptions. Each of
+// the `filters`, `filterOptions`, and `exceptionOptions` in the request are
+// independent configurations to a debug adapter indicating a kind of exception
+// to catch. An exception thrown in a program should result in a `stopped` event
+// from the debug adapter (with reason `exception`) if any of the configured
+// filters match. Clients should only call this request if the corresponding
+// capability `exceptionBreakpointFilters` returns one or more filters.
 struct SetExceptionBreakpointsRequest : public Request {
   using Response = SetExceptionBreakpointsResponse;
   // Configuration options for selected exceptions.
@@ -1937,6 +2009,11 @@
   // and fetch them in chunks. The value should be less than or equal to
   // 2147483647 (2^31-1).
   optional<integer> indexedVariables;
+  // A memory reference to a location appropriate for this result.
+  // For pointer type eval results, this is generally a reference to the memory
+  // address contained in the pointer. This attribute may be returned by a debug
+  // adapter if corresponding capability `supportsMemoryReferences` is true.
+  optional<string> memoryReference;
   // The number of named child variables.
   // The client can use this information to present the variables in a paged UI
   // and fetch them in chunks. The value should be less than or equal to
@@ -2047,7 +2124,10 @@
   // `EvaluateResponse`, `Variable`, `StackFrame`, `GotoTarget`, or
   // `Breakpoint`.
   string instructionReference;
-  // The offset from the instruction reference.
+  // The mode of this breakpoint. If defined, this must be one of the
+  // `breakpointModes` the debug adapter advertised in its `Capabilities`.
+  optional<string> mode;
+  // The offset from the instruction reference in bytes.
   // This can be negative.
   optional<integer> offset;
 };
@@ -2075,6 +2155,11 @@
   // and fetch them in chunks. The value should be less than or equal to
   // 2147483647 (2^31-1).
   optional<integer> indexedVariables;
+  // A memory reference to a location appropriate for this result.
+  // For pointer type eval results, this is generally a reference to the memory
+  // address contained in the pointer. This attribute may be returned by a debug
+  // adapter if corresponding capability `supportsMemoryReferences` is true.
+  optional<string> memoryReference;
   // The number of named child variables.
   // The client can use this information to present the variables in a paged UI
   // and fetch them in chunks. The value should be less than or equal to
@@ -2568,9 +2653,12 @@
   // The client can use this information to present the children in a paged UI
   // and fetch them in chunks.
   optional<integer> indexedVariables;
-  // The memory reference for the variable if the variable represents executable
-  // code, such as a function pointer. This attribute is only required if the
-  // corresponding capability `supportsMemoryReferences` is true.
+  // A memory reference associated with this variable.
+  // For pointer type variables, this is generally a reference to the memory
+  // address contained in the pointer. For executable data, this reference may
+  // later be used in a `disassemble` request. This attribute may be returned by
+  // a debug adapter if corresponding capability `supportsMemoryReferences` is
+  // true.
   optional<string> memoryReference;
   // The variable's name.
   string name;
@@ -2616,7 +2704,8 @@
 struct VariablesRequest : public Request {
   using Response = VariablesResponse;
   // The number of variables to return. If count is missing or 0, all variables
-  // are returned.
+  // are returned. The attribute is only honored by a debug adapter if the
+  // corresponding capability `supportsVariablePaging` is true.
   optional<integer> count;
   // Filter to limit the child variables to either named or indexed. If omitted,
   // both types are fetched.
@@ -2629,6 +2718,8 @@
   // capability `supportsValueFormattingOptions` is true.
   optional<ValueFormat> format;
   // The index of the first variable to return; if omitted children start at 0.
+  // The attribute is only honored by a debug adapter if the corresponding
+  // capability `supportsVariablePaging` is true.
   optional<integer> start;
   // The variable for which to retrieve its children. The `variablesReference`
   // must have been obtained in the current suspended state. See 'Lifetime of
diff --git a/src/protocol_events.cpp b/src/protocol_events.cpp
index 9deb85f..0cd6b9b 100644
--- a/src/protocol_events.cpp
+++ b/src/protocol_events.cpp
@@ -15,7 +15,7 @@
 // Generated with protocol_gen.go -- do not edit this file.
 //   go run scripts/protocol_gen/protocol_gen.go
 //
-// DAP version 1.59.0
+// DAP version 1.65.0
 
 #include "dap/protocol.h"
 
diff --git a/src/protocol_requests.cpp b/src/protocol_requests.cpp
index a3b33ec..dd5d3e3 100644
--- a/src/protocol_requests.cpp
+++ b/src/protocol_requests.cpp
@@ -15,7 +15,7 @@
 // Generated with protocol_gen.go -- do not edit this file.
 //   go run scripts/protocol_gen/protocol_gen.go
 //
-// DAP version 1.59.0
+// DAP version 1.65.0
 
 #include "dap/protocol.h"
 
@@ -55,6 +55,7 @@
 DAP_IMPLEMENT_STRUCT_TYPEINFO(DataBreakpointInfoRequest,
                               "dataBreakpointInfo",
                               DAP_FIELD(frameId, "frameId"),
+                              DAP_FIELD(mode, "mode"),
                               DAP_FIELD(name, "name"),
                               DAP_FIELD(variablesReference,
                                         "variablesReference"));
diff --git a/src/protocol_response.cpp b/src/protocol_response.cpp
index bab8ebb..1810c8a 100644
--- a/src/protocol_response.cpp
+++ b/src/protocol_response.cpp
@@ -15,7 +15,7 @@
 // Generated with protocol_gen.go -- do not edit this file.
 //   go run scripts/protocol_gen/protocol_gen.go
 //
-// DAP version 1.59.0
+// DAP version 1.65.0
 
 #include "dap/protocol.h"
 
@@ -83,6 +83,7 @@
     InitializeResponse,
     "",
     DAP_FIELD(additionalModuleColumns, "additionalModuleColumns"),
+    DAP_FIELD(breakpointModes, "breakpointModes"),
     DAP_FIELD(completionTriggerCharacters, "completionTriggerCharacters"),
     DAP_FIELD(exceptionBreakpointFilters, "exceptionBreakpointFilters"),
     DAP_FIELD(supportSuspendDebuggee, "supportSuspendDebuggee"),
@@ -177,6 +178,7 @@
 DAP_IMPLEMENT_STRUCT_TYPEINFO(SetExpressionResponse,
                               "",
                               DAP_FIELD(indexedVariables, "indexedVariables"),
+                              DAP_FIELD(memoryReference, "memoryReference"),
                               DAP_FIELD(namedVariables, "namedVariables"),
                               DAP_FIELD(presentationHint, "presentationHint"),
                               DAP_FIELD(type, "type"),
@@ -195,6 +197,7 @@
 DAP_IMPLEMENT_STRUCT_TYPEINFO(SetVariableResponse,
                               "",
                               DAP_FIELD(indexedVariables, "indexedVariables"),
+                              DAP_FIELD(memoryReference, "memoryReference"),
                               DAP_FIELD(namedVariables, "namedVariables"),
                               DAP_FIELD(type, "type"),
                               DAP_FIELD(value, "value"),
diff --git a/src/protocol_types.cpp b/src/protocol_types.cpp
index d9a9e36..2ae9100 100644
--- a/src/protocol_types.cpp
+++ b/src/protocol_types.cpp
@@ -15,7 +15,7 @@
 // Generated with protocol_gen.go -- do not edit this file.
 //   go run scripts/protocol_gen/protocol_gen.go
 //
-// DAP version 1.59.0
+// DAP version 1.65.0
 
 #include "dap/protocol.h"
 
@@ -48,6 +48,7 @@
                               DAP_FIELD(line, "line"),
                               DAP_FIELD(message, "message"),
                               DAP_FIELD(offset, "offset"),
+                              DAP_FIELD(reason, "reason"),
                               DAP_FIELD(source, "source"),
                               DAP_FIELD(verified, "verified"));
 
@@ -66,6 +67,13 @@
                               DAP_FIELD(type, "type"),
                               DAP_FIELD(width, "width"));
 
+DAP_IMPLEMENT_STRUCT_TYPEINFO(BreakpointMode,
+                              "",
+                              DAP_FIELD(appliesTo, "appliesTo"),
+                              DAP_FIELD(description, "description"),
+                              DAP_FIELD(label, "label"),
+                              DAP_FIELD(mode, "mode"));
+
 DAP_IMPLEMENT_STRUCT_TYPEINFO(ExceptionBreakpointsFilter,
                               "",
                               DAP_FIELD(conditionDescription,
@@ -81,6 +89,7 @@
     Capabilities,
     "",
     DAP_FIELD(additionalModuleColumns, "additionalModuleColumns"),
+    DAP_FIELD(breakpointModes, "breakpointModes"),
     DAP_FIELD(completionTriggerCharacters, "completionTriggerCharacters"),
     DAP_FIELD(exceptionBreakpointFilters, "exceptionBreakpointFilters"),
     DAP_FIELD(supportSuspendDebuggee, "supportSuspendDebuggee"),
@@ -148,6 +157,7 @@
                               DAP_FIELD(instructionBytes, "instructionBytes"),
                               DAP_FIELD(line, "line"),
                               DAP_FIELD(location, "location"),
+                              DAP_FIELD(presentationHint, "presentationHint"),
                               DAP_FIELD(symbol, "symbol"));
 
 DAP_IMPLEMENT_STRUCT_TYPEINFO(Message,
@@ -223,7 +233,8 @@
                               DAP_FIELD(condition, "condition"),
                               DAP_FIELD(hitCondition, "hitCondition"),
                               DAP_FIELD(line, "line"),
-                              DAP_FIELD(logMessage, "logMessage"));
+                              DAP_FIELD(logMessage, "logMessage"),
+                              DAP_FIELD(mode, "mode"));
 
 DAP_IMPLEMENT_STRUCT_TYPEINFO(DataBreakpoint,
                               "",
@@ -245,7 +256,8 @@
 DAP_IMPLEMENT_STRUCT_TYPEINFO(ExceptionFilterOptions,
                               "",
                               DAP_FIELD(condition, "condition"),
-                              DAP_FIELD(filterId, "filterId"));
+                              DAP_FIELD(filterId, "filterId"),
+                              DAP_FIELD(mode, "mode"));
 
 DAP_IMPLEMENT_STRUCT_TYPEINFO(FunctionBreakpoint,
                               "",
@@ -259,6 +271,7 @@
                               DAP_FIELD(hitCondition, "hitCondition"),
                               DAP_FIELD(instructionReference,
                                         "instructionReference"),
+                              DAP_FIELD(mode, "mode"),
                               DAP_FIELD(offset, "offset"));
 
 DAP_IMPLEMENT_STRUCT_TYPEINFO(StackFrame,