agb/book/games/pong
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
..
.cargo Include the new option in all the config.tomls 2024-04-01 17:02:59 +01:00
gfx reorder sprites 2022-08-01 23:02:23 +01:00
src use static rather than const 2024-03-29 14:41:08 +00:00
.gitignore Start the pong example for the book 2022-01-01 22:37:39 +00:00
Cargo.lock Update lockfiles 2024-04-04 20:58:42 +00:00
Cargo.toml Release v0.19.1 2024-03-06 19:11:47 +00:00
rust-toolchain.toml Add rustfmt as a component to rust-toolchain 2023-03-23 22:17:02 +00:00