mirror of
https://github.com/geohot/qira
synced 2025-03-14 11:03:08 +03:00
ugly bugfix during ctf
This commit is contained in:
parent
a64cd1f55e
commit
6c07942515
@ -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) {
|
||||
|
@ -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")?'<--':'--')+' '+
|
||||
'<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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user