From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1p63IW-0003JI-Dx for mharc-grub-devel@gnu.org; Fri, 16 Dec 2022 00:30:16 -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 1p63IU-0003Iw-FC for grub-devel@gnu.org; Fri, 16 Dec 2022 00:30:14 -0500 Received: from mail-pl1-x62d.google.com ([2607:f8b0:4864:20::62d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p63IS-0003nK-VW for grub-devel@gnu.org; Fri, 16 Dec 2022 00:30:14 -0500 Received: by mail-pl1-x62d.google.com with SMTP id w23so1229465ply.12 for ; Thu, 15 Dec 2022 21:30:11 -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=YaSdAb3I9Z9HSyVu1DPTOK7vR9Dx4Aiag1vnVMiuf9BpSH7gTulEkjOgCSa3ciUu9o hnQlW/nVBqKYBSIXx7UF3xzZKAkwkA5vqPcJaDdRiCCwNJj96+uBWhpAAISqqyOWY8sT MoxvXBPHt//GKZfFsj5in7S7FSifqPAhyGVh4+sDTFWOG6T+hwOrRT7J5QV8I3WJGXq6 dtusKxiJ059cY7zunlkw/2OLqvNvhHSF/O6C/wyCHqZHPHXu/VD2xZTBYQQObyR+x5JM On5DzO+ipJEJJ6NWL+CkYO7fBtopRavv92uVNRoWFqEJOnatL1xT0KjARKFsEke5oEpk ON8A== 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=BP6yXU0sITNRZwOU8OHh5mM8+IXC8DJ2KADMle+o0fX3gtPllmYtw466VBoTgrU/ve ymV+lqkFbozRjgnlZbal6gRcY4/KOMLMhyAotobT7qOwzNh52fBiIuX5mmC4iV02SYHE cWmlXrH9PyK+gg+OW0qtVuEX7C/BvF3v5D6tsy+jNulMhyrSk2VVeD9kJK6rjNcaxnTO dBU1efneqjeFx1ft75xOIYb8oyGweOnEn0iue7E4FzJ10Y1UT59TDiUQdDNqK9j7JePX LY3wQA/+kpXVboCKKN3t6JoeeLDPFf2tjcmDwKd4+XY9B5un/xQA+wvYpmZsVUNzgrGy sQQQ== X-Gm-Message-State: ANoB5pms8sO5rP0l+rXYh8SOMu2mDfCf3a+vbZmcpGNLXLXqjV7i7wRo 8ODos+B2ENKzWUQF/nM3LjHBYrA04Rk4HkDb X-Google-Smtp-Source: AA0mqf7MKjGLCdVtyxwNFM4ixmB4ZdgD7FYX5uYBSth6TjbNG3jkdtSYnCGxLzvRVKmdg4ZTQTLixA== X-Received: by 2002:a17:903:240d:b0:185:441f:70b1 with SMTP id e13-20020a170903240d00b00185441f70b1mr33135370plo.54.1671168610406; Thu, 15 Dec 2022 21:30:10 -0800 (PST) Received: from crass-HP-ZBook-15-G2.lan ([37.218.244.251]) by smtp.gmail.com with ESMTPSA id u4-20020a17090341c400b00187033cac81sm577714ple.145.2022.12.15.21.30.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Dec 2022 21:30:09 -0800 (PST) From: Glenn Washburn To: "grub-devel @ gnu . org" , Daniel Kiper Cc: Glenn Washburn Subject: [PATCH v4 02/15] gdb: Prevent wrapping when writing to .segments.tmp Date: Thu, 15 Dec 2022 23:29:25 -0600 Message-Id: <20221216052938.224564-3-development@efficientek.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221216052938.224564-1-development@efficientek.com> References: <20221216052938.224564-1-development@efficientek.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2607:f8b0:4864:20::62d; envelope-from=development@efficientek.com; helo=mail-pl1-x62d.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: Fri, 16 Dec 2022 05:30: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 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