summaryrefslogtreecommitdiff
path: root/gdb/gdbserver/linux-s390-low.c
diff options
context:
space:
mode:
authorUlrich Weigand <uweigand@de.ibm.com>2010-06-14 13:53:04 +0000
committerUlrich Weigand <uweigand@de.ibm.com>2010-06-14 13:53:04 +0000
commit173ae2ef83c91c270cbfc018031d7572f007c074 (patch)
treecc9460761e736dafc21bfacb191f5975fe3eb540 /gdb/gdbserver/linux-s390-low.c
parentca2fb93bc47049659ba158ebf3c3ba8b8ceca628 (diff)
downloadgdb-173ae2ef83c91c270cbfc018031d7572f007c074.tar.gz
* linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
* linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
Diffstat (limited to 'gdb/gdbserver/linux-s390-low.c')
-rw-r--r--gdb/gdbserver/linux-s390-low.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gdb/gdbserver/linux-s390-low.c b/gdb/gdbserver/linux-s390-low.c
index eb865dc35cc..943d8c5dea0 100644
--- a/gdb/gdbserver/linux-s390-low.c
+++ b/gdb/gdbserver/linux-s390-low.c
@@ -270,8 +270,11 @@ s390_arch_setup (void)
#ifdef __s390x__
{
unsigned int pswm;
- struct regcache *regcache = get_thread_regcache (current_inferior, 1);
+ struct regcache *regcache = new_register_cache ();
+ fetch_inferior_registers (regcache, find_regno ("pswm"));
collect_register_by_name (regcache, "pswm", &pswm);
+ free_register_cache (regcache);
+
if (pswm & 1)
init_registers_s390x_linux64 ();