MCPcopy Create free account
hub / github.com/Oneflow-Inc/oneflow / handle_stacktrace

Method handle_stacktrace

oneflow/extension/stack/stacktrace.h:4339–4355  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4337 }
4338
4339 static void handle_stacktrace(int skip_frames = 0) {
4340 // printer creates the TraceResolver, which can supply us a machine type
4341 // for stack walking. Without this, StackTrace can only guess using some
4342 // macros.
4343 // StackTrace also requires that the PDBs are already loaded, which is done
4344 // in the constructor of TraceResolver
4345 Printer printer;
4346
4347 StackTrace st;
4348 st.set_machine_type(printer.resolver().machine_type());
4349 st.set_thread_handle(thread_handle());
4350 st.load_here(32 + skip_frames, ctx());
4351 st.skip_n_firsts(skip_frames);
4352
4353 printer.address = true;
4354 printer.print(st, std::cerr);
4355 }
4356};
4357
4358#endif // BACKWARD_SYSTEM_WINDOWS

Callers

nothing calls this directly

Calls 6

set_machine_typeMethod · 0.80
machine_typeMethod · 0.80
set_thread_handleMethod · 0.80
load_hereMethod · 0.45
skip_n_firstsMethod · 0.45
printMethod · 0.45

Tested by

no test coverage detected