From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1p5iNZ-0007Y3-Dl for mharc-grub-devel@gnu.org; Thu, 15 Dec 2022 02:10:05 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p5iNY-0007Xq-Bx for grub-devel@gnu.org; Thu, 15 Dec 2022 02:10:04 -0500 Received: from mail-qt1-x830.google.com ([2607:f8b0:4864:20::830]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p5iNW-00085e-Mc for grub-devel@gnu.org; Thu, 15 Dec 2022 02:10:03 -0500 Received: by mail-qt1-x830.google.com with SMTP id g7so4527350qts.1 for ; Wed, 14 Dec 2022 23:10:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=efficientek-com.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=RM/Yh3m/Kf5qNALbxRrpbm6o9lGc9NrVE/Qqh4sMn00=; b=X4iQiGeEy+c40G8kewVn+JaOR4YXDoYG8P/0j1AjNWIYv4ngupVuh6T9zQ1uXkynkL Fs2lV8nU+QczZurB+917YHMwhU6vxfZVKpTfgybIqq/Ox8gzHYQ+LPP2AEtCEcNXBDk6 EKDRL00hg2UcOVtkdXmTUuNHfxk9FwnWCyB3cQvk8YGnptfseRUG+iALAfG0zBQ4du2d jt8wQSLn4LKEZAK6C7Rl1TotoehJb37w8O6Xmint1bc1R7T+VCtJ9JRJpGJm34jWGrp+ NvGIRVhPygDqDBtzSQxPfObyeFDsy4J7/PAJqg1wP5I3+5rkez59a/RsQR3y/pX2bYS6 Kxvg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=RM/Yh3m/Kf5qNALbxRrpbm6o9lGc9NrVE/Qqh4sMn00=; b=rHKrPUiA7YltTvlUimbN0VBhdXGmv+S68dM6yYyKq/Z4u+5n8uS2YOxHHwf62+fiJk FAb9eztqouTR/K7Pfo5vVin0ZoI++MwRvVS7wWkLjsf4b4a8RSh7ssuS5abm6PIIjKcF +TmT7D9vNnCQ8BZxevYVzYJFgY5XL8KT99VeNZQ+QCUsKuK+NsWp+jhUNYFbSbsQ/inP YbNJfmdzWi0o8y2/057CKNtEywiZMTgDMEWLfcvbmc1lKCqkv1oWmF1fZRh71skXojAe eNfkOOwqfylnFiaSu94hapAUXbUGu7YPFlF8p1pRssBY8bjAKjzMZcDRgEzgaJ12wNzI W6Ow== X-Gm-Message-State: ANoB5pmvLJp4ApAyC+ffmF4bG0FFWdogdMwy7NopjkLgo4+S8M8KOo7z tizb72aSO3BrZ+LL5kVOjSE5MlU7HZj6Ie9S X-Google-Smtp-Source: AA0mqf76eiRwpO0vQh/f603IIBk9UNvNYPBfFXxTbz1ZcazVBDdULbiNLtbloKpcH5ZT19osYJEN0A== X-Received: by 2002:a05:622a:4805:b0:3a8:16dd:ed9e with SMTP id fb5-20020a05622a480500b003a816dded9emr16401161qtb.1.1671088201282; Wed, 14 Dec 2022 23:10:01 -0800 (PST) Received: from crass-HP-ZBook-15-G2.lan ([37.218.244.251]) by smtp.gmail.com with ESMTPSA id fy16-20020a05622a5a1000b003a7ec97c882sm3125068qtb.6.2022.12.14.23.09.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Dec 2022 23:10:00 -0800 (PST) From: Glenn Washburn To: grub-devel@gnu.org, Daniel Kiper Cc: Glenn Washburn Subject: [PATCH v3 14/15] gdb: Add ability to turn on shell tracing for gdb helper script Date: Thu, 15 Dec 2022 01:07:49 -0600 Message-Id: <20221215070750.102591-15-development@efficientek.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221215070750.102591-1-development@efficientek.com> References: <20221215070750.102591-1-development@efficientek.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2607:f8b0:4864:20::830; envelope-from=development@efficientek.com; helo=mail-qt1-x830.google.com X-Spam_score_int: 14 X-Spam_score: 1.4 X-Spam_bar: + X-Spam_report: (1.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_SBL_CSS=3.335, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Dec 2022 07:10:04 -0000 If envvar GRUB_GDB_TRACE_FILE is set, turn on shell tracing and write stderr messages, which includes trace messages, to path specified in the value of the envvar. Signed-off-by: Glenn Washburn --- grub-core/gdb_helper.sh.in | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/grub-core/gdb_helper.sh.in b/grub-core/gdb_helper.sh.in index 1eaa976fb7..13f79bfb07 100644 --- a/grub-core/gdb_helper.sh.in +++ b/grub-core/gdb_helper.sh.in @@ -2,6 +2,11 @@ ### Helper functions for GRUB's GDB script. ### +if [ -n "$GRUB_GDB_TRACE_FILE" ]; then + set -x + exec 2>"$GRUB_GDB_TRACE_FILE" +fi + alignup() { PAD=1 if [ "$(($1%$2))" -eq 0 ]; then -- 2.34.1