From 06cb237af682fbc45a72c4e43e3f8126b2c9cac6 Mon Sep 17 00:00:00 2001 From: Jens Arnold Date: Mon, 30 Aug 2004 19:52:45 +0000 Subject: 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 --- apps/plugins/firmware_flash.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'apps/plugins/firmware_flash.c') 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; } -- cgit v1.1