ARM/THUMB instructions that change execution path?

Has anybody come across a list of ARM & THUMB instructions that cause deviation from the linear instruction stream?

I've been trying to figure out gdb-stub single stepping using software interrupts, and in single stepping you need to find

the next instruction(s) where the next breakpoint instruction needs to be set.

There are three cases:

1) current instruction doesn't change the execution path. Next instruction is the next word.

2) current instruction is a jump. The operand defines the next instruction address

3) current instruction is conditional branch. One possible next instruction is the next word, the other possible

instruction address is defined by the operand. (That includes conditional add with PC as the target, and the like).

To implement single stepping, I need to tell those cases apart and figure out how to find out the possible branching address.

I could go through manuals of numerous processors instruction by instruction and maybe I'd be done within the next couple of years,

or I could find a list of instructions to check, or a paper that explains how to "decode" the instructions in a useful way.

Also, there doesn't seem to be lots of sources of ARM gdb servers or stubs around that use software breakpoints.

Parents
  • I wish you good wind on getting through the remaining instructions!

    -Great that you got the fixed font working (you can also use 'view source' on one of my tutorials, to see what HTML code I've used, because in some cases it was necessary to do special edits; like the Monaco font, because it's not available from the menu).

    There are a few other tutorials. I promised a series of tutorials on basic math on the Cortex-M: http://community.arm.com/docs/DOC-9653 .

    Hopefully I can find some time to release the next part soon.

    The idea is to provide something for both beginners and experienced programmers.

    Beginners will get the basics, experienced programmers might be able to find some useful tips and tricks now and then.

    You probably know the GNU Assembler well by now, but perhaps you can find something interesting in the article about the macros.

Reply
  • I wish you good wind on getting through the remaining instructions!

    -Great that you got the fixed font working (you can also use 'view source' on one of my tutorials, to see what HTML code I've used, because in some cases it was necessary to do special edits; like the Monaco font, because it's not available from the menu).

    There are a few other tutorials. I promised a series of tutorials on basic math on the Cortex-M: http://community.arm.com/docs/DOC-9653 .

    Hopefully I can find some time to release the next part soon.

    The idea is to provide something for both beginners and experienced programmers.

    Beginners will get the basics, experienced programmers might be able to find some useful tips and tricks now and then.

    You probably know the GNU Assembler well by now, but perhaps you can find something interesting in the article about the macros.

Children