harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gshiman...@apache.org
Subject svn commit: r591048 - in /harmony/enhanced/drlvm/trunk/vm/vmcore: include/native_modules.h src/util/native_modules_common.cpp
Date Thu, 01 Nov 2007 15:20:46 GMT
Author: gshimansky
Date: Thu Nov  1 08:20:46 2007
New Revision: 591048

URL: http://svn.apache.org/viewvc?rev=591048&view=rev
Log:
Added a function for dumping modules memory map


Modified:
    harmony/enhanced/drlvm/trunk/vm/vmcore/include/native_modules.h
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/native_modules_common.cpp

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/include/native_modules.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/include/native_modules.h?rev=591048&r1=591047&r2=591048&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/include/native_modules.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/include/native_modules.h Thu Nov  1 08:20:46 2007
@@ -51,6 +51,7 @@
 
 
 bool get_all_native_modules(native_module_t**, int*);
+void dump_native_modules(native_module_t* modules, FILE *out);
 void clear_native_modules(native_module_t**);
 native_module_t* find_native_module(native_module_t* modules, void* code_ptr);
 

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/native_modules_common.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/native_modules_common.cpp?rev=591048&r1=591047&r2=591048&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/native_modules_common.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/native_modules_common.cpp Thu Nov  1 08:20:46
2007
@@ -33,3 +33,18 @@
     // no matching module
     return NULL;
 }
+
+void dump_native_modules(native_module_t* modules, FILE *out)
+{
+    for (native_module_t* module = modules; module; module = module->next)
+    {
+        fprintf(out, "%s:\n", module->filename);
+
+        for (size_t i = 0; i < module->seg_count; i++)
+        {
+            char* base = (char*)module->segments[i].base;
+
+            fprintf(out, "\t%p:%p\n", base, base + module->segments[i].size);
+        }
+    }
+}



Mime
View raw message