1 POBJNAME(3PROC)        Process Control Library Functions       POBJNAME(3PROC)
   2 
   3 NAME
   4      Pobjname, Pobjname_resolved - turn a virtual address into its mapped
   5      object
   6 
   7 LIBRARY
   8      Process Control Library (libproc, -lproc)
   9 
  10 SYNOPSIS
  11      #include <libproc.h>
  12 
  13      char *
  14      Pobjname(struct ps_prochandle *P, uintptr_t addr, char *buffer,
  15          size_t bufsize);
  16 
  17      char *
  18      Pobjname_resolved(struct ps_prochandle *P, uintptr_t addr, char *buffer,
  19          size_t bufsize);
  20 
  21 DESCRIPTION
  22      The Pobjname() and Pobjname_resolved() functions attempt to determine the
  23      underlying mapped object that contains the virtual address addr in the
  24      process handle P.
  25 
  26      A program consists of multiple memory mappings.  Some are provided by the
  27      system, such as the stack and the heap.  While others are created through
  28      explicit calls to mmap(2) or brought in by the run-time link-editor due
  29      to dependencies specified in binaries and libraries.
  30 
  31      If addr is contained in a mapping, then up to bufsize characters,
  32      including the null terminator, of the name of the corresponding object
  33      will be written into buffer.  The Pobjname_resolved() function attempts
  34      to resolve the object to a full file system path.  If the full file-
  35      system path cannot be determined, then it will fall back to the name that
  36      the run-time link-editor has for that mapping, which is the behavior of
  37      Pobjname().
  38 
  39 RETURN VALUES
  40      Upon successful completion, the Pobjname() and Pobjname_resolved()
  41      functions return buffer.  Otherwise, NULL is returned to indicate the
  42      object name could not be found.
  43 
  44 INTERFACE STABILITY
  45      Uncommitted
  46 
  47 MT-LEVEL
  48      See LOCKING in libproc(3LIB).
  49 
  50 SEE ALSO
  51      mmap(2), libproc(3LIB), Pobject_iter(3PROC), proc(4)
  52 
  53 illumos                          May 11, 2016                          illumos