c - Using ptrace to generate a stack dump -


i compiling c++ on *nix , generate stack dump a) @ arbitrary point in program, b) during signal, particularly during sigsegv.

google tells me ptrace tool job, can't find comprehensible examples of walking stack. getting return address, yeah, next return address? , extracting symbolic name of function @ point? dwarf?

many if can tell me go here.

if using glibc, gnu functions backtrace() , backtrace_symbols() best way this. walking stack going environment-specific anyway, there's no downside using non-portable native functions on each platform it.


Comments

Popular posts from this blog

javascript - Enclosure Memory Copies -

php - Replacing tags in braces, even nested tags, with regex -