File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -365,6 +365,8 @@ class CommandObjectMemoryRead : public CommandObjectParsed {
365365 return ;
366366 }
367367
368+ ExecutionContextScope *exe_scope = m_exe_ctx.GetBestExecutionContextScope ();
369+
368370 CompilerType compiler_type;
369371 Status error;
370372
@@ -520,7 +522,7 @@ class CommandObjectMemoryRead : public CommandObjectParsed {
520522 --pointer_count;
521523 }
522524
523- auto size_or_err = compiler_type.GetByteSize (nullptr );
525+ auto size_or_err = compiler_type.GetByteSize (exe_scope );
524526 if (!size_or_err) {
525527 result.AppendErrorWithFormat (
526528 " unable to get the byte size of the type '%s'\n %s" ,
@@ -640,7 +642,7 @@ class CommandObjectMemoryRead : public CommandObjectParsed {
640642 if (!m_format_options.GetFormatValue ().OptionWasSet ())
641643 m_format_options.GetFormatValue ().SetCurrentValue (eFormatDefault);
642644
643- auto size_or_err = compiler_type.GetByteSize (nullptr );
645+ auto size_or_err = compiler_type.GetByteSize (exe_scope );
644646 if (!size_or_err) {
645647 result.AppendError (llvm::toString (size_or_err.takeError ()));
646648 return ;
@@ -800,7 +802,6 @@ class CommandObjectMemoryRead : public CommandObjectParsed {
800802 output_stream_p = &result.GetOutputStream ();
801803 }
802804
803- ExecutionContextScope *exe_scope = m_exe_ctx.GetBestExecutionContextScope ();
804805 if (compiler_type.GetOpaqueQualType ()) {
805806 for (uint32_t i = 0 ; i < item_count; ++i) {
806807 addr_t item_addr = addr + (i * item_byte_size);
You can’t perform that action at this time.
0 commit comments