From: Simon Marchi <simon.marchi@efficios.com>
To: gdb-patches@sourceware.org
Cc: Simon Marchi <simon.marchi@efficios.com>
Subject: [PATCH 3/8] gdb/xcoffread: remove XCOFF_DATA macro
Date: Thu, 8 Jan 2026 14:33:21 -0500 [thread overview]
Message-ID: <20260108193507.553779-4-simon.marchi@efficios.com> (raw)
In-Reply-To: <20260108193507.553779-1-simon.marchi@efficios.com>
Change-Id: I3e2c681689f8386805041c9f007d399df545f6cd
---
gdb/xcoffread.c | 15 +++++----------
1 file changed, 5 insertions(+), 10 deletions(-)
diff --git a/gdb/xcoffread.c b/gdb/xcoffread.c
index 43d3cec2e49b..052bd6b78b28 100644
--- a/gdb/xcoffread.c
+++ b/gdb/xcoffread.c
@@ -52,11 +52,6 @@ struct xcoff_symfile_info
static const registry<objfile>::key<xcoff_symfile_info> xcoff_objfile_data_key;
-/* Convenience macro to access the per-objfile XCOFF data. */
-
-#define XCOFF_DATA(objfile) \
- xcoff_objfile_data_key.get (objfile)
-
/* XCOFF names for dwarf sections. There is no compressed sections. */
static const struct dwarf2_debug_sections dwarf2_xcoff_names = {
@@ -173,8 +168,8 @@ scan_xcoff_symtab (struct objfile *objfile)
abfd = objfile->obfd.get ();
- sraw_symbol = XCOFF_DATA (objfile)->symtbl;
- nsyms = XCOFF_DATA (objfile)->symtbl_num_syms;
+ sraw_symbol = xcoff_objfile_data_key.get (objfile)->symtbl;
+ nsyms = xcoff_objfile_data_key.get (objfile)->symtbl_num_syms;
ssymnum = 0;
while (ssymnum < nsyms)
{
@@ -257,7 +252,7 @@ scan_xcoff_symtab (struct objfile *objfile)
Another place to obtain this information would be file auxiliary
header. */
- XCOFF_DATA (objfile)->toc_offset = toc_offset;
+ xcoff_objfile_data_key.get (objfile)->toc_offset = toc_offset;
}
/* Return the toc offset value for a given objfile. */
@@ -266,7 +261,7 @@ CORE_ADDR
xcoff_get_toc_offset (struct objfile *objfile)
{
if (objfile)
- return XCOFF_DATA (objfile)->toc_offset;
+ return xcoff_objfile_data_key.get (objfile)->toc_offset;
return 0;
}
@@ -290,7 +285,7 @@ xcoff_initial_scan (struct objfile *objfile, symfile_add_flags symfile_flags)
const char *name;
unsigned int size;
- info = XCOFF_DATA (objfile);
+ info = xcoff_objfile_data_key.get (objfile);
abfd = objfile->obfd.get ();
name = objfile_name (objfile);
--
2.52.0
next prev parent reply other threads:[~2026-01-08 19:35 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-08 19:33 [PATCH 0/8] More xcoffread cleanups Simon Marchi
2026-01-08 19:33 ` [PATCH 1/8] gdb/xcoffread: remove name computation Simon Marchi
2026-01-08 20:32 ` Tom Tromey
2026-01-08 19:33 ` [PATCH 2/8] gdb/xcoffread: remove read of .debug section Simon Marchi
2026-01-08 20:32 ` Tom Tromey
2026-01-08 19:33 ` Simon Marchi [this message]
2026-01-08 20:34 ` [PATCH 3/8] gdb/xcoffread: remove XCOFF_DATA macro Tom Tromey
2026-01-08 19:33 ` [PATCH 4/8] gdb/xcoffread: remove xcoff_symfile_info::{symtbl, symtbl_num_syms} Simon Marchi
2026-01-08 20:36 ` Tom Tromey
2026-01-08 21:24 ` Simon Marchi
2026-01-08 22:17 ` Tom Tromey
2026-01-09 2:05 ` Simon Marchi
2026-01-08 19:33 ` [PATCH 5/8] gdb/xcoffread: allocate symbol table using vector in scan_xcoff_symtab Simon Marchi
2026-01-08 20:37 ` Tom Tromey
2026-01-08 19:33 ` [PATCH 6/8] gdb/xcoffread: simplify xcoff_secnum_to_sections Simon Marchi
2026-01-08 20:39 ` Tom Tromey
2026-01-08 19:33 ` [PATCH 7/8] gdb/xcoffread: replace 2 switches with if Simon Marchi
2026-01-08 20:40 ` Tom Tromey
2026-01-08 19:33 ` [PATCH 8/8] gdb/xcoffread: stylistic cleanup Simon Marchi
2026-01-08 20:41 ` Tom Tromey
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=20260108193507.553779-4-simon.marchi@efficios.com \
--to=simon.marchi@efficios.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