aboutsummaryrefslogtreecommitdiff
path: root/gdb/m88k-tdep.c
diff options
context:
space:
mode:
authorJohn Gilmore <gnu@cygnus>1993-01-29 05:28:45 +0000
committerJohn Gilmore <gnu@cygnus>1993-01-29 05:28:45 +0000
commit2a770cac0fc9f613a45f220f68ff2de6688908bd (patch)
treea5aebb9734f67858151dbfd81e5d716aa28316c9 /gdb/m88k-tdep.c
parent536c2ad4be7dcff61ec93b5705bc2a505fce8bcb (diff)
downloadgdb-2a770cac0fc9f613a45f220f68ff2de6688908bd.zip
gdb-2a770cac0fc9f613a45f220f68ff2de6688908bd.tar.gz
gdb-2a770cac0fc9f613a45f220f68ff2de6688908bd.tar.bz2
M88K fixes reported by Carl Greco, <cgreco@Creighton.Edu>:
* tm-m88k.h (REGISTER_CONVERT_TO_RAW): Fix typo. * m88k-tdep.c (next_insn): Lint, cleanup. (store_parm_word): Lint.
Diffstat (limited to 'gdb/m88k-tdep.c')
-rw-r--r--gdb/m88k-tdep.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/gdb/m88k-tdep.c b/gdb/m88k-tdep.c
index 0648412..bc6785b 100644
--- a/gdb/m88k-tdep.c
+++ b/gdb/m88k-tdep.c
@@ -45,6 +45,9 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
#include "setjmp.h"
#include "value.h"
+/* Size of an instruction */
+#define BYTES_PER_88K_INSN 4
+
void frame_find_saved_regs ();
@@ -178,11 +181,8 @@ next_insn (memaddr, pword1)
{
unsigned long buf[1];
- read_memory (memaddr, buf, sizeof (buf));
- *pword1 = buf[0];
- SWAP_TARGET_AND_HOST (pword1, sizeof (long));
-
- return memaddr + 4;
+ *pword1 = read_memory_integer (memaddr, BYTES_PER_88K_INSN);
+ return memaddr + BYTES_PER_88K_INSN;
}
/* Read a register from frames called by us (or from the hardware regs). */
@@ -642,7 +642,7 @@ store_parm_word (address, val)
CORE_ADDR address;
int val;
{
- write_memory (address, &val, 4);
+ write_memory (address, (char *)&val, 4);
}
static int