ugly bugfix during ctf

This commit is contained in:
George Hotz 2014-09-20 17:58:53 +00:00
parent a64cd1f55e
commit 6c07942515
2 changed files with 10 additions and 4 deletions

View File

@ -60,13 +60,19 @@ Deps.autorun(function() { DA("history");
// ** end history ***
function get_data_type(v) {
function get_data_type(v, more) {
if (typeof v == "number") throw "numbers no longer supported here";
// haxx
var pmaps = Session.get('pmaps');
var a = pmaps[bn_round(v, 3)];
if (a === undefined) return "";
else return "data"+a;
else {
if (more !== undefined) {
return "data"+a+" addr addr_"+v;
} else {
return "data"+a;
}
}
}
function update_dview(addr) {

View File

@ -164,9 +164,9 @@ function on_clnum(msg) { DS("clnum");
if (dc.type == "L") typeclass = "regread";
else if (dc.type == "S") typeclass = "regwrite";
datachanges += '<div class="datachanges '+typeclass+'"> '+
'<span class="'+get_data_type(dc.address)+'">'+dc.address+'</span> '+
'<span class="'+get_data_type(dc.address, true)+'">'+dc.address+'</span> '+
((dc.type == "S")?'&lt;--':'--')+' '+
'<span class="'+get_data_type(dc.data)+'">'+dc.data+'</span> '+
'<span class="'+get_data_type(dc.data, true)+'">'+dc.data+'</span> '+
'</div> ';
}
$('#datachanges').html(datachanges);