From patchwork Wed Dec 3 17:07:09 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Kratochvil X-Patchwork-Id: 4058 Received: (qmail 10790 invoked by alias); 3 Dec 2014 17:07:16 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 10771 invoked by uid 89); 3 Dec 2014 17:07:15 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.5 required=5.0 tests=AWL, BAYES_00, SPF_HELO_PASS, SPF_PASS, T_RP_MATCHES_RCVD, UNWANTED_LANGUAGE_BODY autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Wed, 03 Dec 2014 17:07:14 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id sB3H7C64011570 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Wed, 3 Dec 2014 12:07:13 -0500 Received: from host2.jankratochvil.net (ovpn-116-31.ams2.redhat.com [10.36.116.31]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id sB3H79ZT002165 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=NO) for ; Wed, 3 Dec 2014 12:07:11 -0500 Date: Wed, 3 Dec 2014 18:07:09 +0100 From: Jan Kratochvil To: gdb-patches@sourceware.org Subject: [patch +noconst 1/2] Remove const to many struct objfile * Message-ID: <20141203170709.GD25020@host2.jankratochvil.net> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.23 (2014-03-12) X-IsSubscribed: yes 2014-12-03 Jan Kratochvil Remove const from struct objfile *. * solib-darwin.c, solib-spu.c, solib-svr4.c, solib.c, solist.h, symtab.c, symtab.h: In these files. diff --git a/gdb/solib-darwin.c b/gdb/solib-darwin.c index 4a25056..e9bbb77 100644 --- a/gdb/solib-darwin.c +++ b/gdb/solib-darwin.c @@ -570,7 +570,7 @@ darwin_relocate_section_addresses (struct so_list *so, } static struct symbol * -darwin_lookup_lib_symbol (const struct objfile *objfile, +darwin_lookup_lib_symbol (struct objfile *objfile, const char *name, const domain_enum domain) { diff --git a/gdb/solib-spu.c b/gdb/solib-spu.c index b497143..cc1c63a 100644 --- a/gdb/solib-spu.c +++ b/gdb/solib-spu.c @@ -389,7 +389,7 @@ spu_bfd_open (char *pathname) /* Lookup global symbol in a SPE executable. */ static struct symbol * -spu_lookup_lib_symbol (const struct objfile *objfile, +spu_lookup_lib_symbol (struct objfile *objfile, const char *name, const domain_enum domain) { diff --git a/gdb/solib-svr4.c b/gdb/solib-svr4.c index 5313bf0..953c0d0 100644 --- a/gdb/solib-svr4.c +++ b/gdb/solib-svr4.c @@ -3195,7 +3195,7 @@ struct target_so_ops svr4_so_ops; the main executable. */ static struct symbol * -elf_lookup_lib_symbol (const struct objfile *objfile, +elf_lookup_lib_symbol (struct objfile *objfile, const char *name, const domain_enum domain) { diff --git a/gdb/solib.c b/gdb/solib.c index 6260dac..ce9dc05 100644 --- a/gdb/solib.c +++ b/gdb/solib.c @@ -1404,7 +1404,7 @@ show_auto_solib_add (struct ui_file *file, int from_tty, the library-specific handler if it is installed for the current target. */ struct symbol * -solib_global_lookup (const struct objfile *objfile, +solib_global_lookup (struct objfile *objfile, const char *name, const domain_enum domain) { diff --git a/gdb/solist.h b/gdb/solist.h index ac1b1a7..b47ff51 100644 --- a/gdb/solist.h +++ b/gdb/solist.h @@ -137,7 +137,7 @@ struct target_so_ops unsigned o_flags, char **temp_pathname); /* Hook for looking up global symbols in a library-specific way. */ - struct symbol * (*lookup_lib_global_symbol) (const struct objfile *objfile, + struct symbol * (*lookup_lib_global_symbol) (struct objfile *objfile, const char *name, const domain_enum domain); @@ -189,7 +189,7 @@ extern bfd *solib_bfd_open (char *in_pathname); extern struct target_so_ops *current_target_so_ops; /* Handler for library-specific global symbol lookup in solib.c. */ -struct symbol *solib_global_lookup (const struct objfile *objfile, +struct symbol *solib_global_lookup (struct objfile *objfile, const char *name, const domain_enum domain); diff --git a/gdb/symtab.c b/gdb/symtab.c index a52f7c0..6d50ebe 100644 --- a/gdb/symtab.c +++ b/gdb/symtab.c @@ -1536,11 +1536,11 @@ lookup_symbol_in_block (const char *name, const struct block *block, /* See symtab.h. */ struct symbol * -lookup_global_symbol_from_objfile (const struct objfile *main_objfile, +lookup_global_symbol_from_objfile (struct objfile *main_objfile, const char *name, const domain_enum domain) { - const struct objfile *objfile; + struct objfile *objfile; for (objfile = main_objfile; objfile; @@ -1561,12 +1561,11 @@ lookup_global_symbol_from_objfile (const struct objfile *main_objfile, if (sym) { block_found = block; - return fixup_symbol_section (sym, (struct objfile *)objfile); + return fixup_symbol_section (sym, objfile); } } - sym = lookup_symbol_via_quick_fns ((struct objfile *) objfile, - GLOBAL_BLOCK, name, domain); + sym = lookup_symbol_via_quick_fns (objfile, GLOBAL_BLOCK, name, domain); if (sym) return sym; } diff --git a/gdb/symtab.h b/gdb/symtab.h index 57d234d..3051530 100644 --- a/gdb/symtab.h +++ b/gdb/symtab.h @@ -1475,7 +1475,7 @@ extern enum language main_language (void); if necessary. */ extern struct symbol * - lookup_global_symbol_from_objfile (const struct objfile *main_objfile, + lookup_global_symbol_from_objfile (struct objfile *main_objfile, const char *name, const domain_enum domain);