diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2011-08-07 15:04:32 +0400 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2011-08-07 15:04:32 +0400 |
commit | 60b55c4c181b1ef0cb3080cc797853c88872e748 (patch) | |
tree | 2f30cef48bc3612c4d99a83cda215a674b0e7240 /winsup/cygwin/fhandler_process.cc | |
parent | 1ae83025399d564b40eebf64539e1da320fe311b (diff) |
* fhandler_process.cc (format_process_maps): Actually print info about
the application heap of the printed process, not of the current process.
Diffstat (limited to 'winsup/cygwin/fhandler_process.cc')
-rw-r--r-- | winsup/cygwin/fhandler_process.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/winsup/cygwin/fhandler_process.cc b/winsup/cygwin/fhandler_process.cc index 220d62456..a4df4d666 100644 --- a/winsup/cygwin/fhandler_process.cc +++ b/winsup/cygwin/fhandler_process.cc @@ -842,6 +842,11 @@ format_process_maps (void *data, char *&destbuf) pinfo proc_pinfo; if (ReadProcessMemory (proc, &myself, &proc_pinfo, sizeof proc_pinfo, NULL)) proc_pinfo.preserve (); + /* The heap info on the cygheap is also in the same spot in each process + because the cygheap is located at the same address. */ + user_heap_info user_heap; + ReadProcessMemory (proc, &cygheap->user_heap, &user_heap, + sizeof user_heap, NULL); _off64_t len = 0; @@ -976,7 +981,7 @@ format_process_maps (void *data, char *&destbuf) strcpy (posix_modname, "[cygwin-user-shared]"); else if (cur.abase == (char *) *proc_pinfo) strcpy (posix_modname, "[procinfo]"); - else if (cur.abase == cygheap->user_heap.base) + else if (cur.abase == user_heap.base) strcpy (posix_modname, "[heap]"); else posix_modname[0] = 0; |