Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1pUXNz-0001vQ-UC for mharc-grub-devel@gnu.org; Tue, 21 Feb 2023 13:29:08 -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 1pUXNy-0001vG-EX for grub-devel@gnu.org; Tue, 21 Feb 2023 13:29:06 -0500 Received: from mail-qt1-x82a.google.com ([2607:f8b0:4864:20::82a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pUXNx-0004AQ-0L for grub-devel@gnu.org; Tue, 21 Feb 2023 13:29:06 -0500 Received: by mail-qt1-x82a.google.com with SMTP id bt6so5244497qtb.4 for ; Tue, 21 Feb 2023 10:29:04 -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=bnaWHQdD1JwjghJJjYBZh+PHHu4sHQsdIK8A0Fwgh28=; b=17UunkRc6rfQn/SRUVAUKfn4WQ4H/vKYvN09vvw17x4iwWg4cDpz6IbYDyO/+7evKQ nWdG8ZSaFeTxPcMeMxO/nXZGhcRuD8r/tNjBhj+5SWFFbldvgrUkrlIUR+MusJTBDYpc pm3uE1F5XTZuqEaX064d1o2Q6O71I6CLd88Ty3YklaNDPHn+Wnjsmm/ZrzjoV6mvvJvL vf7/DNIyqz+GcHnw8oFxqPJfV5osHtP0BxEGguJ36RvemUiSK0+oDpeCQUL54mwziDAa 6KhFR73taD9NuuvNCPv5DNa6g0M4ysONpN2gfxcgMSaUE5IZx/hbnTQU+orvIZ/ejRTg OrJw== 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=bnaWHQdD1JwjghJJjYBZh+PHHu4sHQsdIK8A0Fwgh28=; b=Aymoz5WEibvkXuORE14iRnwwXxbt7nBlrus3Xj5pxsKuBnhjULm3x29A7/RT9xpjCy RULZ6PaYeCkUpJzRK2bHfA8lHEAsxPatAea5l6/3z/l6mAGUoU3srz5GMnHdUie8oXjY G0A5iefVA5NqvEF32EdbQ822IR9t5ndPO+Ruj1REY+EZeDtzSjFSfyCSDcv2wuLh900U dgx6evSaKYWnBfPa1d5Y82dCi/VorL7dS+F8PSHph3GJ9k2yJ0VxPZ3jXgIIWLJOsCB6 2CCOTfXjLFbndNW2bi9ZZd+bugqbeav+NrIfwMqcBXa+kx0vQhKr9+IDtx716mPRMFcX KNZQ== X-Gm-Message-State: AO0yUKXVOkeODHIEleFsQzCyek/k15eKqROaLDbku/T6+tpb7WdSdYrE mkPSyQcX9SRm5KlOLPKgQ/gsucF51ZMg6zv/ X-Google-Smtp-Source: AK7set+vz0PMGMV3yXU/Yb/BFHNiexlBHoL2oUHAFmn4nVpGlVc8Vw32wSnHytidkT7RoI7pYniJvg== X-Received: by 2002:a05:622a:3d4:b0:3b8:6ae9:b100 with SMTP id k20-20020a05622a03d400b003b86ae9b100mr25545114qtx.7.1677004143486; Tue, 21 Feb 2023 10:29:03 -0800 (PST) Received: from localhost.localdomain ([37.218.244.251]) by smtp.gmail.com with ESMTPSA id h5-20020ac85045000000b003bd1a464346sm9339118qtm.9.2023.02.21.10.29.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Feb 2023 10:29:02 -0800 (PST) From: Glenn Washburn To: grub-devel@gnu.org, Daniel Kiper Cc: Glenn Washburn Subject: [PATCH 2/3] gdb: Prevent wrapping when writing to .segments.tmp Date: Tue, 21 Feb 2023 12:28:47 -0600 Message-Id: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2607:f8b0:4864:20::82a; envelope-from=development@efficientek.com; helo=mail-qt1-x82a.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham 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: Tue, 21 Feb 2023 18:29:06 -0000 GDB logging is redirected to write .segments.tmp, which means that GDB will wrap lines longer than what it thinks is the screen width (typically 80 characters). When wrapping does occur it causes gmodule.pl to misbehave. So disable line wrapping by using GDB's "with" command so that its guaranteed to return the width to the previous value upon command completion. Also disable command tracing when dumping the module sections because that output will go to .segments.tmp and thus cause gmodule.pl to misbehave. Signed-off-by: Glenn Washburn --- grub-core/gdb_grub.in | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/grub-core/gdb_grub.in b/grub-core/gdb_grub.in index 4e45ad5622..edb5a8872c 100644 --- a/grub-core/gdb_grub.in +++ b/grub-core/gdb_grub.in @@ -22,6 +22,10 @@ define dump_module_sections_helper end define dump_module_sections + # Set unlimited width so that lines don't get wrapped writing + # to .segments.tmp + with width 0 -- \ + with trace-commands off -- \ pipe dump_module_sections_helper $arg0 | sh -c 'cat >>.segments.tmp' end document dump_module_sections -- 2.34.1