summaryrefslogtreecommitdiff
path: root/src/binary-reader-objdump.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/binary-reader-objdump.cc')
-rw-r--r--src/binary-reader-objdump.cc14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/binary-reader-objdump.cc b/src/binary-reader-objdump.cc
index 67b27cdc..d77cb8ad 100644
--- a/src/binary-reader-objdump.cc
+++ b/src/binary-reader-objdump.cc
@@ -37,6 +37,8 @@ class BinaryReaderObjdumpBase : public BinaryReaderNop {
ObjdumpOptions* options,
ObjdumpState* state);
+ bool OnError(const char* message) override;
+
Result BeginModule(uint32_t version) override;
Result BeginSection(BinarySection section_type, Offset size) override;
@@ -78,6 +80,13 @@ Result BinaryReaderObjdumpBase::BeginSection(BinarySection section_code,
return Result::Ok;
}
+bool BinaryReaderObjdumpBase::OnError(const char* message) {
+ // Tell the BinaryReader that this error is "handled" for all passes other
+ // than the prepass. When the error is handled the default message will be
+ // suppressed.
+ return options_->mode != ObjdumpMode::Prepass;
+}
+
Result BinaryReaderObjdumpBase::BeginModule(uint32_t version) {
switch (options_->mode) {
case ObjdumpMode::Headers:
@@ -1129,7 +1138,10 @@ Result ReadBinaryObjdump(const uint8_t* data,
ObjdumpState* state) {
Features features;
features.EnableAll();
- ReadBinaryOptions read_options(features, options->log_stream, true);
+ const bool kReadDebugNames = true;
+ const bool kStopOnFirstError = false;
+ ReadBinaryOptions read_options(features, options->log_stream, kReadDebugNames,
+ kStopOnFirstError);
switch (options->mode) {
case ObjdumpMode::Prepass: {