Some aids for debugging: stack dumping, register dumping, and printing failing assertion conditions. Compiled on ppc64, arm64, i386, x86_64. v5: * Removed unused "b" flag from run_tests.sh * Removed misleading comment in mkstandalone.sh. v4: * Moved around arch and asm files per Linux style (hopefully). * Added --[enable|disable]-pretty-print-stacks to ./configure. This has obviated the -p command-line option in ./run_tests.sh that I introduced in v1. * Fixed arch-neutral backtrace so backtrace itself isn't included. v3: * Renamed functions to match standard backtrace functions * Added asm-generic stack walker that uses __builtin_return_address. * Moved offset out of libcflat and into pretty printer * Made pretty printer more robust w.r.t. errors: now it just continues printing. v2: * Fixed a bunch tests on x86 that broke with -fno-omit-frame-pointer. * Only use -fno-omit-frame-pointer on x86. I suspect arm & ppc will have similar problems that I fixed for x86. Peter Feiner (5): lib: backtrace printing x86: lib: debug dump on unhandled exceptions lib: dump stack on failed assert() scripts: pretty print stack traces scripts: automatically pretty print stacks Makefile | 6 ++- configure | 10 +++++ lib/arm/asm/stack.h | 0 lib/arm64/asm/stack.h | 0 lib/asm-generic/stack.c | 3 ++ lib/libcflat.h | 9 +++- lib/powerpc/asm/stack.h | 0 lib/ppc64/asm/stack.h | 0 lib/stack.c | 96 ++++++++++++++++++++++++++++++++++++++++++ lib/stack.h | 20 +++++++++ lib/x86/asm/stack.h | 18 ++++++++ lib/x86/desc.c | 69 +++++++++++++++++++++++++++--- lib/x86/stack.c | 25 +++++++++++ run_tests.sh | 8 +++- scripts/mkstandalone.sh | 2 + scripts/pretty_print_stacks.py | 89 +++++++++++++++++++++++++++++++++++++++ x86/Makefile.common | 4 ++ 17 files changed, 348 insertions(+), 11 deletions(-) create mode 100644 lib/arm/asm/stack.h create mode 100644 lib/arm64/asm/stack.h create mode 100644 lib/asm-generic/stack.c create mode 100644 lib/powerpc/asm/stack.h create mode 100644 lib/ppc64/asm/stack.h create mode 100644 lib/stack.c create mode 100644 lib/stack.h create mode 100644 lib/x86/asm/stack.h create mode 100644 lib/x86/stack.c create mode 100755 scripts/pretty_print_stacks.py -- 2.7.0.rc3.207.g0ac5344 -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html