OP-TEE / optee_docs

This git contains the official documentation for the OP-TEE project
BSD 2-Clause "Simplified" License
58 stars 96 forks source link

qemu: gdb: use hbreak instead of break to halt in OP-TEE core #15

Closed etienne-lms closed 5 years ago

etienne-lms commented 5 years ago

Replace GDB break instruction with hbreak since software break point can be dropped when OP-TEE core instructions are loaded in memory. This may happen if break point is set before OP-TEE images are loaded by the bootloader or when OP-TEE pager loads pageable instructions at runtime.

Signed-off-by: Etienne Carriere etienne.carriere@linaro.org

jbech-linaro commented 5 years ago

I've never ever used hbreak when running QEMU, I've only had to use that when running hardware with JTAG.

This may happen if break point is set before OP-TEE images are loaded by the bootloader

As written in the current doc, everything is set before running any code.

or when OP-TEE pager loads pageable instructions at runtime.

This I haven't tried, so if hbreak is needed for this, then I'm all with you.

etienne-lms commented 5 years ago

:) I've always used hbreak even in Qemu, but maybe it is not required...

jbech-linaro commented 5 years ago

but maybe it is not required...

Can you check? If you see no difference, then I think it's better to stick with traditional software breakpoints.

etienne-lms commented 5 years ago

Same behavior. I'm fine with current doc. Closing P-R.