]> git.siccegge.de Git - frida/frida.git/blobdiff - src/disassembler/llvm/LLVMDisassembler.cxx
Use -Wextra and be -Wextra-clean
[frida/frida.git] / src / disassembler / llvm / LLVMDisassembler.cxx
index 773a5189a27a33d35085da9f698864970b3ac9ec..abfafa48e61d566de36c3b8879c555de84290561 100644 (file)
@@ -48,7 +48,7 @@ template <typename ELFT>
 LLVMDisassembler<ELFT>::LLVMDisassembler(const std::string& filename,
                                          InformationManager* manager,
                                          ELFObjectFile<ELFT>* file)
-       : Disassembler(filename, manager)
+       : Disassembler()
        , logger(log4cxx::Logger::getLogger("LLVMDisassembler"))
        , triple("unknown-unknown-unknown")
        , manager(manager)
@@ -335,10 +335,12 @@ void LLVMDisassembler<ELFT>::disassemble() {
                disassembleFunctionAt(_entryAddress, s.str());
        }
 
-       uint64_t text_entry;
-       text_section.getAddress(text_entry);
-       LOG4CXX_INFO(logger, "No Symbols found, starting at the beginning of the text segment");
-       disassembleFunctionAt(text_entry);
+       if (!manager->hasFunctions()) {
+               uint64_t text_entry;
+               text_section.getAddress(text_entry);
+               LOG4CXX_INFO(logger, "No Symbols found, starting at the beginning of the text segment");
+               disassembleFunctionAt(text_entry);
+       }
 }
 
 template <typename ELFT>