MCPcopy Create free account
hub / github.com/WebAssembly/wabt / ReadBinaryObjdump

Function ReadBinaryObjdump

src/binary-reader-objdump.cc:2511–2539  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2509}
2510
2511Result ReadBinaryObjdump(const uint8_t* data,
2512 size_t size,
2513 ObjdumpOptions* options,
2514 ObjdumpState* state) {
2515 Features features;
2516 features.EnableAll();
2517 const bool kReadDebugNames = true;
2518 const bool kStopOnFirstError = false;
2519 const bool kFailOnCustomSectionError = false;
2520 ReadBinaryOptions read_options(features, options->log_stream, kReadDebugNames,
2521 kStopOnFirstError, kFailOnCustomSectionError);
2522
2523 switch (options->mode) {
2524 case ObjdumpMode::Prepass: {
2525 read_options.skip_function_bodies = true;
2526 BinaryReaderObjdumpPrepass reader(data, size, options, state);
2527 return ReadBinary(data, size, &reader, read_options);
2528 }
2529 case ObjdumpMode::Disassemble: {
2530 BinaryReaderObjdumpDisassemble reader(data, size, options, state);
2531 return ReadBinary(data, size, &reader, read_options);
2532 }
2533 default: {
2534 read_options.skip_function_bodies = true;
2535 BinaryReaderObjdump reader(data, size, options, state);
2536 return ReadBinary(data, size, &reader, read_options);
2537 }
2538 }
2539}
2540
2541} // namespace wabt

Callers 2

LLVMFuzzerTestOneInputFunction · 0.85
dump_fileFunction · 0.85

Calls 2

ReadBinaryFunction · 0.85
EnableAllMethod · 0.80

Tested by

no test coverage detected