2 .\" This file and its contents are supplied under the terms of the
3 .\" Common Development and Distribution License ("CDDL"), version 1.0.
4 .\" You may only use this file in accordance with the terms of version
7 .\" A full copy of the text of the CDDL should have accompanied this
8 .\" source. A copy of the CDDL is also available via the Internet at
9 .\" http://www.illumos.org/license/CDDL.
12 .\" Copyright 2015 Joyent, Inc.
19 .Nd grab and inspect an ELF object
23 .Ft struct ps_prochandle
25 .Fa "const char *fname"
31 function creates a handle to the ELF object contained in file
33 This handle is considered an
35 handle, it allows one to inspect aspects of the ELF contents present in
36 the handle, for example obtaining CTF information and looking up
39 There is no running state associated with this handle nor can
40 there be. If one intends to control a running process or create a
45 respectively. To inspect a core file use
46 .Xr Pgrab_core 3PROC .
52 pointer which will store a more detailed error in the event that
54 fails. A human-readable form of the error can be obtained with
55 .Xr Pgrab_error 3PROC .
57 When finished with the returned handle,
59 must be called to clean up resources associated with it.
61 Upon successful completion, the
63 function returns a control handle to the process. Otherwise,
67 is filled in with an error code.
69 .Bl -tag -width Er -offset indent
73 failure occurred while processing the file named by
78 is not a valid ELF file.
84 An unanticipated system error occurred while trying to grab the
87 and create the handle.
90 indicates the system failure.
92 .Sh INTERFACE STABILITY
101 .Xr Pgrab_core 3PROC ,
102 .Xr Pgrab_error 3PROC ,
103 .Xr Pgrab_file 3PROC ,