| 4428 | } |
| 4429 | |
| 4430 | static void handle_stacktrace(int skip_frames = 0) { |
| 4431 | // printer creates the TraceResolver, which can supply us a machine type |
| 4432 | // for stack walking. Without this, StackTrace can only guess using some |
| 4433 | // macros. |
| 4434 | // StackTrace also requires that the PDBs are already loaded, which is done |
| 4435 | // in the constructor of TraceResolver |
| 4436 | Printer printer; |
| 4437 | |
| 4438 | StackTrace st; |
| 4439 | st.set_machine_type(printer.resolver().machine_type()); |
| 4440 | st.set_thread_handle(thread_handle()); |
| 4441 | st.load_here(32 + skip_frames, ctx()); |
| 4442 | st.skip_n_firsts(skip_frames); |
| 4443 | |
| 4444 | printer.address = true; |
| 4445 | printer.print(st, std::cerr); |
| 4446 | } |
| 4447 | }; |
| 4448 | |
| 4449 | #endif // BACKWARD_SYSTEM_WINDOWS |
nothing calls this directly
no test coverage detected