How do i read a crash report from psplink?

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

Moderators: cheriff, TyRaNiD

Post Reply
smartie_on_computer
Posts: 28
Joined: Wed May 09, 2007 12:35 pm

How do i read a crash report from psplink?

Post by smartie_on_computer »

Hey guys,

each time my homebrew crashes i get errors from psplink bu they mean nothing to me because i cant tell what when wrong.

for instance can someone tell me what this means and how you figured that out?

Code: Select all

host1:/> Exception - Bus error (data)
Thread ID - 0x048E6D07
Th Name   - user_main
Module ID - 0x00CD497B
Mod Name  - "PSPWebCam"
EPC       - 0x08805518
Cause     - 0x1000001C
BadVAddr  - 0x0B089540
Status    - 0x20088613
zr:0x00000000 at:0xDEADBEEF v0:0x00000000 v1:0x000000FF
a0:0x00000000 a1:0x4400C754 a2:0x00000008 a3:0x4400BF54
t0:0x00000008 t1:0x00000080 t2:0x00000000 t3:0x00000001
t4:0x00000000 t5:0x4400BF54 t6:0x000000DB t7:0xDEADBEEF
s0:0x00000015 s1:0x0BBBFE34 s2:0x00000001 s3:0x0BBBFEE0
s4:0x00000015 s5:0x00000013 s6:0xDEADBEEF s7:0xDEADBEEF
t8:0xDEADBEEF t9:0xDEADBEEF k0:0x0BBBFF00 k1:0x00000000
gp:0x0882B2E0 sp:0x0BBBFDF0 fp:0x0BBBFDF0 ra:0x08804CC0
0x08805518: 0xA0400000 '..@.' - sb         $zr, 0($v0)
Cheers
Roman
NoEffex
Posts: 106
Joined: Thu Nov 27, 2008 6:48 am

Post by NoEffex »

It tells you where the exception happened and dumps all the registers so you can read what is in what register. This is more useful to the projects developers in my opinion as they know more of what's going on, but, usually it'll give a hint as to what triggered what, just gotta somewhat understand mips.
Programming with:
Geany + Latest PSPSDK from svn
smartie_on_computer
Posts: 28
Joined: Wed May 09, 2007 12:35 pm

Post by smartie_on_computer »

so how would i figure out what part of my code caused this error and waht the error was?
jsharrad
Posts: 100
Joined: Thu Oct 20, 2005 3:06 am

Post by jsharrad »

If you're building for fw 1.5 just use psp-addr2line on the elf with the EPC address.

Code: Select all

psp-addr2line -fe whatever.elf 0x08805518
or if you're building a PRX for a higher firmware in psplink do

Code: Select all

calc $epc-$mod
and use the resulting address in psp-addr2line to give you an idea of where in your source things are going south.
hlide
Posts: 739
Joined: Sun Sep 10, 2006 2:31 am

Post by hlide »

"sb $zr, 0($v0)" ==> "*((char *)v0) = 0;"

but v0 = 0, so you're trying to writing zero through a null pointer somewhere in your code.
TyRaNiD
Posts: 907
Joined: Sun Jan 18, 2004 12:23 am

Post by TyRaNiD »

The alternative to working out where the problem is is to try and use psp-gdb, as long as your crash is repeatable it will be easy to track it down (as long as you build your app correctly :P)
smartie_on_computer
Posts: 28
Joined: Wed May 09, 2007 12:35 pm

Post by smartie_on_computer »

TyRaNiD wrote:The alternative to working out where the problem is is to try and use psp-gdb, as long as your crash is repeatable it will be easy to track it down (as long as you build your app correctly :P)
wow thnx for ur guys replies, ill use them nxt time, but jsut to note TyRaNiD, i cant use psp gdb because im using the psp go!cam so i cant use psplink unless you release a wirelss version lol

Cheers
Roman
User avatar
Wally
Posts: 663
Joined: Mon Sep 26, 2005 11:25 am

Post by Wally »

smartie_on_computer wrote:
TyRaNiD wrote:The alternative to working out where the problem is is to try and use psp-gdb, as long as your crash is repeatable it will be easy to track it down (as long as you build your app correctly :P)
wow thnx for ur guys replies, ill use them nxt time, but jsut to note TyRaNiD, i cant use psp gdb because im using the psp go!cam so i cant use psplink unless you release a wirelss version lol

Cheers
Roman
I'm still waiting for the wireless version too :@ Hurry up xD
TyRaNiD
Posts: 907
Joined: Sun Jan 18, 2004 12:23 am

Post by TyRaNiD »

Not going to happen :) Well unless someone upissues the old psplink and tries to port it across to CFW, it might not be that hard to do.

And the old psplink did have a wifi GDB stub :)
Post Reply