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 

Debugging with psp-addr2line, followed others but nothing...

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



Joined: 14 Oct 2005
Posts: 154

PostPosted: Fri Jun 30, 2006 4:57 pm    Post subject: Debugging with psp-addr2line, followed others but nothing... Reply with quote

Ok, yes ive searched and yes i read the other threads and Ive followed them accordingly, but only have gotten a functions name, no line or anything, and ive used this functio about 10 times, and its the blitting of a png image in the graphics library.

Here is my exception im getting:
Code:

Exception - Bus error (data)
Thread ID - 0x04934F21
Th Name   - user_main
Module ID - 0x04951C33
Mod Name  - TEST~ING
EPC       - 0x08902EC8
Cause     - 0x0000001C
BadVAddr  - 0x1759D188
Status    - 0x20008613
zr:0x00000000 at:0x0008FF00 v0:0x00000000 v1:0x08A46C98
a0:0x9D000200 a1:0x00000200 a2:0x48946BF4 a3:0x00CB4813
t0:0xFFBFFFFF t1:0xFFFFFFFF t2:0x88065A40 t3:0x00000030
t4:0x09EFF810 t5:0x00001E04 t6:0x08905604 t7:0x00008600
s0:0x00000000 s1:0x09EFFE34 s2:0x00000001 s3:0x09EFFEE0
s4:0x0000001F s5:0x00000013 s6:0xDEADBEEF s7:0xDEADBEEF
t8:0x000006C0 t9:0x00000001 k0:0x09EFFF00 k1:0x00000000
gp:0x089494D0 sp:0x09EFF830 fp:0x09EFF830 ra:0x08902EC4

I have done the following.

I have used the BadVAddr with psp-addr2line using this command and recieving this result:
Code:

$ psp-addr2line -f  -e TESTING.elf 0x1759D188
??
??:0

Now, i tried the RA line offset and recieved this:
Code:

$ psp-addr2line -f  -e TESTING.elf 0x08902EC4
blitAlphaImageToScreen
??:0

I highly doubt the problem is in an included library since ive not included one since the last time i compiled and it worked fine. But if so, please tell me how to add teh -d option/aragument to the compiling of that library.

So could someone enlighten me? Thanks.

EDIT

Well, another elf popped out when compiling so i used that one, and i have recieved this from using the RA offset:
Code:

$ psp-addr2line -f  -e psp.elf 0x08902EC4
drawLine
graphics.c:0

So maybe it is in the graphics library?

EDIT

Wow.... I think i found the issue... The drawline function was a static void?!? I removed the static (since a void cant be static since it doesnt return a value) hope it works!
Back to top
View user's profile Send private message
Raphael



Joined: 17 Jan 2006
Posts: 646
Location: Germany

PostPosted: Fri Jun 30, 2006 5:55 pm    Post subject: Re: Debugging with psp-addr2line, followed others but nothin Reply with quote

sg57 wrote:

Wow.... I think i found the issue... The drawline function was a static void?!? I removed the static (since a void cant be static since it doesnt return a value) hope it works!


static has nothing to do with the return value of a function. It specifies if a function is only local to a module or not. So in your case it crashed because it was local, but you most probably wanted to call the function from outside the graphics.c file.


Last edited by Raphael on Fri Jun 30, 2006 6:56 pm; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website
Raphael



Joined: 17 Jan 2006
Posts: 646
Location: Germany

PostPosted: Fri Jun 30, 2006 6:50 pm    Post subject: Re: Debugging with psp-addr2line, followed others but nothin Reply with quote

EDIT: Sorry... board was shortly down and caused double post.
Back to top
View user's profile Send private message Visit poster's website
sg57



Joined: 14 Oct 2005
Posts: 154

PostPosted: Fri Jun 30, 2006 7:56 pm    Post subject: Reply with quote

... that's just it, I didnt use the function though...

oh and it still gives me an exception, same BadVAddr I believe (didnt check it byte for byte) but the RA address im not sure, i didnt check sincei had to get off...

So does anyone have an answer towards what may be the problem?
Back to top
View user's profile Send private message
Raphael



Joined: 17 Jan 2006
Posts: 646
Location: Germany

PostPosted: Fri Jun 30, 2006 9:24 pm    Post subject: Reply with quote

Without more information and/or some of the source it's just blind guessing.
Back to top
View user's profile Send private message Visit poster's website
TyRaNiD



Joined: 18 Jan 2004
Posts: 918

PostPosted: Sat Jul 01, 2006 12:52 am    Post subject: Reply with quote

Well for a start you might not have debug symbols built into the actual libray, second checking ra in this case wont help you in the slightest as it is crashing immediately after returning, third the BadVAddr is garbage a distrurbing amount of the time, in this case that very much looks the case. First step would be to disasm the crashing instruction (i.e. disasm $epc in psplink) then see which register is being used to cause the crash, from that you can determine the class of exception (e.g. garbage address/NULL pointer etc.) then try and find out the line number if you have debugging symbols on it will print out the line, if you dont get a sensible result it means that debugging isn't present or has been stripped, especially if your module name is correct as that indicates you are in the .text section of your elf. Other than that not much can be done to help you :)
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