From: Tom Tromey <tromey@adacore.com>
To: gdb-patches@sourceware.org
Cc: Tom Tromey <tromey@adacore.com>
Subject: [PATCH 08/10] Remove coff_symfile_init
Date: Fri, 16 Jan 2026 12:11:36 -0700 [thread overview]
Message-ID: <20260116-coffread-cleanups-v1-8-4d46090fad69@adacore.com> (raw)
In-Reply-To: <20260116-coffread-cleanups-v1-0-4d46090fad69@adacore.com>
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);
}
\f
-/* 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
next prev parent reply other threads:[~2026-01-16 19:28 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-16 19:11 [PATCH 00/10] More coffread cleanups Tom Tromey
2026-01-16 19:11 ` [PATCH 01/10] Constify coffread.c:getsymname Tom Tromey
2026-01-16 19:11 ` [PATCH 02/10] Clean up a comment in coffread.c Tom Tromey
2026-01-16 19:11 ` [PATCH 03/10] Fix indentation " Tom Tromey
2026-01-17 3:54 ` Simon Marchi
2026-01-20 15:47 ` Tom Tromey
2026-01-16 19:11 ` [PATCH 04/10] Change coffread.c:pe_file to bool Tom Tromey
2026-01-16 19:11 ` [PATCH 05/10] Remove redundant nlist_bfd_global Tom Tromey
2026-01-16 19:11 ` [PATCH 06/10] Use symfile_bfd in more places Tom Tromey
2026-01-17 4:09 ` Simon Marchi
2026-01-17 4:19 ` Simon Marchi
2026-01-17 4:10 ` Simon Marchi
2026-01-16 19:11 ` [PATCH 07/10] Use coffread_objfile throughout coffread.c Tom Tromey
2026-01-16 19:11 ` Tom Tromey [this message]
2026-01-17 4:13 ` [PATCH 08/10] Remove coff_symfile_init Simon Marchi
2026-01-20 15:54 ` Tom Tromey
2026-01-16 19:11 ` [PATCH 09/10] Remove all globals from coffread.c Tom Tromey
2026-01-16 19:11 ` [PATCH 10/10] Change is_import_fixup_symbol to return bool Tom Tromey
2026-01-17 4:20 ` [PATCH 00/10] More coffread cleanups Simon Marchi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260116-coffread-cleanups-v1-8-4d46090fad69@adacore.com \
--to=tromey@adacore.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox