2 #include "w32process.h"
3 #include "w32process-unix-internals.h"
5 #ifdef USE_HAIKU_BACKEND
10 mono_w32process_get_name (pid_t pid
)
15 if (get_next_image_info ((team_id
) pid
, &cookie
, &imageInfo
) != B_OK
)
18 return g_strdup (imageInfo
.name
);
22 mono_w32process_get_path (pid_t pid
)
24 return mono_w32process_get_name (pid
);
28 mono_w32process_get_modules (pid_t pid
)
31 MonoW32ProcessModule
*mod
;
35 while (get_next_image_info (B_CURRENT_TEAM
, &cookie
, &imageInfo
) == B_OK
) {
36 mod
= g_new0 (MonoW32ProcessModule
, 1);
37 mod
->device
= imageInfo
.device
;
38 mod
->inode
= imageInfo
.node
;
39 mod
->filename
= g_strdup (imageInfo
.name
);
40 mod
->address_start
= MIN (imageInfo
.text
, imageInfo
.data
);
41 mod
->address_end
= MAX ((uint8_t*)imageInfo
.text
+ imageInfo
.text_size
,
42 (uint8_t*)imageInfo
.data
+ imageInfo
.data_size
);
43 mod
->perms
= g_strdup ("r--p");
44 mod
->address_offset
= 0;
46 if (g_slist_find_custom (ret
, mod
, mono_w32process_module_equals
) == NULL
) {
47 ret
= g_slist_prepend (ret
, mod
);
49 mono_w32process_module_free (mod
);
53 return g_slist_reverse (ret
);