2024 Current State by crt0
Writing/Reading variables, memory, registers (only as 32bit), call stack - works.
Example usage: run sample with ps2link: ps2client -h 192.168.1.13 execee host:testgdb.elf in nanother terminal mips64r5900el-ps2-elf-gdb -x ps2.sh
TODO: rewrite metwork stack
ps2gdbStub is a tcp stub for the gnu debugger. It could be easily changed to not use tcp. The low level portion reads 128 bits for the 32 gprs and also for lo and hi, although these are converted down to 32 bits before sending to the remote GDB.
Currently, the code must be uploaded via pukklink or ps2link. Naplink won't do it!
As for building the remote GDB, I configured gdb as mips-idt-elf and hacked about with it a bit. I managed to get the latest weekly snapshot (which at time of writing was gdb+dejagnu-20030801.tar.bz2) to work, after some hacking around. I've included a .cmd file for use with the remote GDB. You'll need to change the target line with the correct IP of your ps2. To invoke, from the shell, type <gdb -x ps2.cmd>
With reference to the frame pointer, gpr $30 should be the frame pointer, this is what the MIPS abi says anyway. However, our toolchain appears to use grp $30 as another saved register (s8), so I just report the fp to be the same as the sp at the moment.
Copyright (c) 2003 Ray Donnelly (rdonnelly@polygoons.com) All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
Any Licensee wishing to make commercial use of the Softare must contact the author to execute the appropriate license for such commercial use. Commercial use includes
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.