Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2011-08-07 15:04:32 +0400
committerCorinna Vinschen <corinna@vinschen.de>2011-08-07 15:04:32 +0400
commit60b55c4c181b1ef0cb3080cc797853c88872e748 (patch)
tree2f30cef48bc3612c4d99a83cda215a674b0e7240
parent1ae83025399d564b40eebf64539e1da320fe311b (diff)
* fhandler_process.cc (format_process_maps): Actually print info about
the application heap of the printed process, not of the current process.
-rw-r--r--winsup/cygwin/ChangeLog5
-rw-r--r--winsup/cygwin/fhandler_process.cc7
2 files changed, 11 insertions, 1 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 0c83599e3..665f5b9ce 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,8 @@
+2011-08-07 Corinna Vinschen <corinna@vinschen.de>
+
+ * fhandler_process.cc (format_process_maps): Actually print info about
+ the application heap of the printed process, not of the current process.
+
2011-08-04 Corinna Vinschen <corinna@vinschen.de>
* net.cc (socketpair): Release sb0 if there's no space left for sb1.
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;