The setSingleStep code isn't particularly robust, but you should be able to address the issues that you've described here. You can check if the instruction is a 32bit thumb instruction by looking at the ExtMachInst and adjust it appropriately. I don't know what version of the simulator you're using, but we fixed some identification of branch instructions recently. THat said I'm very surprised that bxeq isn't recognized as it certainly should be.
Ali On 20.09.2012 11:03, Tobias Friemel wrote: > Hello, > I'm working on a thesis that includes fault injection in connection with > gem5 (ARM specific) and I'm looking for a way to implement some sort of > single stepping for this. I already found the method the RemoteGDB uses, > but there seems to be a problem with some machine instructions. > > What the RemoteGDB does, is looking at the current program counter and > setting a new breakpoint to the next PC. If the instruction at the > current PC is a branch, it also sets a new breakpoint to the branch > target. The first problem I found was that the bxeq instruction (like > the one that is in the example bootloader for arm) isn't recognized as a > branch instruction. Another problem is that for Thumb-2 instructions, > the next PC is always set to 16 bit after the current, even if it's a 32 > bit long instruction. > > Maybe someone knows an easy way to fix this or if there is a better way > to get single stepping. > > Regards, > Tobias > _______________________________________________ > gem5-users mailing list > [email protected] > http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
_______________________________________________ gem5-users mailing list [email protected] http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
