aboutsummaryrefslogtreecommitdiff
path: root/winsup/cygwin/fhandler_process.cc
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2011-08-07 11:04:32 +0000
committerCorinna Vinschen <corinna@vinschen.de>2011-08-07 11:04:32 +0000
commit60b55c4c181b1ef0cb3080cc797853c88872e748 (patch)
tree2f30cef48bc3612c4d99a83cda215a674b0e7240 /winsup/cygwin/fhandler_process.cc
parent1ae83025399d564b40eebf64539e1da320fe311b (diff)
downloadnewlib-60b55c4c181b1ef0cb3080cc797853c88872e748.zip
newlib-60b55c4c181b1ef0cb3080cc797853c88872e748.tar.gz
newlib-60b55c4c181b1ef0cb3080cc797853c88872e748.tar.bz2
* 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.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/winsup/cygwin/fhandler_process.cc b/winsup/cygwin/fhandler_process.cc
index 220d624..a4df4d6 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;