Commit Graph

9 Commits

Author SHA1 Message Date
b6db95ffaa 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
2015-09-18 12:51:55 +02:00
5378573b1d util/DwarfReader, ElfImporter: import address ranges
This change implements the following:
-DwarfReader now exports the address range of linetable-entries instead of
	only the first address
-ElfImporter saves this range alongside the mapping

Change-Id: I7fe6361178f761a8f605a44bb0183c56a236cc95
2014-10-22 15:42:05 +02:00
d94b005be2 util/DwarfReader, ElfImporter: use unsigned addresses
This change alters DwarfReader and import-trace's ElfImporter so that they use
unsigned int for static address and line numbers instead of signed int.

Change-Id: I84ebbb500afd7cd4d93b137a35dcf736dc679fab
2014-10-22 14:30:43 +02:00
8fcbc7eeae import-trace: ElfImporter cleanups
-  added several insert_multiple() flushes (which completely broke
    the import before)
 -  import_source_code() refactored
 -  parameter naming improved
 -  better error handling
 -  whitespace/coding-style cleanups
 -  documentation added + cleanups

Change-Id: I70ac95391b9678e0dcce8adfa7df69a4f91ca30d
2014-10-15 11:42:29 +02:00
31166f990e import-trace: fix source line mapping to file IDs
Up to now, source code lines and mappings from static instruction
addresses to lines could be linked to the wrong file if
dbg_filename.path contained duplicates.  This is unfortunately the
normal case when importing multiple variants of the same program into
the database.

Change-Id: I57e71379584d7b01177606192b3aa644846225db
2014-10-08 13:08:05 +02:00
99f5d2833e ElfImporter: removed --debug, refactored code
This change removes the "--debug" parameter, which previously imported the
mapping of source code lines to static instructions into the database. This
mapping is useless by itself (i.e. without "--sources"), which is why its
code was refactored into the code handling "--sources".

Change-Id: I4700eb0a98661f4df9eb3c190f00dcbe4df0e200
2014-10-07 13:28:03 +02:00
13175c259b import-trace: import debug info
If the --debug option is set, the line number table of the elf binary will
be imported into the database. The information will be stored in the
"dbg_mapping" table.

If the --sources option is set, the source files will be imported
into the database. Only the files that were actually used in the
elf binary will be imported.

Change-Id: I0e9de6b456bc42b329c1700c25e5839d9552cdbb
2014-01-28 11:07:34 +01:00
4cb97a7fa5 formatting, typos, comments, details
Change-Id: Iae5f1acb653a694622e9ac2bad93efcfca588f3a
2014-01-22 13:08:13 +01:00
148b09be2e tools/import-trace: added ElfImporter
The ElfImporter is not a real trace importer, but we locate it
into the import-trace utility, since here the infrastructure is
already in place to import things related to an elf binary into
the database.

The ElfImporter calls objdump and dissassembles an elf binary
and imports the results into the database.

Change-Id: I6e35673c8dbee3b7e8dfc7549d10e5dca9b55935
2013-10-24 15:30:17 +02:00