This is the mail archive of the
mailing list for the GDB project.
Re: Support for PPC405 / PPC440 registers
- From: Daniel Jacobowitz <drow at false dot org>
- To: Ignaz Forster <ignaz dot forster at gmx dot de>
- Cc: gdb at sourceware dot org
- Date: Mon, 26 Mar 2007 16:38:39 -0400
- Subject: Re: Support for PPC405 / PPC440 registers
- References: <46082CD9.email@example.com>
On Mon, Mar 26, 2007 at 10:28:09PM +0200, Ignaz Forster wrote:
> I recently tried to debug an embedded IBM PowerPC 405 and 440 over JTAG.
> The necessary GDB stub was written by myself (unfortunately using
> confidential information, so I won't be able to publish it).
> When trying to display the contents of the processor's registers I
> noticed only the PPC403 register layout was included in the standard GDB
> distribution. As the registers of the different processors in the
> 4xx-series differ, I tried to modify GDB and BFD to handle the registers
> of the additional processors. The following files were changed:
Since you have your own GDB stub, I would suggest that you approach
this from a different direction. The old "set architecture" appproach
has a problem: it requires manual intervention, because the
architecture of the file doesn't sufficiently tell us what registers
the target debug agent can supply.
GDB in CVS (after 6.6) has a new approach for customized targets; see
the "Target Descriptions" appendix in the current manual, here:
There's no PowerPC support for this feature yet. But there's a
chapter in the GDB Internals manual which describes how to add support
to a new architecture:
Basically, you write a little XML file. Your debug agent tells GDB
when it connects that it supports the XML description language, and
GDB fetches the description automatically. As long as you mention all
the standard core registers, you can add any other registers you
please. The new registers go right into the g/G packets, like other
> Question 1: What did I destroy by doing this?
> Question 2: Would a patch to add support for these processors be useful?
I'd rather you try the new way, if you have time.
> What else should be done before even thinking about doing so?
If you'd like to contribute to GDB, you'll need a copyright
assignment. If you're interested and do not already have one, please
let me know and I'll send you the form.