MIPS gdb openocd

I’ve got a valid image in flash. Start openocd -f interface/jtagkey.cfg -f board/pic-p32mx-uwb32.cfg 0f /usr/local/share/openocd/httpd/ --debug 3 -c init -c “reset halt”

then start ./mips-sde-elf-gd

.gdbinit contains

target remote localhost:3333

monitor reset halt

at the gdb prompt I do the following:

JTAG tap: pic32mx.cpu tap/device found: 0x50978053 (mfg: 0x029, part: 0x0978, ver: 0x5)

target state: halted

target halted in MIPS32 mode due to debug-request, pc: 0xbfc00000

(gdb) stepi

stepi ignored. GDB will now fetch the register state from the target.

Program received signal SIGINT, Interrupt.

0x0000c0b

but I can telnet into openocd and do a step and it works…

tcmichals@tcmichals-desktop:~/CodeSourcery/Sourcery_G++_Lite/bin$ telnet localhost 4444

Trying ::1…

Trying 127.0.0.1…

Connected to localhost.

Escape character is ‘^]’.

Open On-Chip Debugger

step

target state: halted

target halted in MIPS32 mode due to single-step, pc: 0xbfc00004

Any clues? it seems that gdb is not working but the telnet seems to work…

No help, but I’ve noticed the same thing. Single step (and breakpoints) don’t work properly with GDB but seem to work alright when using the telnet command line interface.

My guess is that MIPS support in OpenOCD has not been fully tested with GDB. OpenOCD development has traditionally been very ARM intensive. It would be nice to hear from someone who has successfully got it going with MIPS.

/Ricard