From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1p5iN8-0007Rf-0J for mharc-grub-devel@gnu.org; Thu, 15 Dec 2022 02:09:38 -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 1p5iN6-0007Qz-7V for grub-devel@gnu.org; Thu, 15 Dec 2022 02:09:36 -0500 Received: from mail-qt1-x833.google.com ([2607:f8b0:4864:20::833]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p5iN4-00082F-P4 for grub-devel@gnu.org; Thu, 15 Dec 2022 02:09:36 -0500 Received: by mail-qt1-x833.google.com with SMTP id cg5so4465818qtb.12 for ; Wed, 14 Dec 2022 23:09:34 -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=tLGvCuQ/MtKQIMPO+btPgNEw7CWQKUkU05YIvYaD31c=; b=aV/K/h3W3fv0OGRFuBG8bCwJnNnhV/hOVMDWTsX+SIRUfPzo5x4GkVH7dLb2386S2R L9+qiQXbptgLcXTv1mdImmUlRm4WSdF24mrKv8FULbr6ZeZ9rejZYb48V+h50wlmPoKA jkKfTXoLz0SkfEIZUNN09lcdQCaFGNZbtPsPPSfEFpL1JXjEOLLPd2yOa0Bg3jWE/w2X dfhWhgFfPAiQxWkX6zZDGoR16SlJborzIwyZyO3gIDGl60KzQ4ppmfgbH2IM9G/Qfeyt H2CRpp6umUR9HsNR4gh4R59cdzEyzCql3dt/u9VcDJHEtej1u3xtc32Am2d+9qo3lbyE cf8g== 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=tLGvCuQ/MtKQIMPO+btPgNEw7CWQKUkU05YIvYaD31c=; b=VAY/NqBS0U7l+AjaNYXfldBAsEpXtN824GQ4wY6WdhHm1zXfq2RIS3kflKzo95jMtQ ldVNXWT7UxhLi1WiHln7WLPog7tkuUgQsAQYb7uS4pGNnqb8s56uzk+kSWLw+u7sr3It a8RmLikMgHXZwyFoAkAtbS/pzkI9JhBTdf+1vXRW0uJTrYcrmK0yDU5yMCJEmwol2CPM o31gVXECav52lnkHz1xcjcnYT0A2DX/Z1EkeQPXmQ5DWeIgBT6OUXke0/zfR0nTtksgx ELunIUYfh3w0YaqfgWu43lttHbM+fyiNMuxt/UIjtFB/fflMlaT+GXwP0VGecVj+HSbd hWPQ== X-Gm-Message-State: ANoB5pnk+ItadfRrc0/L1pwOoTF9KVRk2QONK9/Q0KAQJjWOfxXKKjD0 cxuSkYPRcgHRIuTZla0kSi5EVYPogaUzaypG X-Google-Smtp-Source: AA0mqf7nBZqNap9Nw53xbiRCl1AkmYZTqr4goFRKnSE+fyC4DYR7+ESp5qPgtO5S4kZ4wIQv+aP4LA== X-Received: by 2002:ac8:4646:0:b0:3a8:1ca1:b489 with SMTP id f6-20020ac84646000000b003a81ca1b489mr18635585qto.60.1671088173441; Wed, 14 Dec 2022 23:09:33 -0800 (PST) Received: from crass-HP-ZBook-15-G2.lan ([37.218.244.251]) by smtp.gmail.com with ESMTPSA id fy16-20020a05622a5a1000b003a7ec97c882sm3125068qtb.6.2022.12.14.23.09.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Dec 2022 23:09:32 -0800 (PST) From: Glenn Washburn To: grub-devel@gnu.org, Daniel Kiper Cc: Glenn Washburn Subject: [PATCH v3 02/15] gdb: Prevent wrapping when writing to .segments.tmp Date: Thu, 15 Dec 2022 01:07:37 -0600 Message-Id: <20221215070750.102591-3-development@efficientek.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221215070750.102591-1-development@efficientek.com> References: <20221215070750.102591-1-development@efficientek.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2607:f8b0:4864:20::833; envelope-from=development@efficientek.com; helo=mail-qt1-x833.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: Thu, 15 Dec 2022 07:09:36 -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 bdf743f0d4..083731408a 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