All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Feiner <pfeiner@google.com>
To: kvm@vger.kernel.org, drjones@redhat.com, pbonzini@redhat.com
Cc: Peter Feiner <pfeiner@google.com>
Subject: [PATCH kvm-unit-tests v5 0/5] Debugging aids
Date: Mon,  7 Mar 2016 09:46:52 -0800	[thread overview]
Message-ID: <cover.1457372594.git.pfeiner@google.com> (raw)
In-Reply-To: <1456867658-10937-1-git-send-email-pfeiner@google.com>

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


  parent reply	other threads:[~2016-03-07 17:47 UTC|newest]

Thread overview: 65+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-01 21:27 [kvm-unit-tests 0/5] Debugging aids Peter Feiner
2016-03-01 21:27 ` [kvm-unit-tests 1/5] lib: print failing assert cond Peter Feiner
2016-03-02 15:04   ` Andrew Jones
2016-03-01 21:27 ` [kvm-unit-tests 2/5] lib: backtrace printing Peter Feiner
2016-03-01 22:58   ` Peter Feiner
2016-03-01 23:07     ` Peter Feiner
2016-03-01 21:27 ` [kvm-unit-tests 3/5] x86: lib: debug dump on unhandled exceptions Peter Feiner
2016-03-01 21:27 ` [kvm-unit-tests 4/5] lib: dump stack on abort() Peter Feiner
2016-03-01 21:29   ` Peter Feiner
2016-03-01 21:27 ` [kvm-unit-tests 5/5] scripts: pretty print stack traces Peter Feiner
2016-03-01 21:34   ` Paolo Bonzini
2016-03-03  9:35     ` Andrew Jones
2016-03-03 12:57       ` Paolo Bonzini
2016-03-03 13:38         ` Andrew Jones
2016-03-03  1:09 ` [kvm-unit-tests v2 0/8] Debugging aids Peter Feiner
2016-03-03  1:09   ` [kvm-unit-tests v2 1/8] x86: emulator: asm fixes Peter Feiner
2016-03-03  1:09   ` [kvm-unit-tests v2 2/8] x86: emulator: disable test_lldt Peter Feiner
2016-03-03  1:09   ` [kvm-unit-tests v2 3/8] x86: realmode: fix test_sgdt_sidt overflow Peter Feiner
2016-03-03  1:09   ` [kvm-unit-tests v2 4/8] x86: eventinj: make test work with -O0 Peter Feiner
2016-03-03 12:53     ` Paolo Bonzini
2016-03-03  1:09   ` [kvm-unit-tests v2 5/8] lib: backtrace printing Peter Feiner
2016-03-03  9:17     ` Andrew Jones
2016-03-03 17:01       ` Peter Feiner
2016-03-03 17:56         ` Andrew Jones
2016-03-03  1:09   ` [kvm-unit-tests v2 6/8] x86: lib: debug dump on unhandled exceptions Peter Feiner
2016-03-03  1:09   ` [kvm-unit-tests v2 7/8] lib: dump stack on abort() Peter Feiner
2016-03-03  9:19     ` Andrew Jones
2016-03-03  1:09   ` [kvm-unit-tests v2 8/8] scripts: pretty print stack traces Peter Feiner
2016-03-03  9:54     ` Andrew Jones
2016-03-03 12:58   ` [kvm-unit-tests v2 0/8] Debugging aids Paolo Bonzini
2016-03-03 20:48 ` [kvm-unit-tests v3 0/4] " Peter Feiner
2016-03-03 20:48   ` [kvm-unit-tests v3 1/4] lib: backtrace printing Peter Feiner
2016-03-04 10:15     ` Andrew Jones
2016-03-03 20:48   ` [kvm-unit-tests v3 2/4] x86: lib: debug dump on unhandled exceptions Peter Feiner
2016-03-03 20:48   ` [kvm-unit-tests v3 3/4] lib: dump stack on failed assert() Peter Feiner
2016-03-04 10:25     ` Andrew Jones
2016-03-03 20:48   ` [kvm-unit-tests v3 4/4] scripts: pretty print stack traces Peter Feiner
2016-03-04 10:24     ` Andrew Jones
2016-03-04 16:55       ` Peter Feiner
2016-03-04 18:43         ` Andrew Jones
2016-03-04 19:33 ` [PATCH kvm-unit-tests v4 0/6] Debugging aids Peter Feiner
2016-03-04 19:33   ` [PATCH kvm-unit-tests v4 1/5] lib: backtrace printing Peter Feiner
2016-03-04 19:33   ` [PATCH kvm-unit-tests v4 2/5] x86: lib: debug dump on unhandled exceptions Peter Feiner
2016-03-04 19:33   ` [PATCH kvm-unit-tests v4 3/5] lib: dump stack on failed assert() Peter Feiner
2016-03-04 19:34   ` [PATCH kvm-unit-tests v4 4/5] scripts: pretty print stack traces Peter Feiner
2016-03-04 19:34   ` [PATCH kvm-unit-tests v4 5/5] scripts: automatically pretty print stacks Peter Feiner
2016-03-05 11:29     ` Andrew Jones
2016-03-07 17:48       ` Peter Feiner
2016-03-04 19:37   ` [PATCH kvm-unit-tests v4 0/6] Debugging aids Peter Feiner
2016-03-07 17:46 ` Peter Feiner [this message]
2016-03-07 17:46   ` [PATCH kvm-unit-tests v5 1/5] lib: backtrace printing Peter Feiner
2016-03-08  4:24     ` Andrew Jones
2016-03-11  0:31       ` Peter Feiner
2016-03-07 17:46   ` [PATCH kvm-unit-tests v5 2/5] x86: lib: debug dump on unhandled exceptions Peter Feiner
2016-03-07 17:46   ` [PATCH kvm-unit-tests v5 3/5] lib: dump stack on failed assert() Peter Feiner
2016-03-07 17:46   ` [PATCH kvm-unit-tests v5 4/5] scripts: pretty print stack traces Peter Feiner
2016-03-07 17:46   ` [PATCH kvm-unit-tests v5 5/5] scripts: automatically pretty print stacks Peter Feiner
2016-03-08  4:31   ` [PATCH kvm-unit-tests v5 0/5] Debugging aids Andrew Jones
2016-03-11  0:47 ` [PATCH kvm-unit-tests v6 " Peter Feiner
2016-03-11  0:47   ` [PATCH kvm-unit-tests v6 1/5] lib: backtrace printing Peter Feiner
2016-03-11  0:47   ` [PATCH kvm-unit-tests v6 2/5] x86: lib: debug dump on unhandled exceptions Peter Feiner
2016-03-11  0:47   ` [PATCH kvm-unit-tests v6 3/5] lib: dump stack on failed assert() Peter Feiner
2016-03-11  0:47   ` [PATCH kvm-unit-tests v6 4/5] scripts: pretty print stack traces Peter Feiner
2016-03-11  0:47   ` [PATCH kvm-unit-tests v6 5/5] scripts: automatically pretty print stacks Peter Feiner
2016-03-11  2:41   ` [PATCH kvm-unit-tests v6 0/5] Debugging aids Andrew Jones

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cover.1457372594.git.pfeiner@google.com \
    --to=pfeiner@google.com \
    --cc=drjones@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.