Bug 4141 - abstract frysk.sys.Ptrace server thread
Summary: abstract frysk.sys.Ptrace server thread
Status: RESOLVED FIXED
Alias: None
Product: frysk
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: ---
Assignee: Andrew Cagney
URL:
Keywords:
Depends on:
Blocks: 3727
  Show dependency treegraph
 
Reported: 2007-03-06 19:32 UTC by Andrew Cagney
Modified: 2007-04-02 20:35 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Cagney 2007-03-06 19:32:45 UTC
The server thread in frysk.sys.Ptrace should be generally accessable so that
arbitrary code can be executed in that thread's context.
Comment 1 Andrew Cagney 2007-04-02 21:35:30 UTC
Created frysk.sys.Server, and all code refactored to use it:

2007-03-27  Andrew Cagney  <cagney@redhat.com>

        * Ptrace.java: Re-implement using Server.java.
        (pt): Delete.
        (getPt): Delete.
        (requestExecute): Delete.
        (PtraceThread): Delete.
        (PtraceRequest): New.
        (ForkRequest): New.
        (child): Use RequestFork.
        (request): New.
        (peek, poke): Call request.
        * cni/Ptrace.cxx: Update.
        (_callPtrace): Delete.
        (singleStep, cont, sysCall, getEventMsg, peekRegisters,
        pokeRegisters, setOptions, optionTraceClone): Use request.
        (reopen): Delete.
        (child): Delete.
        (peek, poke): Delete.

        * Ptrace.java (peek, poke): Change addr type to gnu.gcj.RawData.
        Make methods package local.
        * cni/Ptrace.cxx: Update.
        * cni/PtraceByteBuffer.cxx (peek, poke): Update.

        * Server.java (Server): Add private constructor.
        (Op): Delete, use Execute.
        (exception): Add member.
        (execute): When exception non-NULL, re-throw.
        (run): Catch and save RuntimeException-s.
        TestServer.java: Update.
        (testThrow): Add.

2007-03-26  Andrew Cagney  <cagney@redhat.com>

        * Server.java: New file.
        * TestServer.java: New tests.