PS2Link Debugging Tutorial

Discuss the development of software, tools, libraries and anything else that helps make ps2dev happen.

Moderators: cheriff, Herben

Post Reply
User avatar
Lukasz
Posts: 248
Joined: Mon Jan 19, 2004 8:37 pm
Location: Denmark
Contact:

PS2Link Debugging Tutorial

Post by Lukasz »

I wrote a short tutorial on how to debug your PS2 programs using PS2Link and ee-addr2line.

Link: http://lukasz.dk/programming/playstatio ... debugging/

I hope someone finds it useful :-)

Lukasz
ubergeek42
Posts: 83
Joined: Wed Jul 13, 2005 12:25 am

Post by ubergeek42 »

Wow, I never knew that that could be done, very cool, thanks.
ps2devman
Posts: 259
Joined: Mon Oct 09, 2006 3:56 pm

Post by ps2devman »

Thx a lots for the tip!
ps2devman
Posts: 259
Joined: Mon Oct 09, 2006 3:56 pm

Post by ps2devman »

I have a question related to compilation error messages.

Let's say I have 2 c modules. I implement function Scales() (typo error) in one, and I call function Scale() in the other one. I declare function Scale() in header included by both, so no compilation error occurs before linking.

ld then fires an error and tells me there is a link error without any info.
That case is very annoying. Each time it happens I get no idea what is the missing function, according to ld, so I spend a lots of time commenting code in order to find out the call that calls missing function.

Am I missing a flag or something in makefile?
I use EE_CFLAGS += -g
User avatar
Lukasz
Posts: 248
Joined: Mon Jan 19, 2004 8:37 pm
Location: Denmark
Contact:

Post by Lukasz »

You are talking compilation time error and not runtime, which the tutorial I wrote is about.

When you get an undefined reference, you get which object file it is in and what you the undefined function you are trying to link against. Based on this information, you should be able to locate your problem.

But like I said, compliation problem, not runtime.
User avatar
evilo
Posts: 230
Joined: Thu Apr 22, 2004 8:40 pm
Contact:

Post by evilo »

duh...

Until now, I was still disassembling my code to find an error using ee-objdump...

I cannot beleive it's so easy with ee-addr2line, thank you very much for the great tip !
Post Reply