Summary: | LinuxTask does not expose full Task memory | ||
---|---|---|---|
Product: | frysk | Reporter: | Phil Muldoon <pmuldoon> |
Component: | general | Assignee: | Unassigned <frysk-bugzilla> |
Status: | RESOLVED DUPLICATE | ||
Severity: | normal | CC: | mark, qiyaoltc, timoore, zhengyo |
Priority: | P2 | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Host: | Target: | ||
Build: | Last reconfirmed: | ||
Bug Depends on: | |||
Bug Blocks: | 2243, 3387, 1537, 4313 |
Description
Phil Muldoon
2006-10-18 18:12:52 UTC
IMO, Isa only provides some primitives to access ISA information, so how about setup map still in LinuxTask.java per wordSize? Here is a patch, Index: frysk-core/frysk/proc/LinuxTask.java =================================================================== RCS file: /cvs/frysk/frysk-core/frysk/proc/LinuxTask.java,v retrieving revision 1.38 diff -u -r1.38 LinuxTask.java --- frysk-core/frysk/proc/LinuxTask.java 11 Oct 2006 21:33:01 -0000 1.38 +++ frysk-core/frysk/proc/LinuxTask.java 20 Oct 2006 06:22:39 -0000 @@ -66,7 +66,13 @@ ByteOrder byteOrder = getIsa().getByteOrder(); // XXX: For writing at least, PTRACE must be used as /proc/mem // cannot be written to. - memory = new PtraceByteBuffer(id.id, PtraceByteBuffer.Area.DATA, + // For 64-bit address space. + if (getIsa().getWordSize() == 8) + memory = new PtraceByteBuffer(id.id, PtraceByteBuffer.Area.DATA, + 0x7fffffffffffffffl); + // For 32-bit address space. + else + memory = new PtraceByteBuffer(id.id, PtraceByteBuffer.Area.DATA, 0xffffffffl); memory.order(byteOrder); registerBank = getIsa().getRegisterBankBuffers(id.id); That would be good, too. Right now I cannot get very many core maps on x86_64 because I get buffer underflows. Your patch fixes that on x86_64 at least. I'd be happy to see it in CVS. Any objections Andrew? The change is ok as a workaround, however it still leaves half of 64-bit memory inaccessable. Likely bignum's are needed for that. Check in the patch in comment#1 as a workaround. 2006-10-24 Yao Qi <qiyaoltc@cn.ibm.com> * LinuxTask.java (Task): Enlarge the boundary of PtraceByteBuffer for 64-bit address space. Workaround committed. See #1537 for ultimate fix It seems that on FC6, vDSO is now mapped at the end of the address space on x86_64 systems. Not sure if that is with some processes, or all. A possible fix here would be to use BigIntegers instead of longs. As a note, as this is the vDSO segments that are affected, backtraces will be affected, as well as fcore dumps. |