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 /gdb/symtab.c | |
parent | 069bb7eced120d5a81fc41f339390719a0063ce3 (diff) | |
download | gdb-efad9b6a7ad68e3e85dd28a12b567f84d6860d17.zip gdb-efad9b6a7ad68e3e85dd28a12b567f84d6860d17.tar.gz 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.
Diffstat (limited to 'gdb/symtab.c')
-rw-r--r-- | gdb/symtab.c | 9 |
1 files changed, 4 insertions, 5 deletions
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; } |