saugustine created this revision. Herald added a project: All. saugustine requested review of this revision. Herald added a project: LLDB. Herald added a subscriber: lldb-commits.
Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D121732 Files: lldb/source/Expression/DWARFExpression.cpp Index: lldb/source/Expression/DWARFExpression.cpp =================================================================== --- lldb/source/Expression/DWARFExpression.cpp +++ lldb/source/Expression/DWARFExpression.cpp @@ -1297,7 +1297,7 @@ addr_t load_addr = *maybe_load_addr; if (load_addr == LLDB_INVALID_ADDRESS && so_addr.IsSectionOffset()) { - uint8_t addr_bytes[size]; + uint8_t addr_bytes[8]; Status error; if (exe_ctx->GetTargetRef().ReadMemory( @@ -1306,7 +1306,7 @@ ObjectFile *objfile = module_sp->GetObjectFile(); stack.back().GetScalar() = DerefSizeExtractDataHelper( - addr_bytes, sizeof(addr_bytes), objfile->GetByteOrder(), size); + addr_bytes, size, objfile->GetByteOrder(), size); stack.back().ClearContext(); break; } else {
Index: lldb/source/Expression/DWARFExpression.cpp =================================================================== --- lldb/source/Expression/DWARFExpression.cpp +++ lldb/source/Expression/DWARFExpression.cpp @@ -1297,7 +1297,7 @@ addr_t load_addr = *maybe_load_addr; if (load_addr == LLDB_INVALID_ADDRESS && so_addr.IsSectionOffset()) { - uint8_t addr_bytes[size]; + uint8_t addr_bytes[8]; Status error; if (exe_ctx->GetTargetRef().ReadMemory( @@ -1306,7 +1306,7 @@ ObjectFile *objfile = module_sp->GetObjectFile(); stack.back().GetScalar() = DerefSizeExtractDataHelper( - addr_bytes, sizeof(addr_bytes), objfile->GetByteOrder(), size); + addr_bytes, size, objfile->GetByteOrder(), size); stack.back().ClearContext(); break; } else {
_______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits