| View previous topic :: View next topic |
| Author |
Message |
asphodeli
Joined: 29 Jun 2008 Posts: 20 Location: Singapore
|
Posted: Tue Sep 09, 2008 2:40 am Post subject: PSPLink & GDB work fine, how do I figure out what went w |
|
|
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: | 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? |
|
| Back to top |
|
 |
sauron_le_noir
Joined: 05 Jul 2008 Posts: 229
|
Posted: Tue Sep 09, 2008 3:21 am Post subject: |
|
|
Storage violation (invalid pointer) in your homebrew
the code causing this
lw $v0, 0($v0) |
|
| Back to top |
|
 |
sturatt
Joined: 13 Jul 2006 Posts: 46
|
Posted: Tue Sep 09, 2008 4:40 pm Post subject: Re: PSPLink & GDB work fine, how do I figure out what we |
|
|
| 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: | 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 |
|
| Back to top |
|
 |
TyRaNiD
Joined: 18 Jan 2004 Posts: 918
|
Posted: Wed Sep 10, 2008 3:54 am Post subject: |
|
|
| 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. |
|
| Back to top |
|
 |
|