From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D97E1C11F64 for ; Thu, 1 Jul 2021 06:19:54 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5164961607 for ; Thu, 1 Jul 2021 06:19:54 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5164961607 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 45B96832AB; Thu, 1 Jul 2021 08:17:21 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="qeFnLMVH"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id A413783260; Thu, 1 Jul 2021 08:16:55 +0200 (CEST) Received: from mail-qk1-x733.google.com (mail-qk1-x733.google.com [IPv6:2607:f8b0:4864:20::733]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id E441283270 for ; Thu, 1 Jul 2021 08:16:30 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=seanga2@gmail.com Received: by mail-qk1-x733.google.com with SMTP id bj15so4972927qkb.11 for ; Wed, 30 Jun 2021 23:16:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=qRNgH4drkBTQli8UEL56MsaXpzEJXsN+W+l2IxU9qtg=; b=qeFnLMVHLzr8E0wZMyhs8g+XAbqmvIrL+fJLWLcUtOJsBJV22YCVzHT601cRggJZDc ua3iRs+DE8GNrmU+6sn0ZDG/2cibiRRCqCpb9vZAAe+RSlok/4NdBg8a41ZA2cWcfAxP wiIbVhv5pcTKm7jfkEoCHh0AyPP8Ff3kj6TNyGKUnB9Zb6e3bryZAE5K44sdljdUVRbt dmChlmCwR6Qk0+MhhfLIejMYvR+lugMyQ7Z+YSnicSsI+W/nlXdyEOPqZ2/H7xz7BnKm MzMFUy4TQZyHpngvwpGJ72t6kdEcNuUyk5wCjbyshiuobBO5pMy1LXm0gDw+6mXwPjZV kENg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=qRNgH4drkBTQli8UEL56MsaXpzEJXsN+W+l2IxU9qtg=; b=ki/uQgrgyr2NRGYcIlnG87StqdoTpvjovki0VCGaFyp9MIZjnFre51HDbcyVLcLZTV M5dUr2f4HYzVOQj8stpozvTmxyTY5ZgfUuCwSnWJ1GLs8vX7lW7Tt9CkIRzqSWpUQ6jT igT5tf7NnBLuS1wjjNBQkoAp7VpPA2yqjm/CoFw3RQKbAvenzOC8Cz9RvrJI1yWdgkkJ R4WMdiDsvv+vchs2mRd++IC300zZnSjkofeFvkIg4DGC2+Xa4ok3XZQLLbmAE/0OOUKu 4Ke1VRleVVtwAQ+BhJRjvucQlRlotjMeM34xu7sCMt/CIJZDoYAryzIgdE5XBYsplIhK JUow== X-Gm-Message-State: AOAM531PmJ9JhDf+zVfeVcS67m5mFQHqWIVk7cufRvnpXU3xOKw5UWG4 UNhv6vE+7t7oOLIZg1Epn4AKXdLtDSI= X-Google-Smtp-Source: ABdhPJyncCXXfiOdt45qf0S5GtWINdg53qKI5KXXhI3RIybDNE4IsK1IRgHgAUqHYaBzUKKc5m8bdw== X-Received: by 2002:a37:4197:: with SMTP id o145mr41241288qka.75.1625120189708; Wed, 30 Jun 2021 23:16:29 -0700 (PDT) Received: from godwin.fios-router.home (pool-74-96-87-9.washdc.fios.verizon.net. [74.96.87.9]) by smtp.gmail.com with ESMTPSA id g21sm1684673qts.90.2021.06.30.23.16.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Jun 2021 23:16:29 -0700 (PDT) From: Sean Anderson To: u-boot@lists.denx.de, Tom Rini Cc: =?UTF-8?q?Marek=20Beh=C3=BAn?= , Wolfgang Denk , Simon Glass , Roland Gaudig , Heinrich Schuchardt , Kostas Michalopoulos , Sean Anderson Subject: [RFC PATCH 20/28] cli: lil: Add config to enable debug output Date: Thu, 1 Jul 2021 02:16:03 -0400 Message-Id: <20210701061611.957918-21-seanga2@gmail.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210701061611.957918-1-seanga2@gmail.com> References: <20210701061611.957918-1-seanga2@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean This provides an easy way to enable assertions and debug messages. It will also be used to enable tracing features in future patches. Signed-off-by: Sean Anderson --- cmd/Kconfig | 6 ++++++ common/Makefile | 3 +++ 2 files changed, 9 insertions(+) diff --git a/cmd/Kconfig b/cmd/Kconfig index 7c8962cfc2..bba72bbdc2 100644 --- a/cmd/Kconfig +++ b/cmd/Kconfig @@ -61,6 +61,12 @@ config LIL_RECLIMIT avoid call stack overflows and is also useful when running through an automated fuzzer like AFL. Set to 0 to disable the recursion limit. +config LIL_DEBUG + bool "Enable LIL debugging" + help + This enables debug prints, assertions, and other tracing features in + LIL. If you are not working on LIL, say 'n' here. + endif endif diff --git a/common/Makefile b/common/Makefile index dce04b305e..558e1932fe 100644 --- a/common/Makefile +++ b/common/Makefile @@ -11,6 +11,9 @@ obj-y += exports.o obj-$(CONFIG_HASH) += hash.o obj-$(CONFIG_HUSH_PARSER) += cli_hush.o obj-$(CONFIG_LIL) += cli_lil.o +ifneq ($(CONFIG_LIL_DEBUG),) +CFLAGS_cli_lil.o += -DDEBUG +endif obj-$(CONFIG_AUTOBOOT) += autoboot.o # This option is not just y/n - it can have a numeric value -- 2.32.0