[Lldb-commits] [lldb] e69d359 - [lldb] Actually fix format specifier after D108233
Fangrui Song via lldb-commits
lldb-commits at lists.llvm.org
Mon Sep 13 13:40:43 PDT 2021
Author: Fangrui Song
Date: 2021-09-13T13:40:37-07:00
New Revision: e69d359841b6358f1d17569212ef8cf91244ca11
URL: https://github.com/llvm/llvm-project/commit/e69d359841b6358f1d17569212ef8cf91244ca11
DIFF: https://github.com/llvm/llvm-project/commit/e69d359841b6358f1d17569212ef8cf91244ca11.diff
LOG: [lldb] Actually fix format specifier after D108233
And revert c4fa2c8aa493e4c786446739ba3eb0eb4918d579
Added:
Modified:
lldb/source/Plugins/ObjectFile/Minidump/MinidumpFileBuilder.cpp
Removed:
################################################################################
diff --git a/lldb/source/Plugins/ObjectFile/Minidump/MinidumpFileBuilder.cpp b/lldb/source/Plugins/ObjectFile/Minidump/MinidumpFileBuilder.cpp
index 03722b391004..a70e6a079f76 100644
--- a/lldb/source/Plugins/ObjectFile/Minidump/MinidumpFileBuilder.cpp
+++ b/lldb/source/Plugins/ObjectFile/Minidump/MinidumpFileBuilder.cpp
@@ -28,6 +28,8 @@
#include "Plugins/Process/minidump/MinidumpTypes.h"
+#include <cinttypes>
+
using namespace lldb;
using namespace lldb_private;
using namespace llvm::minidump;
@@ -729,7 +731,7 @@ Status MinidumpFileBuilder::Dump(lldb::FileUP &core_file) const {
if (error.Fail() || bytes_written != header_size) {
if (bytes_written != header_size)
error.SetErrorStringWithFormat(
- "Unable to write the header. (written %ld/%ld).", bytes_written,
+ "unable to write the header (written %zd/%zd)", bytes_written,
header_size);
return error;
}
@@ -740,7 +742,7 @@ Status MinidumpFileBuilder::Dump(lldb::FileUP &core_file) const {
if (error.Fail() || bytes_written != m_data.GetByteSize()) {
if (bytes_written != m_data.GetByteSize())
error.SetErrorStringWithFormat(
- "Unable to write the data. (written %ld/%llu).", bytes_written,
+ "unable to write the data (written %zd/%" PRIu64 ")", bytes_written,
m_data.GetByteSize());
return error;
}
@@ -752,7 +754,7 @@ Status MinidumpFileBuilder::Dump(lldb::FileUP &core_file) const {
if (error.Fail() || bytes_written != directory_size) {
if (bytes_written != directory_size)
error.SetErrorStringWithFormat(
- "Unable to write the directory. (written %ld/%ld).", bytes_written,
+ "unable to write the directory (written %zd/%zd)", bytes_written,
directory_size);
return error;
}
More information about the lldb-commits
mailing list