From: Peter Feiner Subject: [kvm-unit-tests v2 7/8] lib: dump stack on abort() Date: Wed, 2 Mar 2016 17:09:37 -0800 Message-ID: <1456967378-6367-8-git-send-email-pfeiner@google.com> References: <1456867658-10937-1-git-send-email-pfeiner@google.com> <1456967378-6367-1-git-send-email-pfeiner@google.com> Cc: pfeiner@google.com To: kvm@vger.kernel.org, drjones@redhat.com, pbonzini@redhat.com Return-path: Received: from mail-pf0-f181.google.com ([209.85.192.181]:33457 "EHLO mail-pf0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751243AbcCCBKB (ORCPT ); Wed, 2 Mar 2016 20:10:01 -0500 Received: by mail-pf0-f181.google.com with SMTP id 124so4260038pfg.0 for ; Wed, 02 Mar 2016 17:10:00 -0800 (PST) In-Reply-To: <1456967378-6367-1-git-send-email-pfeiner@google.com> Sender: kvm-owner@vger.kernel.org List-ID: Signed-off-by: Peter Feiner --- lib/libcflat.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/libcflat.h b/lib/libcflat.h index 42c94df..1798716 100644 --- a/lib/libcflat.h +++ b/lib/libcflat.h @@ -77,10 +77,12 @@ void dump_current_stack(void); #define assert(cond) \ do { \ - if (!(cond)) \ + if (!(cond)) { \ printf("%s:%d: assert failed: %s\n", \ - __FILE__, __LINE__, #cond), \ + __FILE__, __LINE__, #cond); \ + dump_current_stack(); \ abort(); \ + } \ } while (0) #endif -- 2.7.0.rc3.207.g0ac5344