Re: [PATCH 4/8] gdb/xcoffread: remove xcoff_symfile_info::{symtbl, symtbl_num_syms}

Simon Marchi
2026-01-08T21:25:08Z

On 1/8/26 3:36 PM, Tom Tromey wrote:
>>>>>> "Simon" == Simon Marchi <simon.marchi@efficios.com> writes:
>
> Simon> It is not necessary to save the symbol table content and number of
> Simon> symbols in xcoff_symfile_info, because they are only needed for the
> Simon> duration of scan_xcoff_symtab.
>
> Simon> Move the reading of the symbol table content to scan_xcoff_symtab, and
> Simon> keep everything as local variables.
>
> Simon> + /* Seek to symbol table location. */
> Simon> + if (int ret = bfd_seek (abfd, symtab_offset, SEEK_SET);
> Simon> + ret < 0)
> Simon> + error (_("Error reading symbols from %s: %s"),
> Simon> + objfile_name (objfile), bfd_errmsg (bfd_get_error ()));
>
> 'ret' doesn't really seem to be needed here.

What do you mean, not needed? Don't we want to check the return value
of bfd_seek?

Simon