Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewchambers committed Aug 4, 2012
1 parent 5c9b9f6 commit 90db726
Show file tree
Hide file tree
Showing 8 changed files with 32 additions and 5 deletions.
12 changes: 7 additions & 5 deletions tools/AssemblyView.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ class AssemblyView(wx.Frame):
def __init__(self):
wx.Frame.__init__(self,None, -1, 'AssemblyView')
toolbar = self.CreateToolBar()
load = toolbar.AddLabelTool(wx.ID_ANY, 'load', wx.Bitmap('tools/tload.png'))
reset = toolbar.AddLabelTool(wx.ID_ANY, 'reset', wx.Bitmap('tools/treset.png'))
step = toolbar.AddLabelTool(wx.ID_ANY, 'step', wx.Bitmap('tools/tstep.png'))
run = toolbar.AddLabelTool(wx.ID_ANY, 'run', wx.Bitmap('tools/trun.png'))
pause = toolbar.AddLabelTool(wx.ID_ANY, 'break', wx.Bitmap('tools/tbreak.png'))
load = toolbar.AddLabelTool(wx.ID_ANY, 'load', wx.Bitmap('tload.png'))
reset = toolbar.AddLabelTool(wx.ID_ANY, 'reset', wx.Bitmap('treset.png'))
step = toolbar.AddLabelTool(wx.ID_ANY, 'step', wx.Bitmap('tstep.png'))
run = toolbar.AddLabelTool(wx.ID_ANY, 'run', wx.Bitmap('trun.png'))
pause = toolbar.AddLabelTool(wx.ID_ANY, 'break', wx.Bitmap('tbreak.png'))
toolbar.Realize()
self.Bind(wx.EVT_TOOL, self.onLoad, load)
self.Bind(wx.EVT_TOOL, self.onStep, step)
Expand Down Expand Up @@ -46,12 +46,14 @@ def onPause(self,evt):
def onStep(self,evt):
try:
self.av.dbg.step()
self.av.Refresh()
except socket.error:
wx.MessageBox('Not connected', 'Error', wx.OK | wx.ICON_ERROR)
except Exception as e:
wx.MessageBox(str(e), 'Error', wx.OK | wx.ICON_ERROR)
def onLoad(self,evt):
diag = wx.FileDialog(None)
diag.SetWildcard("*.srec")
r = diag.ShowModal()
if r != wx.ID_OK:
return
Expand Down
18 changes: 18 additions & 0 deletions tools/debugger.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#! /bin/bash

SOURCE="${BASH_SOURCE[0]}"
DIR="$( dirname "$SOURCE" )"
while [ -h "$SOURCE" ]
do
SOURCE="$(readlink "$SOURCE")"
[[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE"
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
done
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"


pushd $DIR
python AssemblyView.py &
python CPUView.py &
wait
popd
7 changes: 7 additions & 0 deletions tools/mips32emu/DbgEngine.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,13 @@ def disassemble(self,op):
dis = [l[6:] for l in dis.split("\n") if l.startswith(" 0:\t") ].pop()
self.disasmCache.put(op,dis)
return dis
def run(self):
self.s.send("run\n")
res = self.s.recv(1024)
if res.startswith('ok'):
return
else:
raise CommandException("run failed")
def dbgBreak(self):
self.s.send("break\n")
res = self.s.recv(1024)
Expand Down
Binary file modified tools/tbreak.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tools/tload.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tools/treset.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tools/trun.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tools/tstep.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 90db726

Please sign in to comment.