File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -287,12 +287,11 @@ void SendInvalidatedEvent(
287287void SendMemoryEvent (DAP &dap, lldb::SBValue variable) {
288288 if (!dap.clientFeatures .contains (protocol::eClientFeatureMemoryEvent))
289289 return ;
290- const lldb::addr_t addr = variable.GetLoadAddress ();
291- if (addr == LLDB_INVALID_ADDRESS)
292- return ;
293290 protocol::MemoryEventBody body;
294- body.memoryReference = addr ;
291+ body.memoryReference = variable. GetLoadAddress () ;
295292 body.count = variable.GetByteSize ();
293+ if (body.memoryReference == LLDB_INVALID_ADDRESS)
294+ return ;
296295 dap.Send (protocol::Event{" memory" , std::move (body)});
297296}
298297
Original file line number Diff line number Diff line change 2121#define LLDB_TOOLS_LLDB_DAP_PROTOCOL_PROTOCOL_EVENTS_H
2222
2323#include " Protocol/ProtocolTypes.h"
24+ #include " lldb/lldb-defines.h"
2425#include " lldb/lldb-types.h"
2526#include " llvm/Support/JSON.h"
2627#include < cstdint>
@@ -106,13 +107,13 @@ llvm::json::Value toJSON(const InvalidatedEventBody &);
106107// / many events.
107108struct MemoryEventBody {
108109 // / Memory reference of a memory range that has been updated.
109- lldb::addr_t memoryReference;
110+ lldb::addr_t memoryReference = LLDB_INVALID_ADDRESS ;
110111
111112 // / Starting offset in bytes where memory has been updated. Can be negative.
112113 int64_t offset = 0 ;
113114
114115 // / Number of bytes updated.
115- uint64_t count;
116+ uint64_t count = 0 ;
116117};
117118llvm::json::Value toJSON (const MemoryEventBody &);
118119
You can’t perform that action at this time.
0 commit comments