From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1pFMWY-0004eH-Qe for mharc-grub-devel@gnu.org; Tue, 10 Jan 2023 16:51:14 -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 1pFMWW-0004dn-QV for grub-devel@gnu.org; Tue, 10 Jan 2023 16:51:12 -0500 Received: from mail-pl1-x634.google.com ([2607:f8b0:4864:20::634]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pFMWV-0002KW-7e for grub-devel@gnu.org; Tue, 10 Jan 2023 16:51:12 -0500 Received: by mail-pl1-x634.google.com with SMTP id 17so14699553pll.0 for ; Tue, 10 Jan 2023 13:51:10 -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=fwDzlPRo8lmdVS4F1jYDFg6sBPyOqynWQOsIW+zYeCA=; b=muWNpCq4wLB+tfFRumKtFzC54WJjN57O+87Zlpoc1IxsKnbN/LZZpRWkNrlo+/XQw2 IqU4y4xtkn8NJWdG/tsSx5CuROkODCbbm5KcA0Y/KB0KJlg2+sVe6GSX/Fm0J4pfxO2y s5MIh6yJRMg99R5Mnag8/ByhGaGsAxjMmWYIqdgZZ87I7EBEzYqV7u/c7hShfB7A1WK6 IkTkaTym267nXpAhQPiqQin/4b1+lNqIk1w2KMJGEmZ5uTgvhqCy54u6awHP3a04JD8O 0th3A4NERVkwMIxbbnqI2G3lzBWEXU982E1raDCAM8Z/R9tOdfzRB3p7R9eW/OjwOwqe OuYA== 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=fwDzlPRo8lmdVS4F1jYDFg6sBPyOqynWQOsIW+zYeCA=; b=gTMvDFy33VPmx/wNBQWlkt76weL5iOsQgOhGIbMICGDiwgWekxgLqQ2PgdWZNcvPQz xnrLcI9Xkj1irMlkmS8VRupi1el5Z083+puOodeAW74Cpavd0NFQrdmtaL1Oh35CQUL6 1O4Xap8XByUKUkU9LjN3h/ze22FzRIeW0IuVQTaqE77r97EwVCXPPwdBhElAQHdqigOe hTdR06kpMlaZm5T4cE7i7p4YVWsjZM/m4ZkTMqgPa907VtqXO130zoZIirI+IyxH88v8 a6X2Ycyi5JiAp5vqD5xJuNQDl4Jy/CaICzHKmabWXY26SlPjhGkUZWYFw4p+l7V9VWkE 4mFQ== X-Gm-Message-State: AFqh2kqytOT36jgINeUZd0MZugDw4M+evvHnShGpDkxlHtRPuNRx9Klo 1DSzAS3SedqFzLbYM3uuqErZX/iKA7jxAzNM X-Google-Smtp-Source: AMrXdXvVXFEvNQNlElkjubsHlAYKQfbQ2pvW7+GmLVoQXZwqzn6AbDzgVt3N4csCJG1NKSitmVDcyA== X-Received: by 2002:a05:6a20:4d9e:b0:af:91a1:94a0 with SMTP id gj30-20020a056a204d9e00b000af91a194a0mr70051552pzb.32.1673387470080; Tue, 10 Jan 2023 13:51:10 -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.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Jan 2023 13:51:09 -0800 (PST) From: Glenn Washburn To: grub-devel@gnu.org, Daniel Kiper Cc: Robbie Harwood , Peter Jones , Glenn Washburn Subject: [PATCH v6 04/14] gdb: Move runtime module loading into runtime_load_module Date: Tue, 10 Jan 2023 15:50:31 -0600 Message-Id: <20230110215041.1247699-5-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::634; envelope-from=development@efficientek.com; helo=mail-pl1-x634.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:13 -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 fc17e3d899..d525a5a11f 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