PSPLink & GDB work fine, how do I figure out what went w

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

Moderators: cheriff, TyRaNiD

Post Reply
asphodeli
Posts: 20
Joined: Sun Jun 29, 2008 2:44 pm
Location: Singapore

PSPLink & GDB work fine, how do I figure out what went w

Post by asphodeli »

Hi guys, I am doing some game programming on the PSP, and I have run into some problems. I am using GDB to debug the program over PSPLink. What I don't understand, however, is the stuff that GDB throws me:

Code: Select all

ms0:/psp/game/azalende/> Exception - Bus error (data)
Thread ID - 0x0427A45D
Th Name   - user_main
Module ID - 0x0428170F
Mod Name  - "LTE_ENGINE"
EPC       - 0x08804338
Cause     - 0x1000001C
BadVAddr  - 0x0042A3D2
Status    - 0x60088613
zr:0x00000000 at:0x2008FF00 v0:0x00000000 v1:0x00000008
a0:0x08AC2D70 a1:0x00000000 a2:0x00000000 a3:0x00000010
t0:0x08AC0AD4 t1:0xFFFFBFFF t2:0xFFFFFFFF t3:0x00000030
t4:0x0BBBFDC0 t5:0x00003E0C t6:0x08974528 t7:0x20088600
s0:0x08A3F0E0 s1:0x0881E794 s2:0x00000001 s3:0x0BBBFED0
s4:0x00000024 s5:0x00000013 s6:0xDEADBEEF s7:0xDEADBEEF
t8:0x880A0000 t9:0x880A1180 k0:0x0BBBFF00 k1:0x00000000
gp:0x089F6C40 sp:0x0BBBFD78 fp:0x0BBBFD78 ra:0x08807264
0x08804338: 0x8C420000 '..B.' - lw         $v0, 0($v0)
Anyone knows where do I start figuring out where is the problem in my code?
sauron_le_noir
Posts: 203
Joined: Sat Jul 05, 2008 8:03 am

Post by sauron_le_noir »

Storage violation (invalid pointer) in your homebrew
the code causing this

lw $v0, 0($v0)
sturatt
Posts: 46
Joined: Thu Jul 13, 2006 4:21 pm

Re: PSPLink & GDB work fine, how do I figure out what we

Post by sturatt »

asphodeli wrote:Hi guys, I am doing some game programming on the PSP, and I have run into some problems. I am using GDB to debug the program over PSPLink. What I don't understand, however, is the stuff that GDB throws me:

Code: Select all

ms0:/psp/game/azalende/> Exception - Bus error (data)
Thread ID - 0x0427A45D
Th Name   - user_main
Module ID - 0x0428170F
Mod Name  - "LTE_ENGINE"
EPC       - 0x08804338
Cause     - 0x1000001C
BadVAddr  - 0x0042A3D2
Status    - 0x60088613
zr:0x00000000 at:0x2008FF00 v0:0x00000000 v1:0x00000008
a0:0x08AC2D70 a1:0x00000000 a2:0x00000000 a3:0x00000010
t0:0x08AC0AD4 t1:0xFFFFBFFF t2:0xFFFFFFFF t3:0x00000030
t4:0x0BBBFDC0 t5:0x00003E0C t6:0x08974528 t7:0x20088600
s0:0x08A3F0E0 s1:0x0881E794 s2:0x00000001 s3:0x0BBBFED0
s4:0x00000024 s5:0x00000013 s6:0xDEADBEEF s7:0xDEADBEEF
t8:0x880A0000 t9:0x880A1180 k0:0x0BBBFF00 k1:0x00000000
gp:0x089F6C40 sp:0x0BBBFD78 fp:0x0BBBFD78 ra:0x08807264
0x08804338: 0x8C420000 '..B.' - lw         $v0, 0($v0)
Anyone knows where do I start figuring out where is the problem in my code?
in psplink:
calc $epc-$mod
it will give you an address

then run psp-addr2line -fe name.elf address

this should tell you where in your source code the problem is
TyRaNiD
Posts: 907
Joined: Sun Jan 18, 2004 12:23 am

Post by TyRaNiD »

Of course if you are using GDB then you shouldn't see these errros on the main window, unless you are crashing somebody else's module/prx. GDB will only handle exceptions in the code which it loaded.
Post Reply