From 3fbd4830f8d8dc3011415f1aab574561f603cd6e Mon Sep 17 00:00:00 2001 From: dodge-this Date: Sat, 28 Aug 2010 12:09:16 +0000 Subject: [PATCH] implemented ARMget_registers() using ldm from user mode. problem is it takes twice as long as just loading all the registers because register gets/sets are done in firmware. about to revert it to the old method but wanted to save the work. git-svn-id: https://svn.code.sf.net/p/goodfet/code/trunk@712 12e2690d-a6be-4b82-a7b7-67c4a43b65c8 --- client/GoodFETARM7.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/client/GoodFETARM7.py b/client/GoodFETARM7.py index 4e03e50..83fc516 100644 --- a/client/GoodFETARM7.py +++ b/client/GoodFETARM7.py @@ -13,8 +13,8 @@ # * -ancilary/faster- ldm/stm versions of memory access (had trouble in past, possibly also due to haphazard abuse of DCLK) # # fixme now stuff: -# * thumb mode get/set_register -# * thumb to arm mode +# * thumb mode get/set_register - DONE! +# * thumb to arm mode - DONE! # * rethink the whole python/c trade-off for cross-python session debugging import sys, binascii, struct, time @@ -304,7 +304,11 @@ class GoodFETARM(GoodFET): return retval def ARMget_registers(self): """Get ARM Registers""" - regs = [ self.ARMget_register(x) for x in range(15) ] + # FIXME: should we clobber r15 first? if results get wonky, we will. + self.ARMdebuginstr(ARM_INSTR_SKANKREGS,0) + self.ARM_nop(0) + self.ARM_nop(0) + regs = [ struct.unpack("