This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Need Help for bringing m68k-based bdm target-patches formgdb-5.2.1 to gdb-5.3


Josef Wolf <jw@raven.inka.de> 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."


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]