From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1p63Im-0003ZH-PX for mharc-grub-devel@gnu.org; Fri, 16 Dec 2022 00:30:33 -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 1p63Ij-0003WG-0b for grub-devel@gnu.org; Fri, 16 Dec 2022 00:30:29 -0500 Received: from mail-pj1-x1033.google.com ([2607:f8b0:4864:20::1033]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p63Ih-00040o-D0 for grub-devel@gnu.org; Fri, 16 Dec 2022 00:30:28 -0500 Received: by mail-pj1-x1033.google.com with SMTP id t17so1399608pjo.3 for ; Thu, 15 Dec 2022 21:30:26 -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=MEwGrYfTZIM6Rn28qFSNYZsu69NsygWMQ26kpbJZRR0=; b=M5CCC9/Rc3anSXpzHYtOb3D+8liRHQc7hM8rTro0rUwNlKj9O8gCDDo1PaPndhOJKW j+UBMIQlS9VrTH3SRjgqwzYArLeLV0Mk/lFOpW6dAKm+lN8nVj42dNOs+/T1LBLaGoi3 LSuI/DHXK6GL1bCIP16YQodgzVCLBsGj/mMrNiRKckN74NxdcfKiUj7hrSn6Vi2U7/Zd Vpw+uiZ1RaCkeBnAEYqs+nUFowYPfBI1HSID8bq+kjBCgYbCEM5j98luBgr3S0q+NHga KMRp0Ffsot+U83oZmjYIFKIAMNClMjsXhbdrp4DWxHycIpzJSlNyZm1bAqDfqEgBRwTq zrYA== 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=MEwGrYfTZIM6Rn28qFSNYZsu69NsygWMQ26kpbJZRR0=; b=hnmta87qf0TTyeNkzU4tx1Ee6lXfTdmF33EFG3XKvvkYsMEMLMMhn30yymcBoE0PKg MlbGAILLxGBFKhKHhfsqMBrUAImNuDK4atJDQZqx4eSlkMUNEwu3EadybcD7XxomB96n jis/c8IH0U7uf6dT2N1ooNYPAZGIBLoc7PN+zkvXEPYuWz+ayQRCge2lzXG8cHyZXr7c Zw9temLEYowBYt45n0fqaDdL67H40aUFzoO6ILAtIj+WMn44Y+z38lMaTyd3I7UVXzxz R8Td7Is9DJLDqeZcAf4aY3WNWgJ/WXx/JOw0yXjEx1VmuSok3kBqTP3sWSfa+vTeRMQh byiA== X-Gm-Message-State: ANoB5pnNDZLwiDdaE2HRvLIgyZmSD7Cc2gXVjq08Nq2B7Pf02wRcvTue qQXEs1gnN/RcE1hN3KDfp3ShqUJMzKiuqUdD X-Google-Smtp-Source: AA0mqf73T/bR867MtktFPHqZf6M0oI9p+HxnRRfaHsFKQ2RcVcPUkorTmjZJjhc0t06E6Qd7hhKFGg== X-Received: by 2002:a17:902:cf4b:b0:189:e91b:c18 with SMTP id e11-20020a170902cf4b00b00189e91b0c18mr32552181plg.32.1671168625342; Thu, 15 Dec 2022 21:30:25 -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.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Dec 2022 21:30:24 -0800 (PST) From: Glenn Washburn To: "grub-devel @ gnu . org" , Daniel Kiper Cc: Glenn Washburn Subject: [PATCH v4 05/15] gdb: Reliably load modules in runtime_load_module Date: Thu, 15 Dec 2022 23:29:28 -0600 Message-Id: <20221216052938.224564-6-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::1033; envelope-from=development@efficientek.com; helo=mail-pj1-x1033.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:29 -0000 For an unknown reason, GDB has been observed to not hit the grub_dl_add() software breakpoint in QEMU. When it does, its been observed to stop before the stack frame is setup causing values of passed arguments to be garbage. So instead, use a hardware break point on grub_dl_add(), which has not shown these issues. Signed-off-by: Glenn Washburn --- grub-core/gdb_grub.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/grub-core/gdb_grub.in b/grub-core/gdb_grub.in index d525a5a11f..1fb9603ff8 100644 --- a/grub-core/gdb_grub.in +++ b/grub-core/gdb_grub.in @@ -72,7 +72,7 @@ document load_all_modules end define runtime_load_module - break grub_dl_add + hbreak grub_dl_add commands silent load_module mod -- 2.34.1