From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1p5iN9-0007S8-Qt for mharc-grub-devel@gnu.org; Thu, 15 Dec 2022 02:09:39 -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 1p5iN8-0007Ry-L8 for grub-devel@gnu.org; Thu, 15 Dec 2022 02:09:38 -0500 Received: from mail-qt1-x82d.google.com ([2607:f8b0:4864:20::82d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p5iN7-00082T-9U for grub-devel@gnu.org; Thu, 15 Dec 2022 02:09:38 -0500 Received: by mail-qt1-x82d.google.com with SMTP id x11so4464211qtv.13 for ; Wed, 14 Dec 2022 23:09:36 -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=X0haeoCZZDTP1AGnQfFIQPsI2gYAC+KyJfhe0F2jnbc=; b=qnVI8Afq1XDNPGryntKtCFiGlrI7qFkNQXa6HwBCIQIY0XIrc+gPwn2CG3CAWJhJgj U+UuvA+lqYSAYjIwn3xjPJBCkp1tBIW2fibupNwJlrABy2FEUcS/9NOGyaDTG4SIVzbB he4mHugnGtqWRxg2d86G20tf4toyE8zKi1lgJtvNLaFb20PcZp/klBB6d/H1LeiUbljg lM5p6jyrtQeUlsjatZMj1ATal6evVzPsC2FVSCvqmRfyhPvlBz4q9iYJe8c7G/Q1jREF F4LTdU9PywlrElmegf3CRTPl+IoHEeWfYtwI4NcbpMsBVGUsbu8wplhVvz6hxoFy73Ik M8KQ== 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=X0haeoCZZDTP1AGnQfFIQPsI2gYAC+KyJfhe0F2jnbc=; b=Zr8q7pHC5Za1csZwswqjIyaa57lexxCqFtMt+xHryUfpGQ2Z0Kf5+L9pOaCfSpaN6c zflEkpE4atOdypVav7RN8FWGqXV2YReiAslCtfF6idSd45wuaTzQaHtO9SoWZ7xP8hQ8 w+RYtMStWn5KM0CtNVDIoHz8aAPDtaBE8lBfPj4/jWoyvBKGsFVyPu9lK+f2BAO7chqN rYGqKelVd2WAzlrtW4vNIEmVdiOlby33e7FKDSoIxeogmnz5Qssb/ETwNvlPEz+ZteE+ /Ow9zbxrwO12Uxgc05CaoX/jedfh9J+sYxiHwDzxrzquFZNRnQ72t10oOfYW3l05H1Zq bcTQ== X-Gm-Message-State: ANoB5pmcvDMLA+rMD4x7IoSPx+OelQL04JNfqbkZ75ZlXnZ4Kww2/Sce Q12nCWIvX4Jt3wh6U2/snq1qsZnl5bvPrcrE X-Google-Smtp-Source: AA0mqf497aSAYS+6vX03bB2VrhncFAQM06OgxNWAyJ6Ixm/iou6aH5ucfrUSTzeXRCHhw2HS2oPBdw== X-Received: by 2002:a05:622a:148:b0:3a8:1ac5:47bd with SMTP id v8-20020a05622a014800b003a81ac547bdmr23841960qtw.32.1671088175856; Wed, 14 Dec 2022 23:09:35 -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.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Dec 2022 23:09:35 -0800 (PST) From: Glenn Washburn To: grub-devel@gnu.org, Daniel Kiper Cc: Glenn Washburn Subject: [PATCH v3 03/15] gdb: If no modules have been loaded, do not try to load module symbols Date: Thu, 15 Dec 2022 01:07:38 -0600 Message-Id: <20221215070750.102591-4-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::82d; envelope-from=development@efficientek.com; helo=mail-qt1-x82d.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:38 -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 083731408a..77491816f4 100644 --- a/grub-core/gdb_grub.in +++ b/grub-core/gdb_grub.in @@ -62,7 +62,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