Actions
Feature #15334
openwant ps_lwphandle-specific reg routines
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 anLgrab()
for and for the corresponding representative lwp as part of thepr_lwp
member of thestatus
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 callingLputareg()
.
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