Skip to content

core/panic: call cpu_print_last_instruction before printing other things#3930

Merged
OlegHahm merged 1 commit intoRIOT-OS:masterfrom
cgundogan:pr/assert/move_last_instr
Sep 22, 2015
Merged

core/panic: call cpu_print_last_instruction before printing other things#3930
OlegHahm merged 1 commit intoRIOT-OS:masterfrom
cgundogan:pr/assert/move_last_instr

Conversation

@cgundogan
Copy link
Copy Markdown
Member

The compiler (at least for the iotlab-m3) is clever enough to not change the link register for subsequent calls to puts/printf. This will however result in a false link register reported to the user/developer when an assert fails.
By moving cpu_print_last_instruction() up and make it the first function to be called bypasses this.

fixes #3920

@cgundogan cgundogan added Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors) Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation Area: core Area: RIOT kernel. Handle PRs marked with this with care! labels Sep 22, 2015
@OlegHahm
Copy link
Copy Markdown
Member

Seems sensible. ACK

@OlegHahm OlegHahm added the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label Sep 22, 2015
@jnohlgard
Copy link
Copy Markdown
Member

(core...) Second ACK.

@cgundogan
Copy link
Copy Markdown
Member Author

partially kicked travis

@OlegHahm OlegHahm added this to the Release 2015.09 milestone Sep 22, 2015
OlegHahm added a commit that referenced this pull request Sep 22, 2015
core/panic: call cpu_print_last_instruction before printing other things
@OlegHahm OlegHahm merged commit 4232f2d into RIOT-OS:master Sep 22, 2015
@cgundogan cgundogan deleted the pr/assert/move_last_instr branch October 1, 2015 07:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: core Area: RIOT kernel. Handle PRs marked with this with care! CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors) Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Assert : wrong LR

3 participants