aboutsummaryrefslogtreecommitdiff
path: root/gdb/regcache.c
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@gnu.org>2003-09-27 19:32:53 +0000
committerMark Kettenis <kettenis@gnu.org>2003-09-27 19:32:53 +0000
commit41d35cb0fe5aff6050e3dce2506a51876d10d26a (patch)
treeab0c4f4e06ac56f0ba6f155bce940fca2893172e /gdb/regcache.c
parentde1e508dafe42b1e30e8b29fab909d266ef52a6c (diff)
downloadgdb-41d35cb0fe5aff6050e3dce2506a51876d10d26a.zip
gdb-41d35cb0fe5aff6050e3dce2506a51876d10d26a.tar.gz
gdb-41d35cb0fe5aff6050e3dce2506a51876d10d26a.tar.bz2
* regcache.h (get_regcache_arch): New prototype.
* regcache.c (get_regcache_arch): New function.
Diffstat (limited to 'gdb/regcache.c')
-rw-r--r--gdb/regcache.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/gdb/regcache.c b/gdb/regcache.c
index 182ca55..7fc35ad 100644
--- a/gdb/regcache.c
+++ b/gdb/regcache.c
@@ -344,6 +344,14 @@ make_cleanup_regcache_xfree (struct regcache *regcache)
return make_cleanup (do_regcache_xfree, regcache);
}
+/* Return REGCACHE's architecture. */
+
+struct gdbarch *
+get_regcache_arch (const struct regcache *regcache)
+{
+ return regcache->descr->gdbarch;
+}
+
/* Return a pointer to register REGNUM's buffer cache. */
static char *