summaryrefslogtreecommitdiff
path: root/usr/src/man/man3proc
diff options
context:
space:
mode:
authorDan McDonald <danmcd@joyent.com>2020-11-17 14:48:44 -0500
committerDan McDonald <danmcd@joyent.com>2020-11-17 14:48:44 -0500
commit2d6415143e9c1044d04ebf846f72f232883413cb (patch)
tree555fae9f2f89b0c9a4d8c4bbd66b02b70ded9fc7 /usr/src/man/man3proc
parent5a1b3228538dfeb09e05cc2bdfad707ee4d698d7 (diff)
parent5a0af8165ce9590e7a18f1ef4f9badc4dd72c6e6 (diff)
downloadillumos-joyent-release-20201119.tar.gz
[illumos-gate merge]release-20201119
commit 5a0af8165ce9590e7a18f1ef4f9badc4dd72c6e6 13274 enable -fstack-protector-strong by default in user land commit 6a817834d81cc75ce12d0d393320837b1fec1e85 5788 Want support for GCC's stack protector in libc commit 350ffdd54baf880f440ddf9697666e283894ded1 13273 want upanic(2) commit 7fdea60d55a95f0e46066fd021c4ef1b1321bafc 13300 mlxcx_cq_setup() doesn't take required locks for ASSERTs Merge notes: - Manifest changes to match package changes (including shipping libssp_ns.a) - Modified lx_vdso tools to not include SSP, to match other build-only tools.
Diffstat (limited to 'usr/src/man/man3proc')
-rw-r--r--usr/src/man/man3proc/Makefile4
-rw-r--r--usr/src/man/man3proc/Pupanic.3proc103
2 files changed, 107 insertions, 0 deletions
diff --git a/usr/src/man/man3proc/Makefile b/usr/src/man/man3proc/Makefile
index 422bc9a517..a0963ce22e 100644
--- a/usr/src/man/man3proc/Makefile
+++ b/usr/src/man/man3proc/Makefile
@@ -161,6 +161,7 @@ MANFILES= \
Psync.3proc \
Psysentry.3proc \
Puname.3proc \
+ Pupanic.3proc \
Pupdate_maps.3proc \
Pupdate_syms.3proc \
Pwrite.3proc \
@@ -265,6 +266,7 @@ MANLINKS= \
Psymbol_iter_by_lmid.3proc \
Psymbol_iter_by_name.3proc \
Psysexit.3proc \
+ Pupanic_free.3proc \
Punsetflags.3proc \
Pwait.3proc \
Pxcreate.3proc \
@@ -383,6 +385,8 @@ Lclearsig.3proc := LINKSRC = Pclearsig.3proc
Lsetrun.3proc := LINKSRC = Psetrun.3proc
+Pupanic_free.3proc := LINKSRC = Pupanic.3proc
+
Pzonepath.3proc := LINKSRC = Pzonename.3proc
Pzoneroot.3proc := LINKSRC = Pzonename.3proc
diff --git a/usr/src/man/man3proc/Pupanic.3proc b/usr/src/man/man3proc/Pupanic.3proc
new file mode 100644
index 0000000000..975ca08eec
--- /dev/null
+++ b/usr/src/man/man3proc/Pupanic.3proc
@@ -0,0 +1,103 @@
+.\"
+.\" This file and its contents are supplied under the terms of the
+.\" Common Development and Distribution License ("CDDL"), version 1.0.
+.\" You may only use this file in accordance with the terms of version
+.\" 1.0 of the CDDL.
+.\"
+.\" A full copy of the text of the CDDL should have accompanied this
+.\" source. A copy of the CDDL is also available via the Internet at
+.\" http://www.illumos.org/license/CDDL.
+.\"
+.\"
+.\" Copyright 2020 Oxide Comptuer Company
+.\"
+.Dd October 31, 2020
+.Dt PUPANIC 3PROC
+.Os
+.Sh NAME
+.Nm Pupanic ,
+.Nm Pupanic_free
+.Nd get upanic information from a core file
+.Sh LIBRARY
+.Lb libproc
+.Sh SYNOPSIS
+.In libproc.h
+.Ft int
+.Fo Pupanic
+.Fa "struct ps_prochandle *P"
+.Fa "prupanic_t **prup"
+.Fc
+.Ft void
+.Fo Pupanic_free
+.Fa "prupanic_t *pru"
+.Fc
+.Sh DESCRIPTION
+The
+.Fn Pupanic
+function copies the contents of the
+.Dv NT_UPANIC
+elf note from the process handle
+.Fa P
+that corresponds to a core file into
+.Fa prup .
+.Pp
+The library will allocate the memory needed for a
+.Ft prupanic_t
+and it is the caller's responsibility to release it by calling the
+.Fn Pupanic_free
+function with the returned data when they are done with the data.
+.Pp
+The allocated data stored in
+.Fa prup
+has a lifetime independent of the underlying process handle
+.Fa P .
+That is, it is safe to continue using it whether the process handle is
+still valid or has been released with
+.Xr Pfree 3PROC .
+.Pp
+If the process handle doesn't correspond to a core file or this note is
+not present in the core file, then the
+.Fn Pupanic
+function will fail.
+.Sh RETURN VALUES
+Upon successful completion, the
+.Fn Pupanic
+function returns
+.Sy 0
+and stores the allocated
+.Ft prupanic_t
+structure in
+.Fa prup .
+Otherwise
+.Sy -1
+is returned
+and
+.Vt errno
+is set to indicate the error.
+.Sh ERRORS
+The
+.Fn Pupanic
+function will fail if:
+.Bl -tag -width Er
+.It Er ENODATA
+The process handle
+.Fa P
+does not correspond to a core file.
+.It Er ENOENT
+The core file does not have a
+.Dv NT_UPANIC
+elf note.
+.It Er EAGAIN, Er ENOMEM
+An underlying memory allocation failed.
+.El
+.Sh INTERFACE STABILITY
+.Sy Uncommitted
+.Sh MT-LEVEL
+See
+.Sy LOCKING
+in
+.Xr libproc 3LIB .
+.Sh SEE ALSO
+.Xr upanic 3C ,
+.Xr libproc 3LIB ,
+.Xr core 4