File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -240,9 +240,13 @@ bool ValueObjectDynamicValue::UpdateValue() {
240
240
if (m_address.IsValid ())
241
241
SetValueDidChange (true );
242
242
243
- // If we found a host address, point to the buffer in host memory.
244
- // Later on this function will copy the buffer over.
245
- if (value_type == Value::ValueType::HostAddress && !local_buffer.empty ()) {
243
+ auto *exe_scope = exe_ctx.GetBestExecutionContextScope ();
244
+ // If we found a host address, and the dynamic type fits in the local buffer
245
+ // that was found, point to thar buffer. Later on this function will copy
246
+ // the buffer over.
247
+ if (value_type == Value::ValueType::HostAddress && !local_buffer.empty () &&
248
+ local_buffer.size () <=
249
+ m_dynamic_type_info.GetCompilerType ().GetByteSize (exe_scope)) {
246
250
m_value.GetScalar () = (uint64_t )local_buffer.data ();
247
251
m_address = LLDB_INVALID_ADDRESS;
248
252
} else {
You can’t perform that action at this time.
0 commit comments