[RFC] rename UserHardFault to HardFault #144
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm all for consistency, I like it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
I'm happy for this to go out as a v0.5.x. |
Likewise happy for it to be in 0.5.x. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
test/compile-fail/hard-fault-twice.rs
expected error message needs updating s/User//
@rust-embedded/cortex-m I've fixed the failing build; please re-review. |
triage: this has 4 approvals (majority). Changing labels to decision-accepted and S-waiting-on-review. |
bors r=korken89 |
so it matches the exception name (`#[exception] fn HardFault(..`)
rebased / force pushed to hopefully unstuck bors |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
bors r+ |
144: [RFC] rename UserHardFault to HardFault r=therealprof a=japaric so it matches the exception name (`#[exception] fn HardFault(..`) Right now the symbol name of all exception handlers match the name of the function used with the `#[exception]` attribute *except* for `HardFault`, whose symbol name actually is `UserHardFault`. This PR corrects that inconsistency by renaming the `UserHardFault` symbol to `HardFault`, and the `HardFault` symbol to `HardFaultTrampoline`. This change doesn't break compilation or changes functionality but it does soft break GDB scripts that include the command `break UserHardFault` (e.g. the GDB script in cortex-m-quickstart) in the sense that the breakpoint will no longer work. However the rest of the GDB script will continue to work. RFC questions: (a) do we want to do this rename? (b) if the answer is yes, do we want to include this rename in the v0.5.x release, or should we consider it a breaking change and postpone it until v0.6.0? Co-authored-by: Jorge Aparicio <jorge@japaric.io>
Canceled |
latest commit should fix the build error |
Looks like your rebase got rid of both of my commits, including the one updating the expected error message in the compile-fail test? |
bors r+ |
144: [RFC] rename UserHardFault to HardFault r=adamgreig a=japaric so it matches the exception name (`#[exception] fn HardFault(..`) Right now the symbol name of all exception handlers match the name of the function used with the `#[exception]` attribute *except* for `HardFault`, whose symbol name actually is `UserHardFault`. This PR corrects that inconsistency by renaming the `UserHardFault` symbol to `HardFault`, and the `HardFault` symbol to `HardFaultTrampoline`. This change doesn't break compilation or changes functionality but it does soft break GDB scripts that include the command `break UserHardFault` (e.g. the GDB script in cortex-m-quickstart) in the sense that the breakpoint will no longer work. However the rest of the GDB script will continue to work. RFC questions: (a) do we want to do this rename? (b) if the answer is yes, do we want to include this rename in the v0.5.x release, or should we consider it a breaking change and postpone it until v0.6.0? Co-authored-by: Jorge Aparicio <jorge@japaric.io>
Build succeeded |
Hey guys, this seems to have broken the book because of how Semver versioning works: So, the question is should the version of cortext-m-rt have been bumped to 1.0.0 for this as it broke the book? Also, should I re-open that issue? |
117: Update the references of UserHardFault, which was renamed to HardFault r=korken89 a=sstelfox This updates the book to match the [renamed symbol](rust-embedded/cortex-m-rt#144) and my [associated PR](rust-embedded/cortex-m-quickstart#64) updating the quickstart repository. Co-authored-by: Sam Stelfox <sstelfox@bedroomprogrammers.net>
so it matches the exception name (
#[exception] fn HardFault(..
)Right now the symbol name of all exception handlers match the name of the
function used with the
#[exception]
attribute except forHardFault
, whosesymbol name actually is
UserHardFault
.This PR corrects that inconsistency by renaming the
UserHardFault
symbol toHardFault
, and theHardFault
symbol toHardFaultTrampoline
.This change doesn't break compilation or changes functionality but it does soft
break GDB scripts that include the command
break UserHardFault
(e.g. the GDBscript in cortex-m-quickstart) in the sense that the breakpoint will no longer
work. However the rest of the GDB script will continue to work.
RFC questions: (a) do we want to do this rename? (b) if the answer is yes, do we
want to include this rename in the v0.5.x release, or should we consider it a
breaking change and postpone it until v0.6.0?