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
This commit is contained in:
@ -234,7 +234,7 @@ bool DwarfReader::read_mapping(std::string fileName, std::list<addrToLine>& addr
|
||||
}
|
||||
|
||||
if (lineNo&&isCode) {
|
||||
struct addrToLine newLine = { (int) addr, (int) lineNo, normalize(lineSource) };
|
||||
struct addrToLine newLine = { addr, lineNo, normalize(lineSource) };
|
||||
addrToLineList.push_back(newLine);
|
||||
}
|
||||
|
||||
|
||||
@ -16,8 +16,8 @@ namespace fail {
|
||||
*/
|
||||
|
||||
struct addrToLine {
|
||||
int absoluteAddr;
|
||||
int lineNumber;
|
||||
unsigned absoluteAddr;
|
||||
unsigned lineNumber;
|
||||
std::string lineSource;
|
||||
};
|
||||
|
||||
|
||||
@ -40,7 +40,7 @@ bool ElfImporter::create_database()
|
||||
create_statement.str("");
|
||||
create_statement << "CREATE TABLE IF NOT EXISTS objdump ("
|
||||
" variant_id int(11) NOT NULL,"
|
||||
" instr_address int(11) NOT NULL,"
|
||||
" instr_address int(11) UNSIGNED NOT NULL,"
|
||||
" opcode varchar(32) NOT NULL,"
|
||||
" disassemble VARCHAR(64),"
|
||||
" comment VARCHAR(128),"
|
||||
@ -77,8 +77,8 @@ bool ElfImporter::create_database()
|
||||
create_statement.str("");
|
||||
create_statement << "CREATE TABLE IF NOT EXISTS dbg_mapping ("
|
||||
" variant_id int(11) NOT NULL,"
|
||||
" instr_absolute int(11) NOT NULL,"
|
||||
" linenumber int(11) NOT NULL,"
|
||||
" instr_absolute int(11) UNSIGNED NOT NULL,"
|
||||
" linenumber int(11) UNSIGNED NOT NULL,"
|
||||
" file_id int(11) NOT NULL,"
|
||||
" PRIMARY KEY (variant_id, instr_absolute ,linenumber)"
|
||||
") engine=MyISAM ";
|
||||
|
||||
Reference in New Issue
Block a user