From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id oW7DCkuRammzqgYAWB0awg (envelope-from ) for ; Fri, 16 Jan 2026 14:28:11 -0500 Authentication-Results: simark.ca; dkim=pass (2048-bit key; secure) header.d=adacore.com header.i=@adacore.com header.a=rsa-sha256 header.s=google header.b=McTDCJlr; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 27D891E0DD; Fri, 16 Jan 2026 14:28:11 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-2.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED, RCVD_IN_VALIDITY_RPBL_BLOCKED,RCVD_IN_VALIDITY_SAFE_BLOCKED autolearn=ham autolearn_force=no version=4.0.1 Received: from vm01.sourceware.org (vm01.sourceware.org [38.145.34.32]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 872F11E08D for ; Fri, 16 Jan 2026 14:28:10 -0500 (EST) Received: from vm01.sourceware.org (localhost [127.0.0.1]) by sourceware.org (Postfix) with ESMTP id 93D214BA2E27 for ; Fri, 16 Jan 2026 19:28:09 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 93D214BA2E27 Authentication-Results: sourceware.org; dkim=pass (2048-bit key, secure) header.d=adacore.com header.i=@adacore.com header.a=rsa-sha256 header.s=google header.b=McTDCJlr Received: from mail-ot1-x32b.google.com (mail-ot1-x32b.google.com [IPv6:2607:f8b0:4864:20::32b]) by sourceware.org (Postfix) with ESMTPS id A16E94BA23D8 for ; Fri, 16 Jan 2026 19:11:36 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A16E94BA23D8 Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=adacore.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=adacore.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org A16E94BA23D8 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::32b ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1768590696; cv=none; b=r7bS6bKUA+mluXQU8unrEIh5NllfSIRe/vUTmi70JjmoaRR+YqgoWxCryeXCZSIDoW3/byMqj8+1SnCqrwCh4UH4vNrxRFV22WFmYYGo7FzKzHY+VO3cB4spriXFxKQP2VSnlBdFgMOq8eMhKk6bxbDkSBZIl8yjz0GL6xHl4YE= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1768590696; c=relaxed/simple; bh=K+Ghbp0iCDAwlfBXs9nIFpufiAP2sCvSpECQLnYfWtw=; h=DKIM-Signature:From:Date:Subject:MIME-Version:Message-Id:To; b=nGfNIqJXf9BDYjTet0DMvCmGGDeZhQ0ReOI59l9xlMQO2/BKXkfjwmRWa2d1p4eoOaRhPzkfWp3TfBNRDI9D0NL/V0qcnfNq63whUOXum4vYz8mq6hNPUPcSzv0KLlHnbIZfSTQcsl2jfNsDXapC7JFp447boS0BTQbNXw5mJA0= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A16E94BA23D8 Received: by mail-ot1-x32b.google.com with SMTP id 46e09a7af769-7cfd04f1be8so922963a34.2 for ; Fri, 16 Jan 2026 11:11:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; t=1768590696; x=1769195496; darn=sourceware.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=gAY9EeReNJ/H69EnE6hgZC3apqR+PX+Pd3o9bizXMBs=; b=McTDCJlrSa7AO6zCXCr3J5CTZ9ZgyPfc6T2Ai7AXjiIeNf0ZZz5dKNcDtM7HDfPP6f +Vtif6o4D4kzbZieZv5/Q9cNQsLxJlky05UukibWkTDsfbU3C/g028Bk4A2TY2/bpyPf po0u3q0+bnSYu8pBL7JI3qNvrcLJuaTvIkNMkjhSXHF+mpHY5km+Vjq4HMlxhFbJDlO0 a5+ubx/mShh2MtiXlquqm0BHOcWcnqSOsSjV62Mup7ddebSBJ4YP5n5M/PXlgp/LtXFW lP6QrQCJcBGxD3xyJBHhesvo/KNDmsAgjrrOGfZMiWj5pkklUiOt5pCmetjAwtjIJTCY C5nQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768590696; x=1769195496; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=gAY9EeReNJ/H69EnE6hgZC3apqR+PX+Pd3o9bizXMBs=; b=CWgKnaorbYh6ULj/Ys5ZP8n3AWrAhvUulRGsDRfURNO+BT97k9IDo924oPoeVhpPqQ nNPnMYGTd+BgFZFEVrZ9C0D2mD8n6wFqHCsK1m3ykW25duRigTKnjJa38L8INuDvm+Gb 8yVSfgaxwIzKX4zcLhhGRiuS/jvgUI4jNj6uEEvn5UkgcFSqn6IwMmlDRAHg7NvPtU5f Lbd0lSexkVin9mjWEOpx8bAASOUu+Urpbmp84bm7o1YPdzVYjXqwOwc5oN+PFC8eGksC I29U2kNGjnIeTpTBQXodEkuF2nxk5NDwGU2iIeXjChEGqJ2gmzJ+93/ekAi33q51BtH5 zahA== X-Gm-Message-State: AOJu0YzXLppsXapdKWMLQS6G9qYExEx27FieBUu0VuAJZQcWWBc6bSnh AjZpMoFKybjpaAXDUbHvRrU8zOy8blScYsU1aQE0f15f619GUYaDLFjmH5XLn7XSX+y0e8BLBl3 hKXg= X-Gm-Gg: AY/fxX4PELWWTrPYL4OKdrE30V6qHum1EkfYo++hGgb6kbQ5+rYBXnz5G8WP7HdPoAi R8IuFcZib0jaunZL3cq/lpbsOVXd6COS6zphhlFdCqrGFcGXq/YbywzQ5B3vA1zhygr1MMA0vPY 2z0gsp1EzFbI6BgjTxLu355axJKsGFxd/UVM1fiVZ/VLNB6dY86sVwwyix8xtSWKTstYYE4iY7g tewuSMxY327/C+5RvE4y0A3R/MwTLnjZydEF3Mv1ksngPo7dT4e+i0//nzkqenLcPBx1StOXsDY 7LCQ22XBzLMYD2FCMUX1zOlLPwI7gnUz2b+L+Yn0hAtC2iuahvCsJ+ZRCiye/AiHuvTa/FyXhU5 mYGh1GnuUd9PMVdbbdZ4GUrWu2fwv+1DKDHAA++WLvpbEboqyl6cUw4KwBTFRHqeXxZ0gR4gW1F UKltZ2zuYpPYXXRVNGGInoSL2nyhdc9dWfQjTuJyqREw== X-Received: by 2002:a05:6830:6614:b0:7c7:6063:8e0f with SMTP id 46e09a7af769-7cfe0110c8fmr1441753a34.15.1768590695999; Fri, 16 Jan 2026 11:11:35 -0800 (PST) Received: from [192.168.0.26] (97-122-114-32.hlrn.qwest.net. [97.122.114.32]) by smtp.gmail.com with ESMTPSA id 46e09a7af769-7cfdf0db2c1sm2196681a34.5.2026.01.16.11.11.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Jan 2026 11:11:35 -0800 (PST) From: Tom Tromey Date: Fri, 16 Jan 2026 12:11:36 -0700 Subject: [PATCH 08/10] Remove coff_symfile_init MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20260116-coffread-cleanups-v1-8-4d46090fad69@adacore.com> References: <20260116-coffread-cleanups-v1-0-4d46090fad69@adacore.com> In-Reply-To: <20260116-coffread-cleanups-v1-0-4d46090fad69@adacore.com> To: gdb-patches@sourceware.org Cc: Tom Tromey X-Mailer: b4 0.14.3 X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org coff_symfile_init is an empty function, and rather than give it a name, just use a lambda in coff_sym_fns. I've occasionally considered adding a do_nothing template function for all our empty function needs, but still haven't bothered. --- gdb/coffread.c | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/gdb/coffread.c b/gdb/coffread.c index 67fe6483087..5ea2d940faa 100644 --- a/gdb/coffread.c +++ b/gdb/coffread.c @@ -184,22 +184,6 @@ record_minimal_symbol (minimal_symbol_reader &reader, return reader.record_full (cs->c_name, true, address, type, section); } -/* coff_symfile_init () - is the coff-specific initialization routine for reading symbols. - It is passed a struct objfile which contains, among other things, - the BFD for the file whose symbols are being read, and a slot for - a pointer to "private data" which we fill with cookies and other - treats for coff_symfile_read (). - - We will only be called if this is a COFF or COFF-like file. BFD - handles figuring out the format of the file, and code in symtab.c - uses BFD's determination to vector to us. */ - -static void -coff_symfile_init (struct objfile *objfile) -{ -} - /* A helper function for coff_symfile_read that reads minimal symbols. It may also read other forms of symbol as well. */ @@ -643,7 +627,7 @@ getsymname (struct internal_syment *symbol_entry) static const struct sym_fns coff_sym_fns = { - coff_symfile_init, /* sym_init: read initial info, setup + [] (objfile *) { }, /* sym_init: read initial info, setup for sym_read() */ coff_symfile_read, /* sym_read: read a symbol file into symtab */ -- 2.52.0