X-Git-Url: http://git.rot13.org/?p=goodfet;a=blobdiff_plain;f=client%2FGoodFET.py;h=97e79961c785aa90db12db5e3313d0ecbff2001e;hp=53026dfe60c17c146f2b41fd2de17d82a75f93fd;hb=3fe9208501908b0522deaf3f7e938f4640f2b624;hpb=042a155324ef5b76951e0194f61ab28c1c0521ce diff --git a/client/GoodFET.py b/client/GoodFET.py index 53026df..97e7996 100755 --- a/client/GoodFET.py +++ b/client/GoodFET.py @@ -372,7 +372,16 @@ class GoodFET: def eeprompeek(self,address): """Read a word of memory from the monitor.""" return self.peekbyte(address)+(self.peekbyte(address+1)<<8); - + def peekbysym(self,name): + """Read a value by its symbol name.""" + #TODO include memory in symbol. + reg=self.symbols.get(name); + return self.peek8(reg,"data"); + def pokebysim(self,name,val): + """Write a value by its symbol name.""" + #TODO include memory in symbol. + reg=self.symbols.get(name); + return self.pokebyte(reg,val); def pokebyte(self,address,value): """Set a byte of memory by the monitor.""" self.data=[address&0xff,address>>8,value];