diff options
author | Jan Kratochvil <jan.kratochvil@redhat.com> | 2014-12-05 19:11:53 +0100 |
---|---|---|
committer | Jan Kratochvil <jan.kratochvil@redhat.com> | 2014-12-05 19:11:53 +0100 |
commit | efad9b6a7ad68e3e85dd28a12b567f84d6860d17 (patch) | |
tree | f6dcbee9088c0ad22871ae7df728318ac4f27106 | |
parent | 069bb7eced120d5a81fc41f339390719a0063ce3 (diff) | |
download | fsf-binutils-gdb-efad9b6a7ad68e3e85dd28a12b567f84d6860d17.zip fsf-binutils-gdb-efad9b6a7ad68e3e85dd28a12b567f84d6860d17.tar.gz fsf-binutils-gdb-efad9b6a7ad68e3e85dd28a12b567f84d6860d17.tar.bz2 |
Remove const from many struct objfile *
I am just not sure if we should go the route of
struct objfile * -> const struct objfile *
or the other way of:
const struct objfile * -> struct objfile *
Normally const adding is better but here I do not see much useful to have any
struct objfile * const and then it just causes pointer compatibility problems.
On Wed, 03 Dec 2014 18:18:44 +0100, Doug Evans wrote:
struct objfile is one case where I've decided to just leave the const
out and not worry about it.
gdb/ChangeLog
2014-12-05 Jan Kratochvil <jan.kratochvil@redhat.com>
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.
-rw-r--r-- | gdb/ChangeLog | 6 | ||||
-rw-r--r-- | gdb/solib-darwin.c | 2 | ||||
-rw-r--r-- | gdb/solib-spu.c | 2 | ||||
-rw-r--r-- | gdb/solib-svr4.c | 2 | ||||
-rw-r--r-- | gdb/solib.c | 2 | ||||
-rw-r--r-- | gdb/solist.h | 4 | ||||
-rw-r--r-- | gdb/symtab.c | 9 | ||||
-rw-r--r-- | gdb/symtab.h | 2 |
8 files changed, 17 insertions, 12 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index f58c9a7..b010c81 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2014-12-05 Jan Kratochvil <jan.kratochvil@redhat.com> + + 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. + 2014-12-05 Andreas From <andreas.from@ericsson.com> * MAINTAINERS (Write After Approval): Add "Andreas From" 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 d8d8e23..c697b1b 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); |