From patchwork Thu Mar 3 01:09: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: 8487091 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 DB25D9F372 for ; Thu, 3 Mar 2016 01:10:13 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1877F2034A for ; Thu, 3 Mar 2016 01:10:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4BDE5202FF for ; Thu, 3 Mar 2016 01:10:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755223AbcCCBKI (ORCPT ); Wed, 2 Mar 2016 20:10:08 -0500 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) 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=LrkWX+gVCwCRNbXCGUFp0N1kGHLX6/8rvMYzAg90LVwVFoIc67Huz7mNrEQeqL2wOG hrJW72KvTBPbulQqid8tdm7MSFUv2mm/Wwx8XGMWEDH1n8Re4JnX6QHsl5ecwOZLyQ0o pkUgumjlcrLLuUZbbHnwfMy1JsyeC3rktcM7GBNEYk0mH26GFTXCqOQL+e0vU7gdlHYZ e9mnGfxVfL2bCqjnqAYuJY4Vv6sYKVEdL3BaV1zJ7bLh2CaGN9mjh4cU+Eis24Q2FIHh bDE1VPYiY9iw3jyarBrVxAgIlIUHJc79HGhZHOz/94zhWXQPT2tyrxM6tJN2Xndh8RvC HLcw== 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=a6AK2xqo6yPhg4sd0TB0bJGSBrGWw5xbdjZznBrp7H9Mw3GZ5Uzqp6ePUmowi/Tz1G LVqw92oCskMjfk0fxs+qHksS/c2WCVnpwP+W9B+Cnri6ZWT+1A8NQnk35iDJcJhrSceN M2DES1QW/hckcP8IyVGhxPIY1OLQWah/V7Cc1IAAzntlibNvqyTONF01BFd9//KBJBP5 ac5JFxgUKpEloZhi6YKhiYD4UIvXBeESYOmvVHfYGrw45JSmjm2FxNt40jyWswMYubsB NMysMW7tB0v+WsP/aDBh7lUp8o8mVhDZoX2NBX/1sQlDmY06V/0z93OTrZPJ9HjIGneC 9bdA== X-Gm-Message-State: AD7BkJIwiy+OM7UdufRSiQAeRlkpqHHynhM9TapOslrlTe2O1YnkfEO++bby/Z61g5LbNZm1 X-Received: by 10.98.8.219 with SMTP id 88mr43188988pfi.51.1456967400161; Wed, 02 Mar 2016 17:10:00 -0800 (PST) Received: from localhost ([2620:0:1009:3:10b2:1b3a:febc:1b15]) by smtp.gmail.com with ESMTPSA id 67sm55715583pfi.2.2016.03.02.17.09.59 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Wed, 02 Mar 2016 17:09:59 -0800 (PST) From: Peter Feiner To: kvm@vger.kernel.org, drjones@redhat.com, pbonzini@redhat.com Cc: pfeiner@google.com 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> X-Mailer: git-send-email 2.7.0.rc3.207.g0ac5344 In-Reply-To: <1456967378-6367-1-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> 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=unavailable 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