From patchwork Tue Mar 1 21:27:37 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Feiner X-Patchwork-Id: 8470651 Return-Path: X-Original-To: patchwork-kvm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 68BC89F314 for ; Tue, 1 Mar 2016 21:27:54 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 921E12034A for ; Tue, 1 Mar 2016 21:27:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A334E2035B for ; Tue, 1 Mar 2016 21:27:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752899AbcCAV1v (ORCPT ); Tue, 1 Mar 2016 16:27:51 -0500 Received: from mail-pa0-f53.google.com ([209.85.220.53]:36654 "EHLO mail-pa0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751581AbcCAV1s (ORCPT ); Tue, 1 Mar 2016 16:27:48 -0500 Received: by mail-pa0-f53.google.com with SMTP id yy13so118846607pab.3 for ; Tue, 01 Mar 2016 13:27:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=K5eQcVP6ksyDwkKLilLPqZSG5c9UUMZIsGzueY/osMY=; b=B5A3nFKp2MPLvk0dMQNIss1zttGKb+eH/5yCnrCduY3mrtsMQ6LNE6+UnCStQfo7XT JbuUIpr3yQPjdly+w36X+RB4xwCDIU/AYGaDuS6No9Vp5XqFiARefRVugeVA+EM6HTMD Lyxk04mFinEClbScdX0m7W6D2IvjFTKUHA8U0A5O8dKglKZT6UHgMU8YAKHNyaX1mXtV WwU46A7tshStdAHFan4Hn4pqUj+0Tq4ZbAyIwXjXaSFrueNsiDRmQtly+JdvUUuPde3Y JPbqtyHkcztL/ut/oAVkrc+diiRb+WkG/QXXd2VXM0dc5Q4ZmhjxN8X+SQGzNgmxxLmx xHzw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=K5eQcVP6ksyDwkKLilLPqZSG5c9UUMZIsGzueY/osMY=; b=FrdZK1qI2jXiowEGjU1NpFtc2McY0351rYKZccbc4MWqaIW0HgLD6gWCASkeEedhye Gyf/9wNMO4qsiWeZAINofa+GX6+Yej9QZEEZLgieb3kctThGgrMfVMkiGD9gfe+v4rL2 PpyPtrq/WH6L2/Tt6tPvgnWDwKowP/sq3Lc/umPxaBzTjJSsOlCsn4As0GUWRfEfMS0d 7+WRdl7paifn1aK6FQCYk6M8J+5pxkRkiU/OKbaqBnK8hY6nEATs2fzxZ0bs+x5+bDD0 PAwDGbz9UrR7KZYbxZzOi2GEh/c0KTF+0SJvjkCRh5uhbAfV2xBFhnwikATEAr8KE41G YAxg== X-Gm-Message-State: AD7BkJLatsR1XqZs26n0KyJmaTu0ZyIseho0Uyhen39xFk+AJF8gSFi8UIjkLF1BjEvv8Vzx X-Received: by 10.66.55.73 with SMTP id q9mr33466800pap.50.1456867668159; Tue, 01 Mar 2016 13:27:48 -0800 (PST) Received: from localhost ([2620:0:1009:3:b1e9:1d95:1ce5:e70c]) by smtp.gmail.com with ESMTPSA id dg1sm47714245pad.18.2016.03.01.13.27.46 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Tue, 01 Mar 2016 13:27:46 -0800 (PST) From: Peter Feiner To: kvm@vger.kernel.org, drjones@redhat.com, pbonzini@redhat.com Cc: pfeiner@google.com Subject: [kvm-unit-tests 4/5] lib: dump stack on abort() Date: Tue, 1 Mar 2016 13:27:37 -0800 Message-Id: <1456867658-10937-5-git-send-email-pfeiner@google.com> X-Mailer: git-send-email 2.7.0.rc3.207.g0ac5344 In-Reply-To: <1456867658-10937-1-git-send-email-pfeiner@google.com> References: <1456867658-10937-1-git-send-email-pfeiner@google.com> Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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