Showing the changes to src/exec/debugger.cpp (1 of 10 files). Show all
Unified · Split
| @@ -339,14 +339,16 @@ namespace · 338 unmodified lines | |||
| 339 | { | 339 | { |
| 340 | ss << alloc->alloc_type << " - alloc" << dbg_alloc; | 340 | ss << alloc->alloc_type << " - alloc" << dbg_alloc; |
| 341 | 341 | ||
| 342 | enum_pointer_fields_with_offset(*alloc->alloc_type, alloc->get_allocation(), [&ss, recurse_depth](pointer_t p, std::size_t o) | 342 | const auto base_address = reinterpret_cast<std::uintptr_t>(alloc->get_allocation()); |
| 343 | enum_pointer_fields(*alloc->alloc_type, alloc->get_allocation(), [&ss, recurse_depth, base_address](pointer_t *p) | ||
| 343 | { | 344 | { |
| 344 | ss << "\n"; | 345 | ss << "\n"; |
| 345 | std::fill_n(std::ostream_iterator<std::ostream::char_type>{ ss }, 4 * recurse_depth, ' '); | 346 | std::fill_n(std::ostream_iterator<std::ostream::char_type>{ ss }, 4 * recurse_depth, ' '); |
| 346 | ss << "[" << o << "] "; | 347 | const auto p_address = reinterpret_cast<std::uintptr_t>(p); |
| 348 | ss << "[" << std::size_t{ p_address - base_address } << "] "; | ||
| 347 | 349 | ||
| 348 | if (recurse_depth < 2) | 350 | if (recurse_depth < 2) |
| 349 | safe_alloc_print(ss, vm_alloc_t::from_allocation(p), recurse_depth + 1); | 351 | safe_alloc_print(ss, vm_alloc_t::from_allocation(*p), recurse_depth + 1); |
| 350 | else | 352 | else |
| 351 | ss << "..."; | 353 | ss << "..."; |
| 352 | }); | 354 | }); |