Author: jfrederic.clere(a)jboss.com
Date: 2007-10-14 04:23:17 -0400 (Sun, 14 Oct 2007)
New Revision: 1110
Modified:
trunk/sight/native/os/solaris/module.c
Log:
Arrange porting.
Modified: trunk/sight/native/os/solaris/module.c
===================================================================
--- trunk/sight/native/os/solaris/module.c 2007-10-14 07:52:27 UTC (rev 1109)
+++ trunk/sight/native/os/solaris/module.c 2007-10-14 08:23:17 UTC (rev 1110)
@@ -90,15 +90,15 @@
typedef struct module_enum_t {
int nummodules;
apr_pool_t *pool;
- module *first_module;
- module *current_module;
+ struct module *first_module;
+ struct module *current;
} module_enum_t;
struct module {
char *name;
int base;
int size;
- module *next;
+ struct module *next;
};
SIGHT_CLASS_LDEF(Module)
@@ -132,9 +132,9 @@
module_enum_t *module = ptr;
struct module *current;
// fill first, use current and put next in current...
- if (module->ptr == NULL) {
- module->ptr = apr_palloc(module->pool, sizeof(struct module));
- current = module->ptr;
+ if (module->first_module == NULL) {
+ module->first_module = apr_palloc(module->pool, sizeof(struct module));
+ current = module->first_module;
} else {
current = module->current;
current->next = apr_palloc(module->pool, sizeof(struct module));
@@ -142,8 +142,8 @@
}
current->next = NULL;
current->name = apr_pstrdup(module->pool, car);
- current->base = pr_vaddr;
- current->size = pr_size;
+ current->base = map->pr_vaddr;
+ current->size = map->pr_size;
module->nummodules++;
return 0;
}
@@ -155,6 +155,7 @@
apr_pool_t *pool;
int j;
int ret;
+ apr_status_t rc;
struct ps_prochandle *ph;
module_enum_t *module;
struct module *current;
@@ -186,7 +187,7 @@
module->pool = pool;
module->nummodules = 0;
module->first_module = NULL;
- module->current_module = NULL;
+ module->current = NULL;
Pobject_iter(ph, proc_map_f, module);
if (ret<0) {
throwOSException(_E, Pgrab_error(ret));