Lines Matching refs:lwp
35 * This file implements the routines to read and write per-lwp register
43 * about an lwp in the core file, given its lwpid.
48 lwp_info_t *lwp = list_next(&P->core->core_lwp_head);
51 for (i = 0; i < P->core->core_nlwp; i++, lwp = list_next(lwp)) {
52 if (lwp->lwp_id == lwpid)
53 return (lwp);
61 * Utility function to open and read the contents of a per-lwp /proc file.
71 (void) snprintf(fname, sizeof (fname), "%s/%d/lwp/%d/%s",
85 * Get the lwpstatus_t for an lwp from either the live process or our
92 lwp_info_t *lwp;
96 * matches that of the representative lwp:
105 * of the per-lwp status file:
114 * cached lwp information and then copy out the status.
116 if (P->core != NULL && (lwp = getlwpcore(P, lwpid)) != NULL) {
117 (void) memcpy(lps, &lwp->lwp_status, sizeof (lwpstatus_t));
125 * Utility function to modify lwp registers. This is done using either the
126 * process control file or per-lwp control file as necessary.
147 * Writing the process control file writes the representative lwp.
167 * If the lwp we want is not the representative lwp, we need to
168 * open the ctl file for that specific lwp.
170 (void) snprintf(fname, sizeof (fname), "%s/%d/lwp/%d/lwpctl",
222 lwp_info_t *lwp;
239 if ((lwp = getlwpcore(P, lwpid)) != NULL && lwp->lwp_xregs != NULL) {
240 (void) memcpy(xregs, lwp->lwp_xregs, sizeof (prxregset_t));
244 if (lwp != NULL)
259 lwp_info_t *lwp;
276 if ((lwp = getlwpcore(P, lwpid)) != NULL && lwp->lwp_gwins != NULL) {
277 *gwins = *lwp->lwp_gwins;
281 if (lwp != NULL)
290 lwp_info_t *lwp;
306 if ((lwp = getlwpcore(P, lwpid)) != NULL && lwp->lwp_asrs != NULL) {
307 (void) memcpy(asrs, lwp->lwp_asrs, sizeof (asrset_t));
311 if (lwp != NULL)
329 lwp_info_t *lwp;
353 if ((lwp = getlwpcore(P, lwpid)) != NULL && lwp->lwp_cxregs != NULL) {
354 (void) memcpy(cxregs, lwp->lwp_cxregs, cxregsize);
355 lwp->lwp_cxsize = cxregsize;
359 if (lwp != NULL)
404 lwp_info_t *lwp;
416 if ((lwp = getlwpcore(P, lwpid)) != NULL) {
417 (void) memcpy(lps, &lwp->lwp_psinfo, sizeof (lwpsinfo_t));
440 lwp_info_t *lwp;
441 if ((lwp = getlwpcore(P, lwpid)) == NULL)
443 addr = lwp->lwp_status.pr_ustack;
479 lwp_info_t *lwp;
480 if ((lwp = getlwpcore(P, lwpid)) == NULL)
482 ls = lwp->lwp_status;
559 lwp_info_t *lwp;
561 if ((lwp = getlwpcore(P, lwpid)) == NULL)
564 if (lwp->lwp_status.pr_altstack.ss_flags & SS_DISABLE) {
569 *stkp = lwp->lwp_status.pr_altstack;