![]() |
| Forums | Gaming News | Videos | Downloads | Today's Posts | Mark Forums Read | Chat | FAQ | Members List | Contact |
| ||||||
This is a discussion on Reading an exception handler 'PROPERLY'!b within the PSP Development Forum forums, part of the PSP Development, Hacks, and Homebrew category; Well... To those who do not know, Exception Handler's are, to my knowledge, an info screen explaining why your psp ...
![]() |
|
|
LinkBack | Thread Tools |
|
|
#1 |
![]() ![]() ...in a dream...
|
Well... To those who do not know, Exception Handler's are, to my knowledge, an info screen explaining why your psp has crashed, but instead of freezing up and hanging, it gives you an explanation of what has caused it.
Now, the default exception handler is very basic and prints out the entire gibberish hex language saying what has casued the crash. But, i have made my own (looking at others code with it a 'course :icon_smil ) and not only got it to print the gibberish to the screen, but write the offset value of the crash in a file, which is really useful, except the offset value im getting is equivalent to 10,000 lines of code worth an app since all 8 values are filled with a number/character 0-F. Plus, when going to that offset value, it just sends me to the end of my file/code. Im guessing and hoping the cause is mixed up if statement, with the closing bracket off and somewhere else. Now more onto what this topic is about... Is there any proper way to read an exception handler? I know the BadVaddr line is the main place to look, but mine there is a huge hex number, bigger then what my app/code is. So am i reading it wrong or what? Is the huge number the casue of a buffer overflow after running thro the code a ton, thus giving me a huge hex number? I can just run my app again and itll create my exception handler file with the offset if someone needs the humongus hex number. Please correct me where ever i am wrong, and im sure i am somewhere... Alwayz appreciate the help
__________________
...you'll never know what it's like... spending your whole life in a dream...
Launch a Kitten out of a Cannon and win real cash! Checkout my newly updated site for all my projects (Kitten Cannon, BOXHEAD, Light Cycle 3D) |
|
|
|
|
|
#3 |
![]() ![]() ...in a dream...
|
K, im runnin; my app now to generate a fresh one lol... ill edit this post when i get it.....
Ok, here is the offset within the generated file: Offset 0x08B830A4 Now, when running the app, the BadVaddr line has this offset: Offset 0x9759D188 Any idea what could be the problem?????
__________________
...you'll never know what it's like... spending your whole life in a dream...
Launch a Kitten out of a Cannon and win real cash! Checkout my newly updated site for all my projects (Kitten Cannon, BOXHEAD, Light Cycle 3D) Last edited by SG57; 04-07-2006 at 02:13 AM.. |
|
|
|
|
|
#4 |
![]() ![]() Developer
|
use psp-addr2line.
"psp-addr2line --exe=SOMETHING.elf" (iirc) then enter in the addresses, and if you built with debugging it should be able to give you a line number. If you didn't build with debugging then recompile with the -g flag, and get the new hex address. You could also try get your exception handler to give you a stack trace, check the pspsdk examples. |
|
|
|
|
|
#6 |
![]() Mushroom Man
|
As said before you need to use addr2line. Have you got the address of the sample you used to make your own handler please? It could come in quite handy
![]() edit: nevermind, I found a sample in the SDK package
__________________
[URL=http://www.othala.co.uk]Othala[/URL] [B]o[/B] [URL=http://www.entheogendefencefund.org.uk/]Save the shroom![/URL] [CENTER][URL=http://www.othala.co.uk/travellerBlog][IMG]http://www.othala.co.uk/graphics/travBanner.png[/IMG][/URL][/CENTER] Last edited by Psilocybeing; 04-19-2006 at 04:16 PM.. |
|
|
|
|
|
#7 |
![]() ![]() ...in a dream...
|
Well, i can not find that psp-addr2line or what ever, do you mean to take the elf file made and run what you said through cygwin? A simple tut would be just dandy :icon_smil
hi soccer.
__________________
...you'll never know what it's like... spending your whole life in a dream...
Launch a Kitten out of a Cannon and win real cash! Checkout my newly updated site for all my projects (Kitten Cannon, BOXHEAD, Light Cycle 3D) |
|
|
|
|
|
#8 |
![]() ![]() Muppet Magnet
|
Your bug looks like you're trying to read/write from/to a pointer that contains an invalid value (the BadVAddr address).
The code at fault is at the address 0x08B830A4. This isn't a line number, it's the address in memory of the machine code corresponding to some part of your code. Note that valid addresses in user mode are 0x08400000 - 0x0A000000. As mentioned before, to track this down further you need to use psp-addr2line. It should be part of the pspsdk - log into cygwin and it should be in the path.
__________________
Using firmware v2.00-v3.50? Open up a whole world of homebrew here
The PSP Homebrew Database needs YOU! Your ISP may be illegally wiretapping all your web activity. Stop Phorm Now! Visiting the Edinburgh Festivals? Get practical advice from experts. |
|
|
|
![]() |
| Tags |
| exception , handler , properlyb , reading |
| Thread Tools | |
|
|