From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1p8w15-0002lo-QO for mharc-grub-devel@gnu.org; Fri, 23 Dec 2022 23:20:11 -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 1p8w0z-0002l2-MB for grub-devel@gnu.org; Fri, 23 Dec 2022 23:20:05 -0500 Received: from mail-pg1-x52a.google.com ([2607:f8b0:4864:20::52a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p8w0y-000089-64 for grub-devel@gnu.org; Fri, 23 Dec 2022 23:20:05 -0500 Received: by mail-pg1-x52a.google.com with SMTP id v62so1378038pgd.9 for ; Fri, 23 Dec 2022 20:20:03 -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=xj5xqKqikglG8W/2dDr+8qJzwvB4yl2xnVVPKrxKyxP2Ot0KDiiuoly9N1UhfLAHHr 5RibxgG/XalCCh05FPuMsWVBgjeFk//7+USSNE1ADz/YJFNHdicc+rfSUQKd4gb9djNx UiP8ctqGNM/dxL89uwJeFYsrkeY5iqUqxBWxy4xCyFUSw9RJkz5ejC6Iz3aXxoUZap+I l8fIUUfC/9ueThcSUHWXCxgrFnJswuaUk/zDaNPtJZzW3TGJH5bU8tgvGRThs1YJTn8X zj9zMGOYuvDd8cBQvokhLPITah4ijkCdG6nZ+ztB4wKvmuJ8pjgpKHGqtXAf1XWXsIJu RBqQ== 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=CexDrJnV1nQurYMW13njBuu7kIwzXC/+iyKpv4+Oplhn6H3XeMrr4WV9TVnI4Niy6S j8R0miiwk4Wasvz4i+H68vqxMUP52oE44gIdjkS5xlnu+xBYe7hnTkvPsHSihHZ8E7Ns uEX++wmIbpokuH+ehb6sWzTHQgp3RpBNKTd4IiGl67cKCP+VLpvTx64psxvRy6A1g/gb njskT8gEnTR9IU1cbqe7yzQl9RAU/gO9IeKGvItGeG9lRAfh6wujrAyQSvJvut1eblte eLHXzOKzQmyNUfYaN8rrEsjkeJT9A1NqcQmWzyUp+rPAaPOR7e+iK4NqLVk7RO035sQU Jbpg== X-Gm-Message-State: AFqh2kpueKAYm7sgSwhg8Ni1DowvUMYr1hGyY+56NZ2er3uUv3dxquRz HYGz+kjGLu/DyjhONspihArssaAhjewvrDCT X-Google-Smtp-Source: AMrXdXt7s9V3SUqLNecKpTa/EX9FRUKmsDttycRoibizIJoowfY5GQftrdtcDtjmajrGeaEqBZ3ZhQ== X-Received: by 2002:a62:4e54:0:b0:580:108e:bd11 with SMTP id c81-20020a624e54000000b00580108ebd11mr13315962pfb.5.1671855602318; Fri, 23 Dec 2022 20:20:02 -0800 (PST) Received: from localhost.localdomain ([204.13.164.84]) by smtp.gmail.com with ESMTPSA id x19-20020aa79413000000b005743b5ebd7csm3324185pfo.92.2022.12.23.20.20.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Dec 2022 20:20:01 -0800 (PST) From: Glenn Washburn To: grub-devel@gnu.org, Daniel Kiper Cc: Robbie Harwood , Peter Jones , Glenn Washburn Subject: [PATCH v5 02/14] gdb: Prevent wrapping when writing to .segments.tmp Date: Fri, 23 Dec 2022 22:19:23 -0600 Message-Id: <20221224041935.787292-3-development@efficientek.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221224041935.787292-1-development@efficientek.com> References: <20221224041935.787292-1-development@efficientek.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2607:f8b0:4864:20::52a; envelope-from=development@efficientek.com; helo=mail-pg1-x52a.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: Sat, 24 Dec 2022 04:20:05 -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