Skip to content

Commit 9cf9d76

Browse files
authored
Use addr2line for backtraces (oxidecomputer#557)
* Use addr2line for stack traces * Better file printing * Add comment about dwarf ownership * Skip addr2line if any frames are invalid * Run test suite
1 parent 24305ac commit 9cf9d76

File tree

166 files changed

+10683
-10186
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

166 files changed

+10683
-10186
lines changed

Cargo.lock

Lines changed: 72 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,7 @@ cmd-vpd = { path = "./cmd/vpd", package = "humility-cmd-vpd" }
190190
cmd-writeword = { path = "./cmd/writeword", package = "humility-cmd-writeword" }
191191

192192
# crates.io deps
193+
addr2line = "0.25"
193194
anyhow = { version = "1.0.44", features = ["backtrace"] }
194195
atty = "0.2"
195196
bitfield = "0.13.2"

humility-bin/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
[package]
1919
name = "humility-bin"
20-
version = "0.12.7"
20+
version = "0.12.8"
2121
edition = "2021"
2222
license = "MPL-2.0"
2323

humility-bin/tests/cmd/chip.trycmd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ For more information try --help
1313

1414
```
1515
$ humility --chip this-can-be-anything -V
16-
humility 0.12.7
16+
humility 0.12.8
1717

1818
```
1919

@@ -28,7 +28,7 @@ For more information try --help
2828

2929
```
3030
$ humility -c apx432 -V
31-
humility 0.12.7
31+
humility 0.12.8
3232

3333
```
3434

humility-bin/tests/cmd/registers-s/registers-s.kernel-panic.1.stdout

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
SP = 0x24000288 <- kernel: 0x24000000+0x288
1515
|
1616
+---> 0x240002c0 0x080019ac kern::fail::die_impl
17-
0x240002d0 0x080019d0 kern::fail::die
17+
0x240002d0 0x080019d4 kern::fail::die
1818
0x240002d0 0x080019d4 rust_begin_unwind
1919
0x240002f0 0x080006da core::panicking::panic_fmt
2020
0x24000318 0x0800105a core::panicking::panic

humility-bin/tests/cmd/registers-s/registers-s.kiowa.4.stdout

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@
1414
SP = 0x20002b70 <- i2c_driver: 0x20002800+0x370
1515
|
1616
+---> 0x20002b80 0x08015ac8 userlib::sys_irq_control_stub
17-
0x20002c00 0x080148e2 drv_stm32h7_i2c::I2cController::write_read
18-
0x20002c00 0x08014658 drv_stm32h7_i2c_server::main::{{closure}}
19-
0x20002c00 0x08014658 userlib::hl::recv_without_notification::{{closure}}
20-
0x20002c00 0x080142d4 userlib::hl::recv
21-
0x20002c00 0x080142d4 userlib::hl::recv_without_notification
17+
0x20002c00 0x08014920 drv_stm32h7_i2c::I2cController::write_read
18+
0x20002c00 0x08014920 drv_stm32h7_i2c_server::main::{{closure}}
19+
0x20002c00 0x08014920 userlib::hl::recv_without_notification::{{closure}}
20+
0x20002c00 0x08014920 userlib::hl::recv
21+
0x20002c00 0x08014920 userlib::hl::recv_without_notification
2222
0x20002c00 0x08014920 main
2323
0x20002c00 0x0801404e _start
2424

humility-bin/tests/cmd/registers-s/registers-s.kiowa.49.stdout

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,16 @@
1414
SP = 0x20002ae0 <- i2c_driver: 0x20002800+0x2e0
1515
|
1616
+---> 0x20002af0 0x08016408 userlib::sys_irq_control_stub
17-
0x20002b20 0x08015b9c drv_stm32h7_i2c::I2cController::write_read
18-
0x20002b20 0x08015b9c drv_stm32h7_i2c::ltc4306::write_reg_u8
17+
0x20002b20 0x08015bc0 drv_stm32h7_i2c::I2cController::write_read
18+
0x20002b20 0x08015bc0 drv_stm32h7_i2c::ltc4306::write_reg_u8
1919
0x20002b20 0x08015bc0 <drv_stm32h7_i2c::ltc4306::Ltc4306 as drv_stm32h7_i2c::I2cMuxDriver>::enable_segment
20-
0x20002c00 0x08014852 drv_stm32h7_i2c_server::configure_mux::{{closure}}
21-
0x20002c00 0x08014830 drv_stm32h7_i2c_server::find_mux
22-
0x20002c00 0x08014830 drv_stm32h7_i2c_server::configure_mux
23-
0x20002c00 0x0801476e drv_stm32h7_i2c_server::main::{{closure}}
24-
0x20002c00 0x0801476e userlib::hl::recv_without_notification::{{closure}}
25-
0x20002c00 0x0801447a userlib::hl::recv
26-
0x20002c00 0x0801447a userlib::hl::recv_without_notification
20+
0x20002c00 0x080148a8 drv_stm32h7_i2c_server::configure_mux::{{closure}}
21+
0x20002c00 0x080148a8 drv_stm32h7_i2c_server::find_mux
22+
0x20002c00 0x080148a8 drv_stm32h7_i2c_server::configure_mux
23+
0x20002c00 0x080148a8 drv_stm32h7_i2c_server::main::{{closure}}
24+
0x20002c00 0x080148a8 userlib::hl::recv_without_notification::{{closure}}
25+
0x20002c00 0x080148a8 userlib::hl::recv
26+
0x20002c00 0x080148a8 userlib::hl::recv_without_notification
2727
0x20002c00 0x080148a8 main
2828
0x20002c00 0x0801404e _start
2929

humility-bin/tests/cmd/registers-s/registers-s.kiowa.50.stdout

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
R12 = 0x20002a48 <- i2c_driver: 0x20002800+0x248
1414
SP = 0x20000eb0 <- kernel: 0x20000000+0xeb0
1515
|
16-
+---> 0x20000f58 0x08002090 kern::syscalls::syscall_entry::{{closure}}
17-
0x20000f58 0x08002074 kern::arch::arm_m::with_task_table
16+
+---> 0x20000f58 0x08002094 kern::syscalls::syscall_entry::{{closure}}
17+
0x20000f58 0x08002094 kern::arch::arm_m::with_task_table
1818
0x20000f58 0x08002094 syscall_entry
1919
0x20000f58 0x0800375a SVCall
2020

humility-bin/tests/cmd/registers-s/registers-s.kiowa.51.stdout

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@
1515
|
1616
+---> 0x20000f58 0x080022ee <kern::arch::arm_m::SavedState as kern::task::ArchState>::arg1
1717
0x20000f58 0x080022ee kern::task::AsIrqArgs<&T>::control
18-
0x20000f58 0x080022dc kern::syscalls::irq_control
19-
0x20000f58 0x080020a0 kern::syscalls::safe_syscall_entry
20-
0x20000f58 0x080020a0 kern::syscalls::syscall_entry::{{closure}}
21-
0x20000f58 0x08002074 kern::arch::arm_m::with_task_table
18+
0x20000f58 0x080022ee kern::syscalls::irq_control
19+
0x20000f58 0x080022ee kern::syscalls::safe_syscall_entry
20+
0x20000f58 0x080022ee kern::syscalls::syscall_entry::{{closure}}
21+
0x20000f58 0x080022ee kern::arch::arm_m::with_task_table
2222
0x20000f58 0x080022ee syscall_entry
2323
0x20000f58 0x0800375a SVCall
2424

humility-bin/tests/cmd/registers-s/registers-s.kiowa.52.stdout

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@
1414
SP = 0x20000e80 <- kernel: 0x20000000+0xe80
1515
|
1616
+---> 0x20000e80 0x0800153c kern::umem::USlice<T>::last_byte_addr
17-
0x20000eb0 0x080033b2 kern::umem::USlice<T>::aliases
17+
0x20000eb0 0x080033bc kern::umem::USlice<T>::aliases
1818
0x20000eb0 0x080033bc kern::umem::safe_copy
19-
0x20000f58 0x080021c0 kern::syscalls::borrow_read
20-
0x20000f58 0x080020a0 kern::syscalls::safe_syscall_entry
21-
0x20000f58 0x080020a0 kern::syscalls::syscall_entry::{{closure}}
22-
0x20000f58 0x08002074 kern::arch::arm_m::with_task_table
19+
0x20000f58 0x08002244 kern::syscalls::borrow_read
20+
0x20000f58 0x08002244 kern::syscalls::safe_syscall_entry
21+
0x20000f58 0x08002244 kern::syscalls::syscall_entry::{{closure}}
22+
0x20000f58 0x08002244 kern::arch::arm_m::with_task_table
2323
0x20000f58 0x08002244 syscall_entry
2424
0x20000f58 0x0800375a SVCall
2525

0 commit comments

Comments
 (0)