This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch] constify symfile.h section_offsets, section_addr_info
- From: Doug Evans <dje at google dot com>
- To: Tom Tromey <tromey at redhat dot com>
- Cc: gdb-patches <gdb-patches at sourceware dot org>
- Date: Mon, 6 May 2013 12:40:02 -0700
- Subject: Re: [patch] constify symfile.h section_offsets, section_addr_info
- References: <yjt2sj20capi dot fsf at ruffy2 dot mtv dot corp dot google dot com> <87d2t4ymxl dot fsf at fleche dot redhat dot com> <CADPb22SA2EbnC73gttgUS4jP7R2-9BkkZR4AESFNXQDC0hVQKg at mail dot gmail dot com> <87ehdjyk4x dot fsf at fleche dot redhat dot com>
enable-targets=all to the rescue
I actually had that on my todo list. Blech.
Thanks.
On Mon, May 6, 2013 at 12:37 PM, Tom Tromey <tromey@redhat.com> wrote:
>>>>>> "Doug" == Doug Evans <dje@google.com> writes:
>
> Doug> With that, committed.
> Doug> Thanks!
>
> I needed this as well.
> I'm checking it in.
>
> Tom
>
> 2013-05-06 Tom Tromey <tromey@redhat.com>
>
> * somread.c (som_symfile_offsets): Add 'const' to addrs.
> * machoread.c (macho_symfile_offsets): Add 'const' to addrs.
> * xcoffread.c (xcoff_symfile_offsets): Add 'const' to addrs.
> Remove declaration.
>
> Index: machoread.c
> ===================================================================
> RCS file: /cvs/src/src/gdb/machoread.c,v
> retrieving revision 1.50
> diff -u -r1.50 machoread.c
> --- machoread.c 8 Apr 2013 20:13:21 -0000 1.50
> +++ machoread.c 6 May 2013 19:36:41 -0000
> @@ -968,7 +968,7 @@
>
> static void
> macho_symfile_offsets (struct objfile *objfile,
> - struct section_addr_info *addrs)
> + const struct section_addr_info *addrs)
> {
> unsigned int i;
> unsigned int num_sections;
> Index: somread.c
> ===================================================================
> RCS file: /cvs/src/src/gdb/somread.c,v
> retrieving revision 1.61
> diff -u -r1.61 somread.c
> --- somread.c 8 Apr 2013 20:13:22 -0000 1.61
> +++ somread.c 6 May 2013 19:36:41 -0000
> @@ -487,7 +487,8 @@
> Plain and simple for now. */
>
> static void
> -som_symfile_offsets (struct objfile *objfile, struct section_addr_info *addrs)
> +som_symfile_offsets (struct objfile *objfile,
> + const struct section_addr_info *addrs)
> {
> int i;
> CORE_ADDR text_addr;
> Index: xcoffread.c
> ===================================================================
> RCS file: /cvs/src/src/gdb/xcoffread.c,v
> retrieving revision 1.113
> diff -u -r1.113 xcoffread.c
> --- xcoffread.c 6 May 2013 14:15:50 -0000 1.113
> +++ xcoffread.c 6 May 2013 19:36:41 -0000
> @@ -220,9 +220,6 @@
>
> static void xcoff_symfile_finish (struct objfile *);
>
> -static void xcoff_symfile_offsets (struct objfile *,
> - struct section_addr_info *addrs);
> -
> static char *coff_getfilename (union internal_auxent *, struct objfile *);
>
> static void read_symbol (struct internal_syment *, int);
> @@ -3038,7 +3035,7 @@
>
> static void
> xcoff_symfile_offsets (struct objfile *objfile,
> - struct section_addr_info *addrs)
> + const struct section_addr_info *addrs)
> {
> const char *first_section_name;
>