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

Backtrace options #250

Merged
merged 13 commits into from
Sep 2, 2021
Merged

Backtrace options #250

merged 13 commits into from
Sep 2, 2021

Conversation

BriocheBerlin
Copy link
Contributor

Closes #198

#[test]
// this test should not be run by default, as it requires the target hardware to be present
#[ignore]
fn successful_run_can_enforce_backtrace() {

Choose a reason for hiding this comment

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

why is this deleted and not adapted?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Didn't realize at first that we keep the functionality (under a different name). Adapted!

|| contains_exception {
true
} else {
false

Choose a reason for hiding this comment

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

this if...else can be left out because the settings.panic_present || unwind.outcome == Outcome::StackOverflow || ... statement itself evaluates to a bool, which is what we want to return. e.g.:

 BacktraceOptions::Auto => settings.panic_present
             || unwind.outcome == Outcome::StackOverflow
             || unwind.corrupted
             || contains_exception 

should work as well

|| unwind.outcome == Outcome::StackOverflow
|| unwind.corrupted
|| contains_exception;
let print_backtrace= match settings.backtrace {

Choose a reason for hiding this comment

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

ha, neat!

@BriocheBerlin BriocheBerlin marked this pull request as ready for review August 25, 2021 11:14
Copy link
Member

@Urhengulas Urhengulas left a comment

Choose a reason for hiding this comment

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

Just my two cents 😁

src/backtrace/mod.rs Show resolved Hide resolved
src/backtrace/mod.rs Show resolved Hide resolved
BriocheBerlin and others added 2 commits August 26, 2021 10:57
Adds urhengulas comment that indicates where `--backtrace-limit=0 is accepted and means "no limit"` functionality is implented.

Co-authored-by: Johann Hemmann <[email protected]>
@BriocheBerlin
Copy link
Contributor Author

bors r+

@bors
Copy link
Contributor

bors bot commented Sep 2, 2021

Build succeeded:

@bors bors bot merged commit f889cbc into main Sep 2, 2021
@bors bors bot deleted the backtrace_options branch September 2, 2021 17:25
japaric added a commit that referenced this pull request Sep 15, 2021
in preparation for v0.2.6 release
@japaric japaric mentioned this pull request Sep 15, 2021
japaric added a commit that referenced this pull request Sep 15, 2021
in preparation for v0.2.6 release
japaric added a commit that referenced this pull request Sep 16, 2021
in preparation for v0.2.6 release
japaric added a commit that referenced this pull request Sep 16, 2021
in preparation for v0.2.6 release
japaric added a commit that referenced this pull request Sep 16, 2021
bors bot added a commit to knurling-rs/defmt that referenced this pull request Oct 19, 2021
547: Migration guide `v0.2.x` to `v0.3.0` r=japaric a=Urhengulas

Migration guide from `defmt v0.2.x` to version `v0.3.0`.

https://deploy-preview-547--admiring-dubinsky-56dff5.netlify.app/migration-02-03.html

Fixes #530.

### TODO
- [x] #505: Logger trait v2
- [x] #521: [3/n] Remove u24
- [x] #522: Replace `µs` hint with `us`
- [x] (no adaption needed) ~~#508: [5/n] Format trait v2~~
- [x] #519: `DEFMT_LOG`
- [x] #550: `defmt::flush()`
- [x] knurling-rs/probe-run#198, knurling-rs/probe-run#250, 

Co-authored-by: Johann Hemmann <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

change CLI around --force-backtrace and --max-backtrace-len
3 participants