This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Fix decoding in m68k_analyze_register_saves
- From: Andreas Schwab <schwab at suse dot de>
- To: gdb-patches at sourceware dot org
- Date: Sun, 10 Sep 2006 01:10:32 +0200
- Subject: Fix decoding in m68k_analyze_register_saves
Fix decoding of `move.l %R,-(%sp)' during prologue analyzing. Tested on
m68k-linux.
Andreas.
2006-09-10 Andreas Schwab <schwab@suse.de>
* m68k-tdep.c (m68k_analyze_register_saves): Fix decoding of
`move.l %R,-(%sp)'.
Index: gdb/m68k-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/m68k-tdep.c,v
retrieving revision 1.107
retrieving revision 1.108
diff -u -a -p -u -p -a -r1.107 -r1.108
--- gdb/m68k-tdep.c 13 Jul 2006 09:30:46 -0000 1.107
+++ gdb/m68k-tdep.c 9 Sep 2006 23:07:32 -0000 1.108
@@ -1,7 +1,7 @@
/* Target-dependent code for the Motorola 68000 series.
Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1999, 2000,
- 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+ 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
This file is part of GDB.
@@ -677,10 +677,10 @@ m68k_analyze_register_saves (CORE_ADDR p
else
break;
}
- else if ((op & 0170677) == P_MOVEL_SP)
+ else if ((op & 0177760) == P_MOVEL_SP)
{
/* move.l %R,-(%sp) */
- regno = ((op & 07000) >> 9) | ((op & 0100) >> 3);
+ regno = op & 017;
cache->saved_regs[regno] = offset;
offset -= 4;
pc += 2;
--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."