Building gdb for Cell/B.E.

Trying to debug a bus error on my PS3, I realised that the version of GDB I have installed doesn’t support debugging of SPU programs. There doesn’t seem to be a Debian packaged version available that does, so I built my own.

Because I found no obvious google result, I share this with the zero other people that I expect may one day be interested : the key option for configure appears to be


This information was brought to you via the gdb.spec file, and a post to the gcc-testresults mailing list.

4 thoughts on “Building gdb for Cell/B.E.”

  1. Just for the records, the NEWS file of GDB mentions the configure switch as well. : )

    Here is how I usually configure GDB for Cell:

    CC=”gcc -m64″ ../src/configure –libdir=/usr/lib64 –with-expat –disable-nls –disable-sim –disable-install-libbfd –program-prefix=my- –host=powerpc64-linux –target=powerpc64-linux –enable-targets=spu –prefix=`pwd`/../install

    Note that the debugger needs to be 64bit in order to support the SPU/PPU address encoding on Cell (combined debugging).

  2. Thanks for the hint :)

    (Once I’d found the configure option, I added “enable-targets=spu” to my google query, and so missed the NEWS file which lacked that exact string. Using “enable-targets” yields many more hits)

    Also, thanks for the configure command line.

Leave a Reply

Your email address will not be published.