From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1p63IZ-0003Mc-Nd for mharc-grub-devel@gnu.org; Fri, 16 Dec 2022 00:30:19 -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 1p63IY-0003K8-Jw for grub-devel@gnu.org; Fri, 16 Dec 2022 00:30:18 -0500 Received: from mail-pl1-x632.google.com ([2607:f8b0:4864:20::632]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p63IX-0003o7-2Q for grub-devel@gnu.org; Fri, 16 Dec 2022 00:30:18 -0500 Received: by mail-pl1-x632.google.com with SMTP id 4so1281312plj.3 for ; Thu, 15 Dec 2022 21:30:16 -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=aTHZ5jwn+0RHFH4/dk7uWX8F0EF4dPOSIsyuKUfcy4s=; b=ZoMS0Q1Fp6eoignNvltEJyKFy3jHUjeFAirHXCLj9VO0oqZuwNT09AFw3OT6tHErkZ EPZhXcOyOqBxN4YYfwBo5UVuNwS/eP5HxrupY3+0PHrzyYevwal/Dp2BoNENPZ66zcRB ZV+2cpam6+1OtvkmCZJf+0UGHXp5yFY2Aq4+4SM2pe4agsRf7Hczjf0aRB5fFsnI40v6 KPn8vOt8sz5X3RsUpLjSKm+os6aufnU5vHUC1BF+jEJP49j0UKBBvztDboLxlx12Ptyi fLkWgyZdf+2hUtbdfH7DKqCBerM8ipXZpwEAJVTKDxBsZ5uA5uU6yaH+ou8AWEt6/Ha+ Sf3A== 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=aTHZ5jwn+0RHFH4/dk7uWX8F0EF4dPOSIsyuKUfcy4s=; b=RA7VsU0u7NzZBpJzliSXdehPwJpPs7bibPhMWGKB5J69Xstr/qGdA5iw8yK6knUT2Z CCbsUhracTFUfQY319s0db4IBoS1VE4DzhrGgKqtHFiaZxwBwpEKZn7opYKby80Fe5vE Q4aj0dc+aZT/BzoMTg8vuy52wCaoKvNyh8idPPQkrahn0ZDGV8MUTu/mp3Azu9QzjAnz TSqmkZwEHfjncc/te09mbs1gp4SZ4oCuqo3SAgSFcrK1ejK/b1O3IShFaEGYBVFrOENh wngeY2lX6s8OgBL5yIqCt+t2T5IIcRZkQ11uB3ZoI0T6PE/eAu1FNe+EK5YgNCrAh7gZ vPBQ== X-Gm-Message-State: ANoB5pkzA8GE7zY8tTjElHn5Qn9v6BMqdKFYgFHtjUDxw/3msXBboygv hjXQdjqmpNXl3ZMEzRpq5XGqGRcyGxPZLd66 X-Google-Smtp-Source: AA0mqf4OBl0rJz8Z7na8nlRhBtFm1JALhTlhQgm07m7Kezt9TE7o1gfDHccSVhBj5LGca7A93Tv+gA== X-Received: by 2002:a17:902:6b8b:b0:188:a4a3:7bb3 with SMTP id p11-20020a1709026b8b00b00188a4a37bb3mr30654219plk.9.1671168615349; Thu, 15 Dec 2022 21:30:15 -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.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Dec 2022 21:30:14 -0800 (PST) From: Glenn Washburn To: "grub-devel @ gnu . org" , Daniel Kiper Cc: Glenn Washburn Subject: [PATCH v4 03/15] gdb: If no modules have been loaded, do not try to load module symbols Date: Thu, 15 Dec 2022 23:29:26 -0600 Message-Id: <20221216052938.224564-4-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::632; envelope-from=development@efficientek.com; helo=mail-pl1-x632.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:18 -0000 This prevents load_all_modules from failing when called before any modules have been loaded. Failures in GDB user-defined functions cause any function which called them to also fail. Signed-off-by: Glenn Washburn --- grub-core/gdb_grub.in | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/grub-core/gdb_grub.in b/grub-core/gdb_grub.in index edb5a8872c..fc17e3d899 100644 --- a/grub-core/gdb_grub.in +++ b/grub-core/gdb_grub.in @@ -63,7 +63,9 @@ define load_all_modules dump_module_sections $this set $this = $this->next end - match_and_load_symbols + if (grub_dl_head != 0) + match_and_load_symbols + end end document load_all_modules Load debugging information for all loaded modules. -- 2.34.1