forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

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

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development
View previous topic :: View next topic  
Author Message
asphodeli



Joined: 29 Jun 2008
Posts: 20
Location: Singapore

PostPosted: Tue Sep 09, 2008 2:40 am    Post subject: PSPLink & GDB work fine, how do I figure out what went w Reply with quote

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
View user's profile Send private message
sauron_le_noir



Joined: 05 Jul 2008
Posts: 229

PostPosted: Tue Sep 09, 2008 3:21 am    Post subject: Reply with quote

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

lw $v0, 0($v0)
Back to top
View user's profile Send private message Send e-mail MSN Messenger
sturatt



Joined: 13 Jul 2006
Posts: 46

PostPosted: Tue Sep 09, 2008 4:40 pm    Post subject: Re: PSPLink & GDB work fine, how do I figure out what we Reply with quote

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
View user's profile Send private message
TyRaNiD



Joined: 18 Jan 2004
Posts: 918

PostPosted: Wed Sep 10, 2008 3:54 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group