On Tue, 2011-07-05 at 12:01 +0100, Dave Martin wrote:
One question though -- how do we know when setting a probe whether the target instruction is ARM or Thumb?
I'm using the bottom bit of the probe address. The kprobes API lets you specify the probe location as a symbol
the_probe.symbol_name = "function_name";
or as an address
the_probe.addr = &function_name;
and both of these cases will work. If the address is obtained by another means which doesn't set bit zero to indicate thumb code, then it's going to go bang.
Do you think that we should assume all probes are Thumb on Thumb kernels and ARM on ARM kernels? And therefore configure out ARM instruction decoding and simulation on Thumb kernels?