MCPcopy Create free account
hub / github.com/columbia/egalito / parse

Method parse

app/objdump/objdump.cpp:10–39  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8#include "log/temp.h"
9
10void ObjDump::parse(const char *filename) {
11 std::cout << "objdump file [" << filename << "]\n";
12
13 if(!options.getDebugMessages()) {
14 // Note: once we disable messages, we never re-enable them.
15 // Right now the old settings aren't saved so it's not easy to do.
16 GroupRegistry::getInstance()->muteAllSettings();
17 }
18
19 try {
20 if(ElfMap::isElf(filename)) {
21 std::cout << "parsing ELF file with recursive="
22 << options.getRecursive() << "...\n";
23 setup.parseElfFiles(filename, options.getRecursive(), false);
24 }
25 else {
26 std::cout << "parsing archive...\n";
27 setup.parseEgalitoArchive(filename);
28 }
29
30 const int logLevel = options.getShowBytes() ? 20 : 9;
31 TemporaryLogLevel enableDisassemblyOutput1("chunk", logLevel);
32 TemporaryLogLevel enableDisassemblyOutput2("disasm", logLevel);
33 ChunkDumper dumper(options.getShowBasicBlocks());
34 setup.getConductor()->acceptInAllModules(&dumper);
35 }
36 catch(const char *message) {
37 std::cout << "Exception: " << message << std::endl;
38 }
39}
40
41void printUsage(const char *program) {
42 std::cout << "Usage: " << program << " [options] file1 file2...\n"

Callers 4

constructMethod · 0.45
parseFunction · 0.45
mainFunction · 0.45
parseFunction · 0.45

Calls 9

getDebugMessagesMethod · 0.80
muteAllSettingsMethod · 0.80
getRecursiveMethod · 0.80
parseElfFilesMethod · 0.80
getShowBytesMethod · 0.80
getShowBasicBlocksMethod · 0.80
acceptInAllModulesMethod · 0.80
parseEgalitoArchiveMethod · 0.45
getConductorMethod · 0.45

Tested by

no test coverage detected