Showing the changes to src/exec/debugger.cpp (1 of 4 files). Show all
Unified · Split
| @@ -322,8 +322,15 @@ namespace · 321 unmodified lines | ||
| 322 | 322 | { |
| 323 | 323 | auto msg = std::stringstream{}; |
| 324 | 324 | msg << "Modules:\n"; |
| 325 | − for (auto m : cxt.vm.get_loaded_modules()) | |
| 326 | − msg << " " << m->module_name->str() << "\n"; | |
| 325 | + | |
| 326 | + cxt.vm.enum_loaded_modules([&msg](const loaded_vm_module_t &m) | |
| 327 | + { | |
| 328 | + auto module_instance = m.module.lock(); | |
| 329 | + if (module_instance == nullptr) | |
| 330 | + return; | |
| 331 | + | |
| 332 | + msg << std::setw(24) << module_instance->module_name->str() << std::setw(0) << " " << m.origin->str() << "\n"; | |
| 333 | + }); | |
| 327 | 334 | |
| 328 | 335 | debug_print_info(msg.str()); |
| 329 | 336 | } |
| @@ -625,7 +632,7 @@ namespace · 295 unmodified lines | ||
| 625 | 632 | { "r", "Print registers", nullptr, nullptr, cmd_print_registers }, |
| 626 | 633 | { "t", "Print all threads", nullptr, nullptr, cmd_print_threads }, |
| 627 | 634 | { "m", "Print all loaded modules", nullptr, nullptr, cmd_print_modules }, |
| 628 | − { "sw", "Stack walk/back trace", "bt ([0-9]+|\\*)?", "bt, bt 34, bt *", cmd_stacktrace }, | |
| 635 | + { "bt", "Stack walk/back trace for the current or supplied thread", "bt ([0-9]+|\\*)?", "bt, bt 34, bt *", cmd_stacktrace }, | |
| 629 | 636 | { "st", "Switch to thread", "st [0-9]+", "st 42", cmd_switchthread }, |
| 630 | 637 | { "d", "Disassemble the next/previous N instructions", "d (-?[0-9]+)?", "d, d -4, d 5", cmd_disassemble }, |
| 631 | 638 | { "x", "Examine memory", "x [mp|fp] [0-9]+ ([0-9]+)?", "x mp 3, x fp 20 6", cmd_examine }, |