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 

Getting "Offending routine" message in exception h

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



Joined: 02 Oct 2005
Posts: 79

PostPosted: Tue Feb 21, 2006 4:37 pm    Post subject: Getting "Offending routine" message in exception h Reply with quote

Ive noticed that on a few homebrew games there is a message on their exception handler that says this:

"The offending routine can be identified with:
addr2line <some stuff>"

Heres my current exception handler:
Code:
void MyExceptionHandler(PspDebugRegBlock *regs)
{
   pspDebugScreenInit();

   pspDebugScreenSetBackColor(0x00FF0000);
   pspDebugScreenSetTextColor(0xFFFFFFFF);
   pspDebugScreenClear();

   pspDebugScreenPrintf("I regret to inform you your psp has just crashed\n");
   pspDebugScreenPrintf("Please contact Sony technical support for further information\n\n");
   pspDebugScreenPrintf("Exception Details:\n");
   pspDebugDumpException(regs);
   pspDebugScreenPrintf("\nBlame the 3rd party software, it cannot possibly be our fault!\n");
}


Pretty much the same code that is in the SDK examples...

I was wondering what i would have to add to my exception handler to show that offending routine message, because the info its showing me right now isnt helping much...
Back to top
View user's profile Send private message
sandberg



Joined: 05 Oct 2005
Posts: 90
Location: Denmark

PostPosted: Wed Feb 22, 2006 1:50 am    Post subject: Reply with quote

psp-adadr2line is a tool from the pspsdk or the psp toolchain. You can use it to find out where the exception occured, by given the address of the exception and the elf file from your homebrew to the application.
Best results are if you build you homebrew app with debug-info (using the -g option to gcc).
_________________
Br, Sandberg
Back to top
View user's profile Send private message
seventoes



Joined: 02 Oct 2005
Posts: 79

PostPosted: Wed Feb 22, 2006 4:55 am    Post subject: Reply with quote

Yeah i knew all that, and im already building with -g, but i still cant figure out how to get that message.
Back to top
View user's profile Send private message
TyRaNiD



Joined: 18 Jan 2004
Posts: 918

PostPosted: Wed Feb 22, 2006 6:09 am    Post subject: Reply with quote

That message is just printed in the custom exception handler of the application, you just add it manually to your code. see sdl_psp_exception_handler in http://svn.pspdev.org/filedetails.php?repname=psp&path=%2Ftrunk%2FSDL%2Fsrc%2Fmain%2Fpsp%2FSDL_psp_main.c&rev=0&sc=0
Back to top
View user's profile Send private message
seventoes



Joined: 02 Oct 2005
Posts: 79

PostPosted: Wed Feb 22, 2006 6:23 am    Post subject: Reply with quote

Aha! Thanks! I was looking around in the sdk samples directory, i guess i shuold have been checking the svn..
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