]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
solib_global_lookup: Fetch arch from objfile, not target_gdbarch.
authorDoug Evans <xdje42@gmail.com>
Fri, 7 Nov 2014 01:10:51 +0000 (17:10 -0800)
committerDoug Evans <xdje42@gmail.com>
Fri, 7 Nov 2014 01:10:51 +0000 (17:10 -0800)
gdb/ChangeLog:

* objfiles.c (get_objfile_arch): Constify.
* objfiles.h (get_objfile_arch): Update prototype.
* solib.c (solib_global_lookup): Fetch arch from objfile,
not target_gdbarch.

gdb/ChangeLog
gdb/objfiles.c
gdb/objfiles.h
gdb/solib.c

index a47cec40e450d68e2ea0596d85425268bb197dfc..0ea7d6d7233b1dd53b87e734bad8314bf30b84c6 100644 (file)
@@ -1,3 +1,10 @@
+2014-11-06  Doug Evans  <xdje42@gmail.com>
+
+       * objfiles.c (get_objfile_arch): Constify.
+       * objfiles.h (get_objfile_arch): Update prototype.
+       * solib.c (solib_global_lookup): Fetch arch from objfile,
+       not target_gdbarch.
+
 2014-11-06  Sandra Loosemore  <sandra@codesourcery.com>
 
        * nios2-tdep.c (wild_insn): Delete.
index 2a5c15fcceb502f39c7d73d0d94e2ee1b5847808..38a365ca678c8e48bc92b2427af72096245c9ddd 100644 (file)
@@ -366,8 +366,9 @@ allocate_objfile (bfd *abfd, const char *name, int flags)
 }
 
 /* Retrieve the gdbarch associated with OBJFILE.  */
+
 struct gdbarch *
-get_objfile_arch (struct objfile *objfile)
+get_objfile_arch (const struct objfile *objfile)
 {
   return objfile->per_bfd->gdbarch;
 }
index 46e7ea56c73d01ae4eb40c9ddcac7d87a05deffc..b14aab09dff6d9147b800e3739b32553091ae322 100644 (file)
@@ -465,7 +465,7 @@ struct objfile
 
 extern struct objfile *allocate_objfile (bfd *, const char *name, int);
 
-extern struct gdbarch *get_objfile_arch (struct objfile *);
+extern struct gdbarch *get_objfile_arch (const struct objfile *);
 
 extern int entry_point_address_query (CORE_ADDR *entry_p);
 
index 41250a2ed977144d49c33a264379393fee717010..6260dac7ce7e332442b5f867f0e7e5d1889d8df1 100644 (file)
@@ -1408,7 +1408,7 @@ solib_global_lookup (const struct objfile *objfile,
                     const char *name,
                     const domain_enum domain)
 {
-  const struct target_so_ops *ops = solib_ops (target_gdbarch ());
+  const struct target_so_ops *ops = solib_ops (get_objfile_arch (objfile));
 
   if (ops->lookup_lib_global_symbol != NULL)
     return ops->lookup_lib_global_symbol (objfile, name, domain);