From b070c8ec3025b80f20b6230259fba989931c1d6b Mon Sep 17 00:00:00 2001 From: travisutk Date: Sun, 28 Feb 2010 01:47:42 +0000 Subject: [PATCH] getpc() method git-svn-id: https://svn.code.sf.net/p/goodfet/code/trunk@366 12e2690d-a6be-4b82-a7b7-67c4a43b65c8 --- client/GoodFET.py | 2 ++ client/GoodFETCC.py | 2 ++ client/GoodFETConsole.py | 4 +++- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/client/GoodFET.py b/client/GoodFET.py index 077ee75..3500c62 100755 --- a/client/GoodFET.py +++ b/client/GoodFET.py @@ -293,6 +293,8 @@ class GoodFET: return; def resume(self): return; + def getpc(self): + return 0xdead; def flash(self,file): """Flash an intel hex file to code memory.""" print "Flash not implemented."; diff --git a/client/GoodFETCC.py b/client/GoodFETCC.py index 19e2731..f937ac9 100644 --- a/client/GoodFETCC.py +++ b/client/GoodFETCC.py @@ -171,6 +171,8 @@ class GoodFETCC(GoodFET): sys.exit(1); #return 2048; return size; + def getpc(self): + return self.CCgetPC(); def CCgetPC(self): """Get a chipcon's PC.""" self.writecmd(self.APP,0x83,0,None); diff --git a/client/GoodFETConsole.py b/client/GoodFETConsole.py index 84fbd71..751f580 100644 --- a/client/GoodFETConsole.py +++ b/client/GoodFETConsole.py @@ -73,7 +73,6 @@ class GoodFETConsole(): print self.client.halt(); def CMDresume(self,args): print self.client.resume(); - def CMDpeek(self,args): adr=eval(args[1]); memory="vn"; @@ -83,6 +82,9 @@ class GoodFETConsole(): def CMDflash(self,args): file=args[1]; self.client.flash(self.expandfilename(file)); + def CMDwhere(self,args): + pc=self.client.getpc(); + print "PC=0x%04X" % pc; def CMDchip(self,args): cmd="self.client.CMD%s()" % args[1]; print cmd; -- 2.20.1