me at kylehuey.com
Mon Nov 24 18:27:23 PST 2014
On Mon, Nov 24, 2014 at 5:46 PM, Chris Jones <jones.chris.g at gmail.com> wrote:
> Awesome!! :D
> On Mon, Nov 24, 2014 at 4:10 PM, Kyle Huey <me at kylehuey.com> wrote:
>> - We cannot correctly set breakpoints at arbitrary addresses on ARM.
>> Without debugging information you cannot determine whether an address
>> corresponds to ARM or THUMB instructions, so we can't pick the correct
>> breakpoint instruction.
> gdb has to handle this case too, because not all images have debug info.
> What does gdb do?
You can see the code at
The interesting bits are in arm_pc_is_thumb which does the following:
1. If the address is not 4-byte aligned, assume it's thumb.
2. Check various override modes.
3. Check if the processor is thumb only.
4. Look at debugging symbols.
5. Otherwise use whatever the running frame is.
6. And if we're not running any code, assume arm.
gdb's breakpoint opcodes may be chosen so that making the wrong choice
is salvageable. I haven't checked yet.
More information about the rr-dev