What is the best way to debug? What do you do?

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
snowsquirrel
Posts: 51
Joined: Sun Feb 24, 2008 3:36 am

What is the best way to debug? What do you do?

Post by snowsquirrel »

I am trying to get debugging with psp-insight working.

Background:
* I have used gdb and insight before, but never with the psp.
* I have psp link working and pspsh.
* working on a slim, 3.90 m33 firmware
* I build my project as a prx: link, psp-fixup-imports, psp-prxgen

What I do:
* If I just run my prx, as in ./game.prx, it launches fine.
* If I 'debug game.prx' , I am told it loads.
* I connect with psp-insight, and am told it connects successfully
* but I don't see any tty output on psp-insight, I can stop or anything.
* I have also tried launching the prx, and then attaching to it, but it appears that insight just freezes. It appears that during this, usbhostfs is printing lines about bulk writes wihich timeout.

Help me debug!

Do people actually use the psp-link insight combo? Or is everyone just printf debugging, and then using addr2line to decipher crashes?

~S

ps - is this going to get me source level debugging, or assembler level?
snowsquirrel
Posts: 51
Joined: Sun Feb 24, 2008 3:36 am

Post by snowsquirrel »

Ok, I have gdb working.

1. In pspsh do a 'debug mygame.prx'.
2. From shell do a 'psp-gdb mygame.elf'
3. In gdb, do a 'target remote localhost:10001'
3. do a 'cont', not a 'star't!

Yay works. But I can't seem to get insight to work. I'll update once I figure it out.
~S
Post Reply