it's time for trails, let's steal from george

also small cleanup in ida plugin
This commit is contained in:
Ned Williamson 2015-09-24 16:53:49 -04:00
parent 1ac1915137
commit fe757325df
2 changed files with 23 additions and 8 deletions

View File

@ -210,14 +210,6 @@ static int idaapi hook(void *user_data, int event_id, va_list va) {
} }
} }
old_addr = addr; old_addr = addr;
} else if (event_id == view_activated) {
// I can't hook renaming directly so for now we use
// the inferior view_activated, which will trigger
// name syncing after dialog boxes are closed / the
// main window is refocused.
//msg("auto-syncing\n");
//send_names();
//send_comments();
} }
return 0; return 0;
} }

View File

@ -72,3 +72,26 @@ Deps.autorun(function() { DA("send user names and comments to ida");
p("Unknown tag type from user: " + tagname) p("Unknown tag type from user: " + tagname)
} }
}); });
Deps.autorun(function() { DA("send trail to ida");
var trail = Session.get("trail");
//p(trail[0]);
if (trail !== undefined) {
for (var i = 0; i < trail.length; i++) {
var cldiff = trail[i][0];
var addr = trail[i][1];
if (cldiff <= 0) {
p(trail[i]);
//p(cldiff);
/*var htrail = $($(".insaddr.addr_"+trail[i][1]).parents(".instruction_static")[0]);
p(cldiff, htrail);
var opacity = ((16+cldiff)/35.0);
htrail.css('background-color', 'rgba(0,0,255,'+opacity+')');
htrail.addClass("trail");*/
}
}
}
//for (var i = 0; i < trails.length; i++) {
// p("trail" + str(i) + " -> " + trails[i]);
//}
});