QJ.NET | Videos | Forums | iPhone | MMORPG | Nintendo DS | Wii | PlayStation 3 | PSP | Xbox 360 | PC | Downloads | Contact Us
Forums | Gaming News | Videos | Downloads | Today's Posts | Mark Forums Read | Chat | FAQ | Members List | Contact

QJ.net Game Discussion - PSP, Xbox, Wii, PS3, PSP Homebrew, and PSP Guides

Go Back   QJ.net Game Discussion - PSP, Xbox, Wii, PS3, PSP Homebrew, and PSP Guides > Developers Corner > PSP Development, Hacks, and Homebrew > PSP Development Forum
The above video goes away if you are a member and logged in, so log in now!

Reading an exception handler 'PROPERLY'!b

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 ...

Reply
 
LinkBack Thread Tools
Old 04-07-2006, 02:00 AM   #1

...in a dream...
 
SG57's Avatar
 
Join Date: Jul 2005
Posts: 4,957
Trader Feedback: 0
Red face Reading an exception handler 'PROPERLY'!b

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
__________________
SG57 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 04-07-2006, 02:04 AM   #2

Developer
 
Join Date: Nov 2005
Posts: 445
Trader Feedback: 0
Default

Want to post your exception handler code and the hex number it generates and we could take a look. :icon_wink
danzel is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 04-07-2006, 02:09 AM   #3

...in a dream...
 
SG57's Avatar
 
Join Date: Jul 2005
Posts: 4,957
Trader Feedback: 0
Default

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?????
__________________

Last edited by SG57; 04-07-2006 at 02:13 AM..
SG57 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 04-07-2006, 05:07 AM   #4

Developer
 
Join Date: Nov 2005
Posts: 445
Trader Feedback: 0
Default

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.
danzel is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 04-19-2006, 03:50 PM   #5
 
Join Date: Jan 2006
Posts: 4,288
Trader Feedback: 0
Default

Cool, I gotta try this out!
__________________
[URL="http://www.newlilwayne.com"]www.NewLilWayne.com[/URL]
soccerPMN is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 04-19-2006, 04:12 PM   #6
Mushroom Man
 
Psilocybeing's Avatar
 
Join Date: Sep 2005
Location: UK
Posts: 318
Trader Feedback: 0
Default

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..
Psilocybeing is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 04-19-2006, 04:20 PM   #7

...in a dream...
 
SG57's Avatar
 
Join Date: Jul 2005
Posts: 4,957
Trader Feedback: 0
Default

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.
__________________
SG57 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 04-20-2006, 05:03 AM   #8

Muppet Magnet
 
Fanjita's Avatar
 
Join Date: Sep 2005
Location: Edinburgh, UK
Posts: 2,388
Trader Feedback: 0
Default

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.
Fanjita is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Tags
exception , handler , properlyb , reading

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



All times are GMT -8. The time now is 08:40 PM.



Use of this Web site constitutes acceptance of the TERMS & CONDITIONS and PRIVACY POLICY
Copyright © 2009, QJ.NET. All Rights Reserved.
Contact Us