| 4509 | } |
| 4510 | |
| 4511 | static void handle_stacktrace(int skip_frames = 0) |
| 4512 | { |
| 4513 | // printer creates the TraceResolver, which can supply us a machine type |
| 4514 | // for stack walking. Without this, StackTrace can only guess using some |
| 4515 | // macros. |
| 4516 | // StackTrace also requires that the PDBs are already loaded, which is done |
| 4517 | // in the constructor of TraceResolver |
| 4518 | Printer printer; |
| 4519 | |
| 4520 | StackTrace st; |
| 4521 | st.set_machine_type(printer.resolver().machine_type()); |
| 4522 | st.set_thread_handle(thread_handle()); |
| 4523 | st.load_here(32 + skip_frames, ctx()); |
| 4524 | st.skip_n_firsts(skip_frames); |
| 4525 | |
| 4526 | printer.address = true; |
| 4527 | printer.print(st, std::cerr); |
| 4528 | } |
| 4529 | }; |
| 4530 | |
| 4531 | #endif // BACKWARD_SYSTEM_WINDOWS |
nothing calls this directly
no test coverage detected