fix up bash -e and support clickable registers

This commit is contained in:
George Hotz 2014-07-28 15:21:58 -07:00
parent 20001f8fcb
commit e30967879f
9 changed files with 27 additions and 12 deletions

View File

@ -1,5 +1,5 @@
#!/bin/bash
set -e
#!/bin/bash -e
rm -rf distrib/
mkdir -p distrib/qira

View File

@ -1,5 +1,4 @@
#!/bin/bash
set -e
#!/bin/bash -e
./install.sh
./qemu_build.sh

View File

@ -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

View File

@ -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])

View File

@ -1,5 +1,4 @@
#!/bin/bash
set -e
#!/bin/bash -e
if [ ! -d qemu/qemu-latest ]; then
rm -rf qemu

View File

@ -1,3 +1,4 @@
include qiradb/*
include setup.py
include VERSION

View File

@ -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

View File

@ -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');

View File

@ -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>