This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: PATCH: Fix PR 1171
On Thu, May 15, 2003 at 12:34:55AM -0700, Mark Mitchell wrote:
>
> This patch fixes GDB PR 1171 by removing the SECT_OFF_MAX and
> MAX_SECTIONS constants; instead, of using these fixed constants the
> number of section entries is computed dynamically.
>
> Tested on i686-pc-linux-gnu (by running the DejaGNU testsuite) and on
> sparc-sun-solaris2.9 (by running the test program from the PR).
>
> Comments?
I can't approve this patch, but I want to say that the approach
certainly looks right to me and I don't see any problems with it. One
of the symtab maintainers will have to approve it.
> 2003-05-15 Mark Mitchell <mark@codesourcery.com>
>
> * elfread.c (elf_symtab_read): Avoid use of SECT_OFF_MAX.
> (elfstab_offset_sections): Likewise.
> * gdb-stabs.h (stab_section_info): Likewise.
> * i386-interix-tdep.c (pei_adjust_objfile_offsets): Likewise.
> * objfiles.c (objfile_relocate): Likewise.
> * pa64solib.c (pa64_solib_add_solib_objfile): Likewise.
> * remote.c (get_offsets): Likewise.
> (remote_cisco_objfile_relocate): Likewise.
> * somread.c (som_symfile_offsets): Likewise.
> * symfile.c (alloc_section_addr_info): New function.
> (build_section_addr_info_from_section_tab): Use it.
> (free_section_addr_info): Adjust.
> (default_symfile_offsets): Avoid use of SECT_OFF_MAX.
> (syms_from_objfile): Allocate local_addr dynamically.
> (symbol_file_add_with_addrs_or_offsets): Allocate orig_addrs
> dynamically.
> (add_symbol_file_command): Allocate sect_opts dynamically.
> (reread_symbols): Avoid use of SECT_OFF_MAX.
> * symfile.h (section_addr_info): Do not use MAX_SECTIONS.
> (alloc_section_addr_info): Declare it.
> * symtab.h (SIZEOF_SECTION_OFFSETS): Remove.
> * win32-nat.c (solib_symbols_add): Allocate section_addrs
> dynamically.
> * xcoffread.c (xcoff_symfile_offsets): Avoid use of SECT_OFF_MAX.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer