Skip to content

Add unwind information to external assembly #216

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 8, 2020

Conversation

Tiwalun
Copy link
Contributor

@Tiwalun Tiwalun commented May 6, 2020

Add unwind information to the external assembly files, as discussed in #215.

The .debug_frame section is now present:


cortex-m.o   (ex bin/thumbv6m-none-eabi.a):
section              size   addr
.text                 0x0    0x0
.data                 0x0    0x0
.bss                  0x0    0x0
.text.__bkpt          0x4    0x0
.text.__control_r     0x6    0x0
.text.__control_w     0x6    0x0
.text.__cpsid         0x4    0x0
.text.__cpsie         0x4    0x0
.text.__delay         0x8    0x0
.text.__dmb           0x6    0x0
.text.__dsb           0x6    0x0
.text.__isb           0x6    0x0
.text.__msp_r         0x6    0x0
.text.__msp_w         0x6    0x0
.text.__nop           0x2    0x0
.text.__primask       0x6    0x0
.text.__psp_r         0x6    0x0
.text.__psp_w         0x6    0x0
.text.__sev           0x4    0x0
.text.__udf           0x2    0x0
.text.__wfe           0x4    0x0
.text.__wfi           0x4    0x0
.debug_line         0x161    0x0
.debug_info          0x22    0x0
.debug_abbrev        0x12    0x0
.debug_aranges       0xb0    0x0
.debug_str           0x30    0x0
.debug_ranges        0xa8    0x0
.debug_frame        0x140    0x0
.ARM.attributes      0x1c    0x0
Total               0x4d9

@Tiwalun Tiwalun requested a review from a team as a code owner May 6, 2020 15:05
@rust-highfive
Copy link

r? @jonas-schievink

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-cortex-m labels May 6, 2020
asm.s Outdated
.size __msp_r, . - __msp_r

.section .text.__msp_w
.global __msp_w
.thumb_func
.cfi_startproc
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this subroutine may modify the stack pointer depending on whether MSP or PSP is currently being used so it requires a (rather complex?) register rule so let's not add CFI to it in this PR

asm.s Outdated
.size __psp_r, . - __psp_r

.section .text.__psp_w
.global __psp_w
.thumb_func
.cfi_startproc
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

like __msp_w this can modify the stack pointer so let's leave it out for now

Copy link
Member

@japaric japaric left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me except for the __*sp_w subroutines

Copy link
Contributor

@jonas-schievink jonas-schievink left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bors r+

@bors
Copy link
Contributor

bors bot commented May 7, 2020

👎 Rejected by code reviews

@Tiwalun Tiwalun requested a review from japaric May 7, 2020 19:03
Copy link
Member

@japaric japaric left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@jonas-schievink
Copy link
Contributor

bors r+

@bors
Copy link
Contributor

bors bot commented May 8, 2020

Build succeeded:

@bors bors bot merged commit c47591c into rust-embedded:master May 8, 2020
@Tiwalun Tiwalun deleted the add-cfi branch May 8, 2020 11:51
@japaric japaric mentioned this pull request May 19, 2020
bors bot added a commit to rust-embedded/cortex-m-rt that referenced this pull request Sep 7, 2020
294: add CFI and size info r=jonas-schievink a=japaric

like it was done in rust-embedded/cortex-m#216 and rust-embedded/cortex-m#212

Co-authored-by: Jorge Aparicio <[email protected]>
adamgreig pushed a commit that referenced this pull request Jan 12, 2022
216: Fix compiletest tests r=therealprof a=jonas-schievink

Closes rust-embedded/cortex-m-rt#215

Co-authored-by: Jonas Schievink <[email protected]>
adamgreig pushed a commit that referenced this pull request Jan 12, 2022
294: add CFI and size info r=jonas-schievink a=japaric

like it was done in #216 and #212

Co-authored-by: Jorge Aparicio <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-cortex-m
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants