How to use psp-addr2line ?

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

Moderators: cheriff, TyRaNiD

Post Reply
JiniCho
Posts: 18
Joined: Wed Sep 14, 2005 11:03 am

How to use psp-addr2line ?

Post by JiniCho »

Hi, I'm doing something on my PSP and I have a problem.(sorry for my poor english)

when my program dead it shows a bus error with some addresses and values of register.
I heard i can use psp-addr2line to find out which line(or function) of my program is cause the error.
so I tested with sdk's exception sample. I did it like below.

psp-addr2line -fe exception.elf 0x889004b4

and i got this.

??
??:0

I tried this also

psp-addr2line -b elf32-littlemips -fe exception.elf 0x889004b4

and the result was same.

Please someone tell me what I did wrong.

Thanks.
TyRaNiD
Posts: 907
Joined: Sun Jan 18, 2004 12:23 am

Post by TyRaNiD »

Two possible things, one make sure you build your executable with the -g flag to get debug information and also the exception address is in kernel memory space (because of using kernel mode) but the elf is really built in user memory space so addr2line cannot find the address. Basically remove the top 8 from the address so 0x889004b4 becomes 0x089004b4
JiniCho
Posts: 18
Joined: Wed Sep 14, 2005 11:03 am

Post by JiniCho »

It worked!!! thank you for your help TyRaNiD
Post Reply