aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorDoug Evans <xdje42@gmail.com>2014-11-06 17:10:51 -0800
committerDoug Evans <xdje42@gmail.com>2014-11-06 17:10:51 -0800
commit9c1877ead06db18e19614a598d1e280acb97e971 (patch)
tree838fc858f32a48f925a880458c69aa26da686696 /gdb
parent7ba3b1171f703e21555d78fbfb34be01adc89d5a (diff)
downloadfsf-binutils-gdb-9c1877ead06db18e19614a598d1e280acb97e971.zip
fsf-binutils-gdb-9c1877ead06db18e19614a598d1e280acb97e971.tar.gz
fsf-binutils-gdb-9c1877ead06db18e19614a598d1e280acb97e971.tar.bz2
solib_global_lookup: Fetch arch from objfile, not target_gdbarch.
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.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog7
-rw-r--r--gdb/objfiles.c3
-rw-r--r--gdb/objfiles.h2
-rw-r--r--gdb/solib.c2
4 files changed, 11 insertions, 3 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index a47cec4..0ea7d6d 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -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.
diff --git a/gdb/objfiles.c b/gdb/objfiles.c
index 2a5c15f..38a365c 100644
--- a/gdb/objfiles.c
+++ b/gdb/objfiles.c
@@ -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;
}
diff --git a/gdb/objfiles.h b/gdb/objfiles.h
index 46e7ea5..b14aab0 100644
--- a/gdb/objfiles.h
+++ b/gdb/objfiles.h
@@ -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);
diff --git a/gdb/solib.c b/gdb/solib.c
index 41250a2..6260dac 100644
--- a/gdb/solib.c
+++ b/gdb/solib.c
@@ -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);