Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1npeTD-0006bA-0Z for mharc-grub-devel@gnu.org; Fri, 13 May 2022 19:13:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56048) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1npeTB-0006Yw-GT for grub-devel@gnu.org; Fri, 13 May 2022 19:13:13 -0400 Received: from mail-vs1-xe32.google.com ([2607:f8b0:4864:20::e32]:45606) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1npeT9-0007PQ-TH for grub-devel@gnu.org; Fri, 13 May 2022 19:13:13 -0400 Received: by mail-vs1-xe32.google.com with SMTP id e19so9859967vsu.12 for ; Fri, 13 May 2022 16:13:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=efficientek-com.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Ogjy0XMO1hOZXFodWnobnwFtK6YY5uA9IlV0HpEE8oQ=; b=UH34iB9QCfd/8zPyy1bSbDu2aU/pi18z68SYCDYwhyyCjwlSQwHFVl2rfndLPXwOZk NSHWmPs5fqWOsZNcjneIDhBDLdWxIX8pMM96v9455TtvuAVUTpJ1gQPtGbeyPYYAzAI/ Ado52eDxBvn4BE1H+2azHhgjLAngFQRCl+OhY+Ukxln3gUcnQqXL/5/sGWGSLVpg6dV8 IcjNOGHMQ0rgf4iQwoIoI8ixjtOSlA3tzjqfmwslE6iPJoL/W5XmsQRZJoT6JU9RrDhK R8ZlNEiEiolOpFQNTLPXxbRzRyK/62FLoS3628T6rCDPLXEtIR0a+w2doz1J7Tc+wdY6 0Jbg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Ogjy0XMO1hOZXFodWnobnwFtK6YY5uA9IlV0HpEE8oQ=; b=aH0iTlAAwQGbGe+FPB4L/PmKOB7QeX8OLu75HIQi60vY4evFX2do7NXKyqrfBtkxru CUaef+fD8ZR4sj4q85lHML5J1qy5cgNhXVMaSkSJ1HR/hm+OXe/ssniyoVoXlw76VLBW J0aryMXswCC98uPojctxv1DVD2qqUeG6X1qwxK5dgQotmBJmixW4pY/TGLfs1Q5Irnnc 6SE6YGxgEwWu3hPQesUjxtaN8nYfZUBHn1jcOUILcWfGre3a+okFJxBOtcBZKnUiuj+i iRBWvjATyyOrshw9iAGh0bLuO420hZmek2f60CI7XYE5cmYUnhyp7xg+9QkqbiEx29IE HORA== X-Gm-Message-State: AOAM530FhFxOw+RAL79Q0VftZVHcgB3sGhs990GISys1vz8ylLIOBt0Z iFfaWRwSfmWrOxBvSo67VnevwZLwTWSWl8lt X-Google-Smtp-Source: ABdhPJx+jV9KNCCLzcaphnqNZH0Eg7Wz8qPBQp+x1xJwKz4YFIL18um7xHpzWQdrRSnbmtIlr7Dsww== X-Received: by 2002:a67:c586:0:b0:32c:d87d:680d with SMTP id h6-20020a67c586000000b0032cd87d680dmr3516571vsk.65.1652483590838; Fri, 13 May 2022 16:13:10 -0700 (PDT) Received: from localhost.localdomain ([37.218.244.249]) by smtp.gmail.com with ESMTPSA id 129-20020a1f1387000000b0034e6f1fd067sm423865vkt.49.2022.05.13.16.13.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 May 2022 16:13:10 -0700 (PDT) From: Glenn Washburn To: grub-devel@gnu.org, Daniel Kiper Cc: Peter Jones , Robbie Harwood , Glenn Washburn Subject: [PATCH v2 02/15] gdb: Prevent wrapping when writing to .segments.tmp Date: Fri, 13 May 2022 18:12:35 -0500 Message-Id: <061d29407a49cf0efa5dc9d4622a9f8637592748.1652482822.git.development@efficientek.com> 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::e32; envelope-from=development@efficientek.com; helo=mail-vs1-xe32.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, T_SCC_BODY_TEXT_LINE=-0.01 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: Fri, 13 May 2022 23:13:14 -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 bdf743f0d..083731408 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