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.
24 .Ft "struct ps_prochandle *"
26 .Fa "const char *core"
27 .Fa "const char *aout"
31 .Ft "struct ps_prochandle *"
34 .Fa "const char *aout"
42 functions open a core file for introspection.
43 Unlike live processes, core files cannot have their state modified;
44 however, all of the functions that iterate or query state will work.
45 These functions work on all illumos core files and the core files of some other
57 function attempts to open the core file specified by
59 The system attempts to determine the path of the original executable.
62 may either be the path to that file, a path to a directory to search, or the
64 pointer, if neither is known.
65 The system will search for it and will supplement information in the core file
72 function controls how the file is opened.
75 flag is specified, then the core file will be opened with the
79 Otherwise, it will be opened
86 pointer which will store a more detailed error in the event that the
89 A human-readable form of the error can be obtained through the routine
90 .Xr Pgrab_error 3PROC .
97 Except, instead of operating on a path, it opens a handle to the core file
104 arguments are identical to those in the
108 The handle returned, from either function, is valid until it is closed
114 Upon successful completion, the
120 handle to the core file.
125 is filled in with a more detailed error message.
129 function will fail if:
136 An unexpected system error occurred while trying to open
140 indicates the system failure.
147 functions will fail if:
154 The core file referred to by either
158 is not a valid ELF core file.
160 The architecture of the core file referred to by either
164 does not match the current running system.
166 The calling process is a 32-bit process and the core file referenced by
171 refers to a 64-bit process.
173 The ELF notes present in the core file referred to by either
177 are corrupt or missing required data.
179 An unanticipated system error occurred while trying to open the core
180 file and create the handle.
183 indicates the system failure.
185 .Sh INTERFACE STABILITY
195 .Xr Pgrab_error 3PROC ,