agb/examples
Gwilym Inzani e8aed8e376
Backtraces (#590)
Implements a very basic backtrace and the ability to format them

If you run the panic example and press A, you get:

```
[ERROR] GBA Debug: [failed]
[ERROR] GBA Debug: debug data: ce3-1ee7-1fb7-24d-1ad
[FATAL] GBA Debug: Error: panicked at src/memory_mapped.rs:101:24:
index out of bounds: the len is 240 but the index is 240
```

which you can then prettify with:

```
> agb-addr2line ../target/thumbv4t-none-eabi/debug/examples/panic 0ce3-1f57-2027-024d-01ad
0:	rust_begin_unwind <agb>/lib.rs:321
1:	core::panicking::panic_nounwind <core>/panicking.rs:151
2:	core::panicking::assert_failed_inner <core>/panicking.rs:321
3:	agb::memory_mapped::MemoryMapped2DArray<T,_,_>::set <agb>/memory_mapped.rs:101
	(inlined by) agb::display::bitmap3::Bitmap3::draw_point <agb>/display/bitmap3.rs:31
4:	main /home/gwilym/Projects/agb/agb/examples/panic.rs:15
```

- [ ] Changelog updated / no changelog update needed
2024-04-09 20:25:15 +01:00
..
amplitude Backtraces (#590) 2024-04-09 20:25:15 +01:00
combo Backtraces (#590) 2024-04-09 20:25:15 +01:00
hyperspace-roll Backtraces (#590) 2024-04-09 20:25:15 +01:00
the-dungeon-puzzlers-lament Backtraces (#590) 2024-04-09 20:25:15 +01:00
the-hat-chooses-the-wizard Backtraces (#590) 2024-04-09 20:25:15 +01:00
the-purple-night Backtraces (#590) 2024-04-09 20:25:15 +01:00