From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1pFMWT-0004an-1e for mharc-grub-devel@gnu.org; Tue, 10 Jan 2023 16:51:09 -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 1pFMWS-0004YD-4L for grub-devel@gnu.org; Tue, 10 Jan 2023 16:51:08 -0500 Received: from mail-pj1-x1030.google.com ([2607:f8b0:4864:20::1030]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pFMWQ-0002Kr-IZ for grub-devel@gnu.org; Tue, 10 Jan 2023 16:51:07 -0500 Received: by mail-pj1-x1030.google.com with SMTP id o7-20020a17090a0a0700b00226c9b82c3aso15002790pjo.3 for ; Tue, 10 Jan 2023 13:51:06 -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=4enbfXl5TksISdhWngCvBPMjvJBaFR2GLuIIsu/2PW/N1goanOatoFkqTpCvD8G56p H775bP4kXnZo2tAnxYaNfJ9JBpX1OEt9762QLYtNmMl1CLgWPgjuMoX7jItSjOec4FTQ a7ZQAMdNw7UcaSKcITwbjZl0yfuv7QYW5z9wE2+z3CtZILPc5lEOqVvPOkQ1XDvZtURf inCAu5hErre4d3vm57noCnoBe2NQFsa9fgBpcP1MxPYHYMqZGAIuKCDEaqQZEzGvrKKU zucgEHjJgqcLxtDHbv/Ty5G9YkIwcWsaX3d9xsA9ohxz1pxv/KGO1Nmr/nvxHOgIL8eI wBtA== 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=dOIcU7SzsI0QGCKUEFNV/rWjmuhdWzEd36AyffbHWaazXk4ktNFgj19CmGWvw3izUL UCTofUFh0L09F4w3h/Qd7EM5Rfy58LmxhtrmI077bNHGEEpIgY12mRooDtgRKioqpM6j 97atpiBcFcWNixcLkDvh23kHQheSqpijXKwAXYuRfyLq+sGUrRWCrGzLGvO9y6P2Bk08 hJbRjlrIBfelJvYIRVTvEG2Q5kVXt78QwSinMzCkbUZmtoOSQ4uZ0vouh9eAllwgewsp SNFhLAF4AL8Ou8hN5s0q9nRAoA83CgMAOj1J9AiokyMd/xOblTpucLvI1aIMYFNwok3K rNew== X-Gm-Message-State: AFqh2kpfcqmbEp6JfvoODnKwbK0chMi0hQR8DULHTB5sFyKbyCRXKmnw OfiuDEr1yc4mJtpdEdNdrGLi9JwmZ5qfpjBk X-Google-Smtp-Source: AMrXdXtBt1ITXQnf5GENiUh3Nl0BL4qklfZHxA9Cqpoiy/j1fNMgKUEGAa7M6+f2TxWzTG5LYbHGWA== X-Received: by 2002:a17:902:ebc9:b0:185:441e:2d7a with SMTP id p9-20020a170902ebc900b00185441e2d7amr74089921plg.17.1673387464610; Tue, 10 Jan 2023 13:51:04 -0800 (PST) Received: from crass-HP-ZBook-15-G2.lan ([199.254.238.56]) by smtp.gmail.com with ESMTPSA id u15-20020a1709026e0f00b00186c3af9644sm7760798plk.273.2023.01.10.13.51.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Jan 2023 13:51:03 -0800 (PST) From: Glenn Washburn To: grub-devel@gnu.org, Daniel Kiper Cc: Robbie Harwood , Peter Jones , Glenn Washburn Subject: [PATCH v6 02/14] gdb: Prevent wrapping when writing to .segments.tmp Date: Tue, 10 Jan 2023 15:50:29 -0600 Message-Id: <20230110215041.1247699-3-development@efficientek.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230110215041.1247699-1-development@efficientek.com> References: <20230110215041.1247699-1-development@efficientek.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2607:f8b0:4864:20::1030; envelope-from=development@efficientek.com; helo=mail-pj1-x1030.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, 10 Jan 2023 21:51:08 -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