Bug 1547 - PtraceByteBuffer has to know word size
Summary: PtraceByteBuffer has to know word size
Status: RESOLVED WONTFIX
Alias: None
Product: frysk
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
: P1 normal
Target Milestone: ---
Assignee: Unassigned
URL:
Keywords:
Depends on:
Blocks: 2231 3119
  Show dependency treegraph
 
Reported: 2005-10-25 19:44 UTC by Jeff Johnston
Modified: 2007-11-05 06:48 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 Jeff Johnston 2005-10-25 19:44:14 UTC
The PtraceByteBuffer peek and poke routines expect to be reading/writing an int.
 They also align addresses to an int boundary.  This does not work on AMD64, for
example, where a long-aligned address is expected and a word is actually 64-bits
(or a C long).  Trying to read on a 32-bit boundary that is not a 64-bit
boundary results in a ptrace error to occur.  If PtraceByteBuffer uses the word
size, then it can make the proper call.
Comment 1 Zhao Shujing 2007-11-05 06:48:20 UTC
From the following ChangeLog, frysk.proc.live.AddressSpaceByteBuffer.java is the
current java wrapper to do the peek and poke routine. It use
frysk.sys.Ptrace.AddressSpace to do actual work. CNI implementation for
frysk.sys.Ptrace.AddressSpace reads and writes long.

Index: frysk-core/frysk/proc/live/ChangeLog
2007-06-18  Andrew Cagney  <cagney@redhat.com>

        * Rename package frysk.proc.ptrace to frysk.proc.live.

date: 2007/04/15 22:56:46;  author: cagney;  state: Exp;  lines: +4 -0
Index: frysk-core/frysk/proc/ChangeLog
2007-04-15  Andrew Cagney  <cagney@redhat.com>

        * IsaPowerPC.java: Replace frysk.sys.PtraceByteBuffer with
        frysk.proc.ptrace.AddressSpaceByteBuffer.
        * LinuxPtraceTask.java: Ditto.

Index: frysk-imports/frysk/sys/ChangeLog
2007-04-15  Andrew Cagney  <cagney@redhat.com>

        * PtraceServer.java (peek, poke): Delete.
        * Ptrace.java (peek, poke): Delete.
        * cni/Ptrace.cxx: Update.
        * PtraceByteBuffer.java: Delete.
        * cni/PtraceByteBuffer.cxx (peek): Delete.
        * TestPtraceByteBuffer.java: Delete.
        * StressMapRead.java: Delete.