diff options
| author | Jens Arnold <amiconn@rockbox.org> | 2004-08-30 19:52:45 +0000 |
|---|---|---|
| committer | Jens Arnold <amiconn@rockbox.org> | 2004-08-30 19:52:45 +0000 |
| commit | 06cb237af682fbc45a72c4e43e3f8126b2c9cac6 (patch) | |
| tree | a0eb1898429941f00da446e1e8c8efdd35864ff9 /apps/plugins | |
| parent | 56fd6f9316ee196bfd16a2f102469cb6b040d397 (diff) | |
| download | rockbox-06cb237af682fbc45a72c4e43e3f8126b2c9cac6.zip rockbox-06cb237af682fbc45a72c4e43e3f8126b2c9cac6.tar.gz rockbox-06cb237af682fbc45a72c4e43e3f8126b2c9cac6.tar.bz2 rockbox-06cb237af682fbc45a72c4e43e3f8126b2c9cac6.tar.xz | |
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
Diffstat (limited to 'apps/plugins')
| -rw-r--r-- | apps/plugins/firmware_flash.c | 4 | ||||
| -rw-r--r-- | apps/plugins/rockbox_flash.c | 3 |
2 files changed, 7 insertions, 0 deletions
diff --git a/apps/plugins/firmware_flash.c b/apps/plugins/firmware_flash.c index 8f7f187..751284a 100644 --- a/apps/plugins/firmware_flash.c +++ b/apps/plugins/firmware_flash.c @@ -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; } diff --git a/apps/plugins/rockbox_flash.c b/apps/plugins/rockbox_flash.c index 3bb8476..e393f20 100644 --- a/apps/plugins/rockbox_flash.c +++ b/apps/plugins/rockbox_flash.c @@ -977,6 +977,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) { char* filename; bool show_greet; + 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 @@ -997,7 +998,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(filename, show_greet); + rb->system_memory_guard(oldmode); /* re-enable memory guard */ return PLUGIN_OK; } |