* ptrace task state logic cleanup
@ 2007-06-19 12:30 Mark Wielaard
0 siblings, 0 replies; only message in thread
From: Mark Wielaard @ 2007-06-19 12:30 UTC (permalink / raw)
To: Mike Cvet; +Cc: frysk
[-- Attachment #1: Type: text/plain, Size: 2023 bytes --]
Hi Mike,
Yesterday evening on irc we discussed some troubles with Instruction
observers for newly started processes. Going over the ptrace task state
machine for my breakpoint stepping work I cleaned up the logic a little
to have all state transitions into any Running state go through the same
Running.sendContinue() method removing a couple corner cases where the
first continue of a Task might miss the step or signal continue.
LinuxTaskState now also explicitly checks the syscall observers
installed instead of keeping its own state which might (theoretically, I
haven't actually seen this happen) get out of sync, which simplifies the
logic a lot.
This might not actually fix your issue since if I understood correctly
it was that the Task wasn't getting out of the blocked state and none of
the logic changes with respect to that. But the code should be more
clean and consistent which might help tracking down the issue.
Cheers,
Mark
2007-06-19 Mark Wielaard <mwielaard@redhat.com
* LinuxTaskState.java (clonedState): No more syscallRunning and
inSyscallRunningTraced.
(transitionToRunningState): Use Running.sendContinue() return value.
(attemptContinue): Likewise.
(blockedOffspring.handleUnblock): Likewise.
(Running.syscalltracing): Removed.
(Running): Removed syscalltracing argument.
(sendContinue): Return new state. Check number of syscallObservers.
(handleSignaledEvent): Return sendContinue value.
(handleStoppedEvent(: Likewise.
(handleTerminatingEvent): Likewise.
(handleExecedEvent): Simplify logic, don't check observer, but use
sendContinue.
(handleClonedEvent): Return sendContinue value.
(handleForkedEvent): Likewise.
(handleTrappedEvent): Likewise.
(handleSyscalledEvent): Check number of syscallObservers and return
sendContinue value.
(syscallRunning): Removed.
(inSyscallRunningTraced): Removed.
(BlockedSignal.handleUnblock): Return sendContinue value.
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2007-06-19 11:46 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-06-19 12:30 ptrace task state logic cleanup Mark Wielaard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).