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.
25 .Ft "struct ps_prochandle *"
27 .Fa "const char *core"
28 .Fa "const char *aout"
32 .Ft "struct ps_prochandle *"
35 .Fa "const char *aout"
43 functions open a core file for introspection.
44 Unlike live processes, core files cannot have their state modified;
45 however, all of the functions that iterate or query state will work.
46 These functions work on all illumos core files and the core files of some other
58 function attempts to open the core file specified by
60 The system attempts to determine the path of the original executable.
63 may either be the path to that file, a path to a directory to search, or the
65 pointer, if neither is known.
66 The system will search for it and will supplement information in the core file
73 function controls how the file is opened.
76 flag is specified, then the core file will be opened with the
80 Otherwise, it will be opened
87 pointer which will store a more detailed error in the event that the
90 A human-readable form of the error can be obtained through the routine
91 .Xr Pgrab_error 3PROC .
98 Except, instead of operating on a path, it opens a handle to the core file
105 arguments are identical to those in the
109 The handle returned, from either function, is valid until it is closed
115 Upon successful completion, the
121 handle to the core file.
126 is filled in with a more detailed error message.
130 function will fail if:
137 An unexpected system error occurred while trying to open
141 indicates the system failure.
148 functions will fail if:
155 The core file referred to by either
159 is not a valid ELF core file.
161 The architecture of the core file referred to by either
165 does not match the current running system.
167 The calling process is a 32-bit process and the core file referenced by
172 refers to a 64-bit process.
174 The ELF notes present in the core file referred to by either
178 are corrupt or missing required data.
180 An unanticipated system error occurred while trying to open the core
181 file and create the handle.
184 indicates the system failure.
186 .Sh INTERFACE STABILITY
196 .Xr Pgrab_error 3PROC ,