Lines Matching defs:lwp
41 * This file implements the routines to read and write per-lwp register
49 * about an lwp in the core file, given its lwpid.
55 lwp_info_t *lwp = list_next(&core->core_lwp_head);
58 for (i = 0; i < core->core_nlwp; i++, lwp = list_next(lwp)) {
59 if (lwp->lwp_id == lwpid)
60 return (lwp);
68 * Utility function to open and read the contents of a per-lwp /proc file.
78 (void) snprintf(fname, sizeof (fname), "%s/%d/lwp/%d/%s",
92 * Get the lwpstatus_t for an lwp from either the live process or our
99 lwp_info_t *lwp;
103 * matches that of the representative lwp:
112 * of the per-lwp status file:
121 * cached lwp information and then copy out the status.
123 if (P->data != NULL && (lwp = getlwpcore(P, lwpid)) != NULL) {
124 (void) memcpy(lps, &lwp->lwp_status, sizeof (lwpstatus_t));
132 * Utility function to modify lwp registers. This is done using either the
133 * process control file or per-lwp control file as necessary.
154 * Writing the process control file writes the representative lwp.
174 * If the lwp we want is not the representative lwp, we need to
175 * open the ctl file for that specific lwp.
177 (void) snprintf(fname, sizeof (fname), "%s/%d/lwp/%d/lwpctl",
230 lwp_info_t *lwp;
247 if ((lwp = getlwpcore(P, lwpid)) != NULL && lwp->lwp_xregs != NULL) {
248 (void) memcpy(xregs, lwp->lwp_xregs, sizeof (prxregset_t));
252 if (lwp != NULL)
266 lwp_info_t *lwp;
283 if ((lwp = getlwpcore(P, lwpid)) != NULL && lwp->lwp_gwins != NULL) {
284 *gwins = *lwp->lwp_gwins;
288 if (lwp != NULL)
297 lwp_info_t *lwp;
313 if ((lwp = getlwpcore(P, lwpid)) != NULL && lwp->lwp_asrs != NULL) {
314 (void) memcpy(asrs, lwp->lwp_asrs, sizeof (asrset_t));
318 if (lwp != NULL)
335 lwp_info_t *lwp;
347 if ((lwp = getlwpcore(P, lwpid)) != NULL) {
348 (void) memcpy(lps, &lwp->lwp_psinfo, sizeof (lwpsinfo_t));
404 lwp_info_t *lwp;
405 if ((lwp = getlwpcore(P, lwpid)) == NULL)
407 addr = lwp->lwp_status.pr_ustack;
443 lwp_info_t *lwp;
444 if ((lwp = getlwpcore(P, lwpid)) == NULL)
446 ls = lwp->lwp_status;
523 lwp_info_t *lwp;
525 if ((lwp = getlwpcore(P, lwpid)) == NULL)
528 if (lwp->lwp_status.pr_altstack.ss_flags & SS_DISABLE) {
533 *stkp = lwp->lwp_status.pr_altstack;