Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1pWkqv-0007Oj-Qc for mharc-grub-devel@gnu.org; Mon, 27 Feb 2023 16:16: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 1pWkqv-0007MV-1p for grub-devel@gnu.org; Mon, 27 Feb 2023 16:16:09 -0500 Received: from mail-qt1-x830.google.com ([2607:f8b0:4864:20::830]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWkqq-0000MD-F0 for grub-devel@gnu.org; Mon, 27 Feb 2023 16:16:08 -0500 Received: by mail-qt1-x830.google.com with SMTP id h19so8291625qtk.7 for ; Mon, 27 Feb 2023 13:16:04 -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=fZePNt6Oc3COz0Zhc3qBC4lPqq7SXsTU2NbZ/0gHH2c=; b=NATLCJrxDv6mv5rHbmmJLRQ/12aH7sIXRzHL9HlV64AdhCHtGuMz3ZBx4+eqrH+ucB k/5854Kn5NgFhqVTPKFGO7NASHf6BEu7rXNxKsn2TcdjgUCWjN1tAZPB+yw5oFkBA1Xk C2/Vi/vwp3jSbA2gXAQwiQdGavByzL+T7iCYDn634A25cagnUs3klQnvpYr3TzYa210a OFZU8HkWsBjdyhXVw1mRKN7AzKsy7P1IqKFj5IXNXOHsMmmRrwBlWhVzL0SOLTfw1Vou ESg8hKbCcLVPqX5P+1tsyCtj2s0l39Vm8aRah4t+M0LmK+pzl80tuihpB4ZDfZhzQd+W UP3g== 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=fZePNt6Oc3COz0Zhc3qBC4lPqq7SXsTU2NbZ/0gHH2c=; b=JBAyMLGGBf2P96g40gUHywGmWN3Mwf29R4XJ+WINM/o0KP2p6aTWjWM3WmDoAWi0EB nUiqlh6c/rl6kzZSoN0LO5S0NtPi4xKUsLY1jPYiaFKmfiRLx7a2aDNlb58+q7MAa0k5 1MLlrWfXwUFsNuYNR+Wj9OL+kh3O4HoFzrtoGqH3iKCt90bxljzlTqS7VxXK6Iz5kDLY /QMNrSjMmLVSgNAbGVIV3HOE41Ue+rJCWZZctDCBauHwK1NzImI+JtG38g0M9K5x1MoI Sr0xwEnmG2QXKnlB/8kUxVrVl+33b9lU/HgIr/a2Jtj7F+M1CtUm05BFzUwFFNYky2+k P85g== X-Gm-Message-State: AO0yUKXg2HCT8aWUqS/ShltofdnIhGm4w8932dRoc4VCf4leTi1fHovd KJdkJ2uTar00W5sL536gZc2JVLsa4mRL/GNo X-Google-Smtp-Source: AK7set8MOv3D/Odj8YkJ+oy51OqpIJotvDEVp2cM/5iosSgL/Cg8klVYLncBUaH+e8r/f5AgHbL1cw== X-Received: by 2002:ac8:7dc4:0:b0:3b8:6833:3ad2 with SMTP id c4-20020ac87dc4000000b003b868333ad2mr1161089qte.65.1677532563048; Mon, 27 Feb 2023 13:16:03 -0800 (PST) Received: from localhost.localdomain ([37.218.244.251]) by smtp.gmail.com with ESMTPSA id n76-20020a37404f000000b0071aacb2c76asm5475080qka.132.2023.02.27.13.16.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Feb 2023 13:16:02 -0800 (PST) From: Glenn Washburn To: grub-devel@gnu.org, Daniel Kiper Cc: Glenn Washburn Subject: [PATCH 1/8] gdb: Move runtime module loading into runtime_load_module Date: Mon, 27 Feb 2023 15:15:31 -0600 Message-Id: <3422a876285b60e0a33b8d703dc8c488a4db0c5f.1677532260.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::830; envelope-from=development@efficientek.com; helo=mail-qt1-x830.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: Mon, 27 Feb 2023 21:16:09 -0000 By moving this code into a function, it can be run re-utilized while gdb is running, not just when loading the script. This will also be useful in some following changes which will make a separate script path for targets which statically vs dynamically position GRUB code. Signed-off-by: Glenn Washburn --- grub-core/gdb_grub.in | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/grub-core/gdb_grub.in b/grub-core/gdb_grub.in index fc17e3d899f8..d525a5a11f01 100644 --- a/grub-core/gdb_grub.in +++ b/grub-core/gdb_grub.in @@ -71,16 +71,22 @@ document load_all_modules Load debugging information for all loaded modules. end +define runtime_load_module + break grub_dl_add + commands + silent + load_module mod + cont + end +end +document runtime_load_module + Load module symbols at runtime as they are loaded. +end + ### set confirm off file kernel.exec target remote :1234 -# inform when module is loaded -break grub_dl_add -commands - silent - load_module mod - cont -end +runtime_load_module -- 2.34.1