How to create a stack trace from a core dump file in C without calling an external tool like gdb

I am looking for an easy way to pull a stack trace from a Linux kernel dump file programmatically, without having to call gdb. Anyone have an idea?

To avoid confusion: I'm not looking for a way to get my own footprint back inside the process. I am looking for a way to get backtrace from a completely independent kernel dump file that I have.

0
source share
1 answer

If you really can't call gdb, but want the backtrace, like the ones it provides, you could just copy the gdb source bit that is needed for this to your project. Obviously, just calling gdb will be easier, more maintainable, and less eyebrow, so maybe you just need to do this.

+1
source

All Articles