Project

General

Profile

Actions

Feature #15334

open

want ps_lwphandle-specific reg routines

Added by Robert Mustacchi 2 months ago. Updated 2 months ago.

Status:
New
Priority:
Normal
Category:
lib - userland libraries
Start date:
Due date:
% Done:

0%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:
External Bug:

Description

Today libproc(3PROC) provides routines for getting at the registers of a given thread within a proccess, through routines like Plwp_getregs(), Plwp_getfpregs(), and Plwp_getxregs(). There are two caveats wit these as they stand right now:

  • They require the entire process to be stopped before you can read from them. This is a larger requirement than /proc requires. It only needs an individual thread to be stopped.
  • Internally, libproc caches the state of the lwpstatus file for individual threads that one has performed an Lgrab() for and for the corresponding representative lwp as part of the pr_lwp member of the status file. While the latter is kept up to date with writes that are done, the thread-specific handles are not. In particular a thread could have had outstanding changes to its general purpose registers as a result of someone calling Lputareg().

This change introduces analogues to the Plwp_getXXX and Plwp_setXXX functions in the form of LgetXXX and LsetXXX. It also ensures that the thread handles are updated to cover cache invalidations and that everything is synced out.

Actions

Also available in: Atom PDF