How do I get a stacktrace out of this?

RUST_BACKTRACE=1 cargo run

thread '<unknown>' has overflowed its stack
fatal runtime error: stack overflow
Aborted (core dumped)

Try running it under gdb.

Is this the idiomatic way? I'm not afraid of gdb; I just stopped using it since switching from C/C++ to Rust.

I don't use a debugger with Rust very often, but when I do, I use gdb. As for whether its idiomatic, well, I don't know.

1 Like

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.