1
0
Fork 0
forked from len0rd/rockbox

New debug feature: Use the SH1 user break controller to catch illegal memory accesses

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5026 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Jens Arnold 2004-08-30 19:52:45 +00:00
parent 56fd6f9316
commit 06cb237af6
7 changed files with 104 additions and 6 deletions

View file

@ -1010,6 +1010,8 @@ void DoUserDialog(char* filename)
enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
{
int oldmode;
/* this macro should be called as the first thing you do in the plugin.
it test that the api version and model the plugin was compiled for
matches the machine it is running on */
@ -1018,7 +1020,9 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
rb = api; /* copy to global api pointer */
/* now go ahead and have fun! */
oldmode = rb->system_memory_guard(MEMGUARD_NONE); /*disable memory guard */
DoUserDialog((char*) parameter);
rb->system_memory_guard(oldmode); /* re-enable memory guard */
return PLUGIN_OK;
}