| View previous topic :: View next topic |
| Author |
Message |
sg57
Joined: 14 Oct 2005 Posts: 154
|
Posted: Fri Jun 30, 2006 4:57 pm Post subject: Debugging with psp-addr2line, followed others but nothing... |
|
|
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 |
|
 |
Raphael

Joined: 17 Jan 2006 Posts: 646 Location: Germany
|
Posted: Fri Jun 30, 2006 5:55 pm Post subject: Re: Debugging with psp-addr2line, followed others but nothin |
|
|
| 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 |
|
 |
Raphael

Joined: 17 Jan 2006 Posts: 646 Location: Germany
|
Posted: Fri Jun 30, 2006 6:50 pm Post subject: Re: Debugging with psp-addr2line, followed others but nothin |
|
|
| EDIT: Sorry... board was shortly down and caused double post. |
|
| Back to top |
|
 |
sg57
Joined: 14 Oct 2005 Posts: 154
|
Posted: Fri Jun 30, 2006 7:56 pm Post subject: |
|
|
... 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 |
|
 |
Raphael

Joined: 17 Jan 2006 Posts: 646 Location: Germany
|
Posted: Fri Jun 30, 2006 9:24 pm Post subject: |
|
|
| Without more information and/or some of the source it's just blind guessing. |
|
| Back to top |
|
 |
TyRaNiD
Joined: 18 Jan 2004 Posts: 918
|
Posted: Sat Jul 01, 2006 12:52 am Post subject: |
|
|
| 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 |
|
 |
|