Skip to content
This repository has been archived by the owner on Jan 30, 2024. It is now read-only.

place breakpoint on an even address #64

Merged
merged 1 commit into from
Sep 16, 2020
Merged

Conversation

japaric
Copy link
Member

@japaric japaric commented Sep 16, 2020

that is clear the thumb bit of the address before passing it to
set_hw_breakpoint

fixes a bug (*) where the microcontroller will pause at the second
instruction of HardFaultTrampoline rather than the first
Observed with these values:

  • vector_table.hard_fault = 0x7dc
  • PC read at breakpoint (in backtrace) = 0x7de
000007dc <HardFaultTrampoline>:
 7dc:   4670            mov     r0, lr
 7de:   2104            movs    r1, #4

(*) observed bug behavior: <exception entry> was not printed and exit code
was 0 (instead of SIGABRT)

that is clear the thumb bit of the address before passing it to
`set_hw_breakpoint`

fixes a bug (\*) where the microcontroller will pause at the *second*
instruction of `HardFaultTrampoline` rather than the first
Observed with these values:
- `vector_table.hard_fault` = 0x7dc
- PC read at breakpoint (in `backtrace`) = 0x7de
``` armasm
000007dc <HardFaultTrampoline>:
 7dc:   4670            mov     r0, lr
 7de:   2104            movs    r1, #4
```
(\*) observed bug behavior: `<exception entry>` was not printed and exit code
was 0 (instead of SIGABRT)
@jonas-schievink jonas-schievink merged commit 7e26e33 into main Sep 16, 2020
@japaric japaric deleted the even-breakpoint branch October 23, 2020 16:08
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants