Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F143728218
D7117.id54425.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D7117.id54425.diff
View Options
Index: head/sys/kern/imgact_elf.c
===================================================================
--- head/sys/kern/imgact_elf.c
+++ head/sys/kern/imgact_elf.c
@@ -1874,6 +1874,7 @@
*cp = ' ';
}
}
+ psinfo->pr_pid = p->p_pid;
sbuf_bcat(sb, psinfo, sizeof(*psinfo));
free(psinfo, M_TEMP);
}
Index: head/sys/sys/procfs.h
===================================================================
--- head/sys/sys/procfs.h
+++ head/sys/sys/procfs.h
@@ -49,7 +49,10 @@
/*
* The parenthsized numbers like (1) indicate the minimum version number
- * for which each element exists in the structure.
+ * for which each element exists in the structure. The version number is
+ * not bumped when adding new fields to the end, only if the meaning of
+ * an existing field changes. Additional fields are annotated as (1a),
+ * (1b), etc. to indicate the groupings of additions.
*/
#define PRSTATUS_VERSION 1 /* Current version of prstatus_t */
@@ -61,7 +64,7 @@
size_t pr_fpregsetsz; /* sizeof(fpregset_t) (1) */
int pr_osreldate; /* Kernel version (1) */
int pr_cursig; /* Current signal (1) */
- pid_t pr_pid; /* Process ID (1) */
+ pid_t pr_pid; /* LWP (Thread) ID (1) */
gregset_t pr_reg; /* General purpose registers (1) */
} prstatus_t;
@@ -78,6 +81,7 @@
size_t pr_psinfosz; /* sizeof(prpsinfo_t) (1) */
char pr_fname[PRFNAMESZ+1]; /* Command name, null terminated (1) */
char pr_psargs[PRARGSZ+1]; /* Arguments, null terminated (1) */
+ pid_t pr_pid; /* Process ID (1a) */
} prpsinfo_t;
typedef struct thrmisc {
@@ -104,6 +108,7 @@
uint32_t pr_psinfosz;
char pr_fname[PRFNAMESZ+1];
char pr_psargs[PRARGSZ+1];
+ int32_t pr_pid;
} prpsinfo32_t;
struct thrmisc32 {
Index: head/usr.bin/gcore/elfcore.c
===================================================================
--- head/usr.bin/gcore/elfcore.c
+++ head/usr.bin/gcore/elfcore.c
@@ -586,6 +586,7 @@
} else
strlcpy(psinfo->pr_psargs, kip.ki_comm,
sizeof(psinfo->pr_psargs));
+ psinfo->pr_pid = pid;
*sizep = sizeof(*psinfo);
return (psinfo);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Feb 1, 9:25 AM (20 h, 29 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28331481
Default Alt Text
D7117.id54425.diff (2 KB)
Attached To
Mode
D7117: Include process IDs in core dumps.
Attached
Detach File
Event Timeline
Log In to Comment