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

Update to 0.2.0 #153

Merged
merged 2 commits into from
Feb 22, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 2 additions & 7 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,15 @@ license = "MIT OR Apache-2.0"
name = "probe-run"
readme = "README.md"
repository = "https://github.com/knurling-rs/probe-run"
# TODO(on 0.2.0) remove the "defmt" Cargo feature
version = "0.1.9"
version = "0.2.0"

[dependencies]
addr2line = "0.14.1"
ansi_term = "0.12.1"
anyhow = "1.0.32"
arrayref = "0.3.6"
colored = "2.0.0"
defmt-decoder = { git = "https://github.com/knurling-rs/defmt", rev = "42be5f6", version = "=0.1.4", features = ['unstable'] }
defmt-decoder = { git = "https://github.com/knurling-rs/defmt", tag = "defmt-decoder-v0.2.0", version = "=0.2.0", features = ['unstable'] }
difference = "2.0.0"
gimli = "0.23.0"
log = { version = "0.4.11", features = ["std"] }
Expand All @@ -29,7 +28,3 @@ rustc-demangle = "0.1.16"
signal-hook = "0.3.4"
structopt = "0.3.15"
hidapi = "1.2.5"

[features]
# this feature does nothing and it's kept for backwards compatibility; it will be removed in the next semver bump
defmt = []
jonas-schievink marked this conversation as resolved.
Show resolved Hide resolved
6 changes: 3 additions & 3 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -182,10 +182,10 @@ fn notmain() -> Result<i32, anyhow::Error> {
})?;

let (mut table, locs) = {
let table = defmt_decoder::elf2table::parse(&bytes)?;
let table = defmt_decoder::Table::parse(&bytes)?;

let locs = if let Some(table) = table.as_ref() {
let locs = defmt_decoder::elf2table::get_locations(&bytes, table)?;
let locs = table.get_locations(&bytes)?;

if !table.is_empty() && locs.is_empty() {
log::warn!("insufficient DWARF info; compile your program with `debug = 2` to enable location info");
Expand Down Expand Up @@ -450,7 +450,7 @@ fn notmain() -> Result<i32, anyhow::Error> {
frames.extend_from_slice(&read_buf[..num_bytes_read]);

loop {
match defmt_decoder::decode(&frames, table) {
match table.decode(&frames) {
Ok((frame, consumed)) => {
// NOTE(`[]` indexing) all indices in `table` have already been
// verified to exist in the `locs` map
Expand Down