Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions lldb/source/Commands/CommandObjectMemory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,8 @@ class CommandObjectMemoryRead : public CommandObjectParsed {
return;
}

ExecutionContextScope *exe_scope = m_exe_ctx.GetBestExecutionContextScope();

CompilerType compiler_type;
Status error;

Expand Down Expand Up @@ -520,7 +522,7 @@ class CommandObjectMemoryRead : public CommandObjectParsed {
--pointer_count;
}

auto size_or_err = compiler_type.GetByteSize(nullptr);
auto size_or_err = compiler_type.GetByteSize(exe_scope);
if (!size_or_err) {
result.AppendErrorWithFormat(
"unable to get the byte size of the type '%s'\n%s",
Expand Down Expand Up @@ -640,7 +642,7 @@ class CommandObjectMemoryRead : public CommandObjectParsed {
if (!m_format_options.GetFormatValue().OptionWasSet())
m_format_options.GetFormatValue().SetCurrentValue(eFormatDefault);

auto size_or_err = compiler_type.GetByteSize(nullptr);
auto size_or_err = compiler_type.GetByteSize(exe_scope);
if (!size_or_err) {
result.AppendError(llvm::toString(size_or_err.takeError()));
return;
Expand Down Expand Up @@ -800,7 +802,6 @@ class CommandObjectMemoryRead : public CommandObjectParsed {
output_stream_p = &result.GetOutputStream();
}

ExecutionContextScope *exe_scope = m_exe_ctx.GetBestExecutionContextScope();
if (compiler_type.GetOpaqueQualType()) {
for (uint32_t i = 0; i < item_count; ++i) {
addr_t item_addr = addr + (i * item_byte_size);
Expand Down
Loading