summaryrefslogtreecommitdiff
path: root/src/target/mips32.c
diff options
context:
space:
mode:
authoroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2008-10-07 18:04:14 +0000
committeroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2008-10-07 18:04:14 +0000
commit3aef2f08589e46bbbce15a4534c4900bc2528998 (patch)
tree48a5ed64668e450a58b1ef79d15a6ee823f3e8b0 /src/target/mips32.c
parent2babd879165466517b3d5f0530794a3885b3eeaf (diff)
downloadopenocd+libswd-3aef2f08589e46bbbce15a4534c4900bc2528998.tar.gz
openocd+libswd-3aef2f08589e46bbbce15a4534c4900bc2528998.tar.bz2
openocd+libswd-3aef2f08589e46bbbce15a4534c4900bc2528998.tar.xz
openocd+libswd-3aef2f08589e46bbbce15a4534c4900bc2528998.zip
Fixes SEGFAULT when setting registers from GDB.
set $cpsr=1234 git-svn-id: svn://svn.berlios.de/openocd/trunk@1026 b42882b7-edfa-0310-969c-e2dbd0fdcd60
Diffstat (limited to 'src/target/mips32.c')
-rw-r--r--src/target/mips32.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/target/mips32.c b/src/target/mips32.c
index 96e509c3..47b069e6 100644
--- a/src/target/mips32.c
+++ b/src/target/mips32.c
@@ -4,6 +4,9 @@
* *
* Copyright (C) 2008 by David T.L. Wong *
* *
+ * Copyright (C) 2007,2008 Øyvind Harboe *
+ * oyvind.harboe@zylin.com *
+ * *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
@@ -286,7 +289,10 @@ reg_cache_t *mips32_build_reg_cache(target_t *target)
if (mips32_core_reg_arch_type == -1)
mips32_core_reg_arch_type = register_reg_arch_type(mips32_get_core_reg, mips32_set_core_reg);
-
+
+ register_init_dummy(&mips32_gdb_dummy_fsr_reg);
+ register_init_dummy(&mips32_gdb_dummy_fir_reg);
+
/* Build the process context cache */
cache->name = "mips32 registers";
cache->next = NULL;