MCPcopy Index your code
hub / github.com/RustPython/RustPython / dump_traceback_thread_frames

Function dump_traceback_thread_frames

crates/stdlib/src/faulthandler.rs:350–366  ·  view source on GitHub ↗
(
        fd: i32,
        thread_id: u64,
        is_current: bool,
        frames: &[rustpython_vm::vm::FramePtr],
    )

Source from the content-addressed store, hash-verified

348 /// Each `FramePtr` must point to a live frame (caller holds the Mutex).
349 #[cfg(all(any(unix, windows), feature = "threading"))]
350 fn dump_traceback_thread_frames(
351 fd: i32,
352 thread_id: u64,
353 is_current: bool,
354 frames: &[rustpython_vm::vm::FramePtr],
355 ) {
356 write_thread_id(fd, thread_id, is_current);
357
358 if frames.is_empty() {
359 puts(fd, " <no Python frame>\n");
360 } else {
361 for fp in frames.iter().rev() {
362 // SAFETY: caller holds the Mutex, so the owning thread can't pop.
363 dump_frame_from_ref(fd, unsafe { fp.as_ref() });
364 }
365 }
366 }
367
368 #[derive(FromArgs)]
369 struct DumpTracebackArgs {

Callers 2

dump_all_threadsFunction · 0.85
watchdog_threadFunction · 0.85

Calls 7

write_thread_idFunction · 0.85
putsFunction · 0.85
dump_frame_from_refFunction · 0.85
is_emptyMethod · 0.45
revMethod · 0.45
iterMethod · 0.45
as_refMethod · 0.45

Tested by

no test coverage detected