mirror of
https://github.com/geohot/qira
synced 2025-03-14 02:52:52 +03:00
fix up bash -e and support clickable registers
This commit is contained in:
parent
20001f8fcb
commit
e30967879f
@ -1,5 +1,5 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
#!/bin/bash -e
|
||||
|
||||
rm -rf distrib/
|
||||
mkdir -p distrib/qira
|
||||
|
||||
|
@ -1,5 +1,4 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
#!/bin/bash -e
|
||||
|
||||
./install.sh
|
||||
./qemu_build.sh
|
||||
|
@ -70,6 +70,7 @@ class Program:
|
||||
else:
|
||||
raise Exception("binary type "+hex(self.fb)+" not supported")
|
||||
|
||||
self.qirabinary = os.path.realpath(self.qirabinary)
|
||||
print "**** using",self.qirabinary,"for",hex(self.fb)
|
||||
|
||||
# no traces yet
|
||||
|
@ -218,21 +218,24 @@ def getregisters(forknum, clnum):
|
||||
|
||||
@socketio.on('getstrace', namespace='/qira')
|
||||
def get_strace(forknum):
|
||||
if forknum not in program.traces:
|
||||
return
|
||||
trace = program.traces[forknum]
|
||||
try:
|
||||
f = open("/tmp/qira_logs/"+str(int(forknum))+"_strace").read()
|
||||
except:
|
||||
return "no strace"
|
||||
|
||||
ret = []
|
||||
first_clnum = None
|
||||
for ff in f.split("\n"):
|
||||
if ff == '':
|
||||
continue
|
||||
ff = ff.split(" ")
|
||||
clnum = int(ff[0])
|
||||
if first_clnum == None:
|
||||
first_clnum = clnum
|
||||
if clnum == first_clnum:
|
||||
try:
|
||||
clnum = int(ff[0])
|
||||
except:
|
||||
continue
|
||||
if clnum == trace.db.get_minclnum():
|
||||
# filter the boring syscalls
|
||||
continue
|
||||
pid = int(ff[1])
|
||||
|
@ -1,5 +1,4 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
#!/bin/bash -e
|
||||
|
||||
if [ ! -d qemu/qemu-latest ]; then
|
||||
rm -rf qemu
|
||||
|
@ -1,3 +1,4 @@
|
||||
include qiradb/*
|
||||
include setup.py
|
||||
include VERSION
|
||||
|
||||
|
@ -91,6 +91,10 @@ var baseevents = {
|
||||
var daddr = parseInt(e.target.getAttribute('daddr'));
|
||||
Session.set('daddr', daddr);
|
||||
},
|
||||
'click .register': function(e) {
|
||||
// the registers are in the zero page
|
||||
Session.set('daddr', this.address);
|
||||
}
|
||||
};
|
||||
|
||||
// uniform events everywhere
|
||||
|
@ -104,6 +104,14 @@ Template.regviewer.datatype = function() {
|
||||
return get_data_type(this.value);
|
||||
};
|
||||
|
||||
Template.regviewer.isselected = function() {
|
||||
if (Session.get('daddr') == this.address) {
|
||||
return 'highlight';
|
||||
} else {
|
||||
return '';
|
||||
}
|
||||
};
|
||||
|
||||
// keep these updated
|
||||
Deps.autorun(function() {
|
||||
var daddr = Session.get('daddr');
|
||||
|
@ -60,7 +60,7 @@
|
||||
<template name="regviewer">
|
||||
{{#each regs}}
|
||||
<div class="reg {{regactions}}">
|
||||
{{name}}: <span class="{{datatype}}">{{hexvalue}}</span>
|
||||
<span class="register {{isselected}}">{{name}}: </span><span class="{{datatype}}">{{hexvalue}}</span>
|
||||
</div>
|
||||
{{/each}}
|
||||
</template>
|
||||
|
Loading…
x
Reference in New Issue
Block a user