From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5547 invoked by alias); 6 Aug 2003 18:22:35 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 5538 invoked from network); 6 Aug 2003 18:22:34 -0000 Received: from unknown (HELO Cantor.suse.de) (213.95.15.193) by sources.redhat.com with SMTP; 6 Aug 2003 18:22:34 -0000 Received: from Hermes.suse.de (Hermes.suse.de [213.95.15.136]) by Cantor.suse.de (Postfix) with ESMTP id 3AAFF14EE9; Wed, 6 Aug 2003 20:22:34 +0200 (MEST) To: Josef Wolf Cc: gdb@sources.redhat.com Subject: Re: Need Help for bringing m68k-based bdm target-patches form gdb-5.2.1 to gdb-5.3 References: <20030731223514.GD20282@raven.inka.de> From: Andreas Schwab X-Yow: --``I love KATRINKA because she drives a PONTIAC. We're going away now. I fed the cat. - Zippy'' Date: Wed, 06 Aug 2003 18:22:00 -0000 In-Reply-To: <20030731223514.GD20282@raven.inka.de> (Josef Wolf's message of "Fri, 1 Aug 2003 00:35:14 +0200") Message-ID: User-Agent: Gnus/5.1002 (Gnus v5.10.2) Emacs/21.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-SW-Source: 2003-08/txt/msg00083.txt.bz2 Josef Wolf writes: |> diff -urd gdb/gdb/m68k-tdep.c gdb.patched/gdb/m68k-tdep.c |> --- gdb/gdb/m68k-tdep.c 2003-07-31 18:15:46.000 +0200 |> +++ gdb.patched/gdb/m68k-tdep.c 2003-07-31 18:21:56.00 +0200 |> @@ -60,14 +60,14 @@ |> E_SP_REGNUM = 15, /* Contains address of top of stack */ |> E_PS_REGNUM = 16, /* Contains processor status */ |> E_PC_REGNUM = 17, /* Contains program counter */ |> - E_FP0_REGNUM = 18, /* Floating point register 0 */ |> + E_FP0_REGNUM = 26, /* Floating point register 0 */ |> E_FPC_REGNUM = 26, /* 68881 control register */ There are 7 registers between fp0 and fpc, namely the other floating point registers fp1 to fp7. You can't just renumber fp0 without renumbering the others. |> That is, there are two problems. First is that the bdm-enabled target have |> some additional registers. Those registers are |> |> "pcc", "usp", "ssp", "sfc", "dfc", "atemp", "far", "vbr", |> |> which are placed between "pc" and "fp0". Most of those registers are |> standard m68k registers, But they are supervisor-only registers (btw, I have never heard of the pcc, atemp and far registers, they don't exist on any of the variants of the m68k family I know of). |> so I wonder how E_FP0_REGNUM can be set to 18? Theses numbers are basically arbitrary, AFAIK. |> Could it be that the bdm-patches have a broken register mapping? Or is |> it that gdb dont want to know anything about vbr, ssp, sfc etc/pp? The latter. No user level program can ever use these registers, so gdb does not need to know anything about them. But if you want gdb to be able to debug supervisor level programs you can just give these registers any number beyond the currently defined range. Andreas. -- Andreas Schwab, SuSE Labs, schwab@suse.de SuSE Linux AG, Deutschherrnstr. 15-19, D-90429 Nürnberg Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different."