All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mike Frysinger <vapier-aBrp7R+bbdUdnm+yROfE0A@public.gmane.org>
To: Michael Kerrisk <mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: [PATCH] proc(5): maps: document the "pathname" field
Date: Fri, 15 Mar 2013 17:47:14 -0400	[thread overview]
Message-ID: <1363384034-11106-1-git-send-email-vapier@gentoo.org> (raw)

Add some info for people who aren't "in the know".

Signed-off-by: Mike Frysinger <vapier-aBrp7R+bbdUdnm+yROfE0A@public.gmane.org>
---
 man5/proc.5 | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/man5/proc.5 b/man5/proc.5
index cd41e06..6755f62 100644
--- a/man5/proc.5
+++ b/man5/proc.5
@@ -367,6 +367,30 @@ p = private (copy on write)
 0 indicates that no inode is associated with the memory region,
 as the case would be with BSS (uninitialized data).
 
+"pathname" will be usually be the file that is backing the mapping.  For ELF
+files, You can easily coordinate with the "offset" field by looking at the
+Offset field in the ELF's program headers (`readelf -l`).
+
+There are additional helpful pseudo paths:
+
+.nf
+.in +5
+[stack]   = The initial process's (aka the main thread's) stack
+[stack:#] = A thread's stack (where the # is the thread's TID)
+[vdso]    = The virtual dynamically linked shared object
+[heap]    = The process's heap (no joke!)
+.in
+.fi
+
+The TID syntax was added in Linux 3.4.  It corresponds to the
+.IR /proc/[pid]/task/[TID]/
+path.
+
+If the field is blank, this is an anonymous mapping as obtained via the
+.BR mmap (2)
+function.  There is no easy way to coordinate this back to a process's
+source short of running it through gdb/strace/etc...  Sorry!
+
 Under Linux 2.0 there is no field giving pathname.
 .TP
 .I /proc/[pid]/mem
-- 
1.8.1.2

--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

             reply	other threads:[~2013-03-15 21:47 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-15 21:47 Mike Frysinger [this message]
     [not found] ` <1363384034-11106-1-git-send-email-vapier-aBrp7R+bbdUdnm+yROfE0A@public.gmane.org>
2013-03-17  8:57   ` [PATCH] proc(5): maps: document the "pathname" field Michael Kerrisk (man-pages)
     [not found]     ` <CAKgNAkhr2msKaPOJVZq2Pe2vaWGQQTSmQTLdPQ5wRVTcbYVxkw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-03-17 15:18       ` Mike Frysinger
2013-03-17 10:16   ` Michael Kerrisk (man-pages)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1363384034-11106-1-git-send-email-vapier@gentoo.org \
    --to=vapier-abrp7r+bbdudnm+yrofe0a@public.gmane.org \
    --cc=linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.