From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23247 invoked by alias); 9 Sep 2006 23:10:38 -0000 Received: (qmail 23236 invoked by uid 22791); 9 Sep 2006 23:10:37 -0000 X-Spam-Check-By: sourceware.org Received: from cantor.suse.de (HELO mx1.suse.de) (195.135.220.2) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sat, 09 Sep 2006 23:10:35 +0000 Received: from Relay1.suse.de (mail2.suse.de [195.135.221.8]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.suse.de (Postfix) with ESMTP id 9D012F958 for ; Sun, 10 Sep 2006 01:10:32 +0200 (CEST) From: Andreas Schwab To: gdb-patches@sourceware.org Subject: Fix decoding in m68k_analyze_register_saves X-Yow: YOU PICKED KARL MALDEN'S NOSE!! Date: Sat, 09 Sep 2006 23:10:00 -0000 Message-ID: User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2006-09/txt/msg00042.txt.bz2 Fix decoding of `move.l %R,-(%sp)' during prologue analyzing. Tested on m68k-linux. Andreas. 2006-09-10 Andreas Schwab * 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."