From b6db95ffaaeb32e216422293d5408091acde54a4 Mon Sep 17 00:00:00 2001 From: Christian Dietrich Date: Thu, 6 Aug 2015 11:16:20 +0200 Subject: [PATCH] import-trace: objdump importer cut off long lines Sometimes the lines in an objdump can get very long. Therefore, we limit the size of the field, which is put into the database, to the maximal size of the opcode, instruction, and comment column. Change-Id: I8d7db33e8319f71e9dae14f683bba0ce1654b1f8 --- tools/import-trace/ElfImporter.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/import-trace/ElfImporter.cc b/tools/import-trace/ElfImporter.cc index 6becbc77..c97b5970 100644 --- a/tools/import-trace/ElfImporter.cc +++ b/tools/import-trace/ElfImporter.cc @@ -184,10 +184,13 @@ bool ElfImporter::evaluate_objdump_line(const std::string& line) ss >> addr; std::string opcode = res[2]; boost::trim(opcode); + opcode = opcode.substr(0,32); std::string instruction = res[3]; boost::trim(instruction); + instruction = instruction.substr(0, 64); std::string comment = res[4]; boost::trim(comment); + comment = comment.substr(0, 128); // transform hex opcode to char array char opcode_read[33];