5
3
Fork
You've already forked bmputil
2

Feature: Improved no-probe diagnostics #80

Merged
esden merged 11 commits from feature/improved-no-probe-diagnostics into main 2026年04月04日 21:01:29 +02:00

In this PR we improve the diagnostics presented to the user when there is no probe found connected to the system, turning the "crash" output into a nice error print and exit.

For example:

❯ target/debug/bmputil-cli probe info
Error: ------------[ ✂ cut here ✂ ]------------
Unhandled crash in bmputil-cli v1.0.0
 0: Black Magic Probe device not found (check connection?)
Location:
 src/bin/bmputil-cli.rs:592
Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it.
Run with RUST_BACKTRACE=full to include source snippets.
Please include all lines down to this one from the cut here
 marker, and report this issue to our issue tracker at
https://codeberg.org/blackmagic-debug/bmputil/issues

becomes

❯ target/debug/bmputil-cli probe info
[2026年04月04日T11:34:39Z ERROR bmputil::bmp_matcher] Black Magic Probe device not found (check connection?)

This is done for all of the paths which use BmpMatcher and thus BmpMatchResults.

In this PR we improve the diagnostics presented to the user when there is no probe found connected to the system, turning the "crash" output into a nice error print and exit. For example: ``` ❯ target/debug/bmputil-cli probe info Error: ------------[ ✂ cut here ✂ ]------------ Unhandled crash in bmputil-cli v1.0.0 0: Black Magic Probe device not found (check connection?) Location: src/bin/bmputil-cli.rs:592 Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it. Run with RUST_BACKTRACE=full to include source snippets. Please include all lines down to this one from the cut here marker, and report this issue to our issue tracker at https://codeberg.org/blackmagic-debug/bmputil/issues ``` becomes ``` ❯ target/debug/bmputil-cli probe info [2026年04月04日T11:34:39Z ERROR bmputil::bmp_matcher] Black Magic Probe device not found (check connection?) ``` This is done for all of the paths which use BmpMatcher and thus BmpMatchResults.
bmputil-cli: Handle match failure errors explicitly for a clean return from probe reboot's handler
All checks were successful
ci/woodpecker/pr/build-windows/2 Pipeline was successful
ci/woodpecker/pr/build-linux Pipeline was successful
ci/woodpecker/pr/build-windows/1 Pipeline was successful
ci/woodpecker/push/build-windows/2 Pipeline was successful
ci/woodpecker/push/build-linux Pipeline was successful
ci/woodpecker/push/build-windows/1 Pipeline was successful
e1a88c9286
dragonmux changed title from (削除) feature: Improved no-probe diagnostics (削除ここまで) to Feature: Improved no-probe diagnostics 2026年04月04日 13:36:29 +02:00
esden left a comment
Copy link

LGTM

LGTM
esden deleted branch feature/improved-no-probe-diagnostics 2026年04月04日 21:01:30 +02:00
Sign in to join this conversation.
No reviewers
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
blackmagic-debug/bmputil!80
Reference in a new issue
blackmagic-debug/bmputil
No description provided.
Delete branch "feature/improved-no-probe-diagnostics"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?