Hi Philiplle,

On 8/2/23 07:41, Philippe Mathieu-Daudé wrote:
On 2/8/23 01:27, Helge Deller wrote:
..
Show 32- and 64-bit pointers with 8 digits and leading zeros (%08x/%08lx).
For 64-bit we could use %16lx, but we mimic the Linux kernel, which shows
even 64-bit addresses with %08lx.

You are describing 3 changes, do you mind splitting in 3 patches?

Yes, will do...

@@ -8090,14 +8091,18 @@ static int open_self_maps_1(CPUArchState *cpu_env, int 
fd, bool smaps)
                  continue;
              }

+            path = e->path;
+
+            if (ts->heap_base && h2g(min) == ts->heap_base) {
+                path = "[heap]";
+            }

Patch #3 but see below,

Ok...but (see below)...

  #ifdef TARGET_HPPA
              if (h2g(max) == ts->info->stack_limit) {
  #else
              if (h2g(min) == ts->info->stack_limit) {
  #endif
                  path = "[stack]";

                } else if (ts->heap_base && h2g(min) == ts->heap_base) {
                     path = "[heap]";


You can't put it into the "else" part here... then heap will never show up
(as heap and stack often share the same region).

Since "heap" is logically at smaller address than stack, I moved the
hunk above the "stack" part.
-            } else {
-                path = e->path;
              }

              count = dprintf(fd, TARGET_ABI_FMT_ptr "-" TARGET_ABI_FMT_ptr

Thanks for the review!
Helge

Reply via email to