public inbox for frysk-cvs@sourceware.org help / color / mirror / Atom feed
From: pmuldoon@sourceware.org To: frysk-cvs@sourceware.org Subject: [SCM] master: 2008-01-17 Phil Muldoon <pmuldoon@redhat.com> Date: Thu, 17 Jan 2008 17:34:00 -0000 [thread overview] Message-ID: <20080117173426.21276.qmail@sourceware.org> (raw) The branch, master has been updated via 6ec6bc5eb0b14e12428b9effdfec76a7b9179536 (commit) from 60492e907b8182e4bc2a9f27d467ef79a14dfb30 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email. - Log ----------------------------------------------------------------- commit 6ec6bc5eb0b14e12428b9effdfec76a7b9179536 Author: Phil Muldoon <pmuldoon@redhat.com> Date: Thu Jan 17 17:34:13 2008 +0000 2008-01-17 Phil Muldoon <pmuldoon@redhat.com> * LinuxCoreProc.java (constructEnhandedMetaData): Pass wordSize to SOLibMapBuilder. * LinuxExeProc.java (buildMetaData): Ditto. * SOLibMapBuilder.jav (construct): Account for 32 bit address overlapping on ld_addr relocation. ----------------------------------------------------------------------- Summary of changes: frysk-core/frysk/proc/dead/ChangeLog | 9 +++++++++ frysk-core/frysk/proc/dead/LinuxCoreProc.java | 4 ++-- frysk-core/frysk/proc/dead/LinuxExeProc.java | 2 +- frysk-core/frysk/proc/dead/SOLibMapBuilder.java | 15 +++++++++++++-- 4 files changed, 25 insertions(+), 5 deletions(-) First 500 lines of diff: diff --git a/frysk-core/frysk/proc/dead/ChangeLog b/frysk-core/frysk/proc/dead/ChangeLog index c152771..081afce 100644 --- a/frysk-core/frysk/proc/dead/ChangeLog +++ b/frysk-core/frysk/proc/dead/ChangeLog @@ -1,3 +1,12 @@ +2008-01-17 Phil Muldoon <pmuldoon@redhat.com> + + * LinuxCoreProc.java (constructEnhandedMetaData): Pass wordSize + to SOLibMapBuilder. + * LinuxExeProc.java (buildMetaData): Ditto. + * SOLibMapBuilder.jav (construct): Account for 32 bit address + overlapping on ld_addr relocation. + + 2008-01-16 Andrew Cagney <cagney@redhat.com> * DeadTask.java (getRegisterBanks()): New; add RegisterBanks to diff --git a/frysk-core/frysk/proc/dead/LinuxCoreProc.java b/frysk-core/frysk/proc/dead/LinuxCoreProc.java index 840aa11..bfd753c 100644 --- a/frysk-core/frysk/proc/dead/LinuxCoreProc.java +++ b/frysk-core/frysk/proc/dead/LinuxCoreProc.java @@ -420,14 +420,14 @@ public class LinuxCoreProc extends DeadProc { while (mapsIterator.hasNext()) { Linkmap singleLinkMap = (Linkmap) mapsIterator.next(); if ((!singleLinkMap.name.equals("")) && (!singleLinkMap.name.equals("[vdso]"))) - SOMaps.construct(new File(singleLinkMap.name),singleLinkMap.l_addr); + SOMaps.construct(new File(singleLinkMap.name),singleLinkMap.l_addr,this.getMainTask().getISA().wordSize()); if (singleLinkMap.name.equals("[vdso]")) SOMaps.buildMap(singleLinkMap.l_addr,0,true,true,true,0,singleLinkMap.name,0x1000); } // Add in case for executables maps. - SOMaps.construct(this.exefileBackEnd,0); + SOMaps.construct(this.exefileBackEnd,0,this.getMainTask().getISA().wordSize()); // Reconcile maps diff --git a/frysk-core/frysk/proc/dead/LinuxExeProc.java b/frysk-core/frysk/proc/dead/LinuxExeProc.java index 1b00342..89c38ee 100644 --- a/frysk-core/frysk/proc/dead/LinuxExeProc.java +++ b/frysk-core/frysk/proc/dead/LinuxExeProc.java @@ -124,7 +124,7 @@ public class LinuxExeProc extends DeadProc { BuildExeMaps SOMaps = new BuildExeMaps(); // Add in case for executables maps. - SOMaps.construct(this.host.exeFile, 0); + SOMaps.construct(this.host.exeFile, 0, this.getMainTask().getISA().wordSize()); } } diff --git a/frysk-core/frysk/proc/dead/SOLibMapBuilder.java b/frysk-core/frysk/proc/dead/SOLibMapBuilder.java index 2543230..930e12b 100644 --- a/frysk-core/frysk/proc/dead/SOLibMapBuilder.java +++ b/frysk-core/frysk/proc/dead/SOLibMapBuilder.java @@ -65,7 +65,7 @@ public abstract class SOLibMapBuilder * Scan the maps file found in <tt>/proc/PID/auxv</tt> building up * a list of memory maps. Return true if the scan was successful. */ - public final void construct (File clientSolib, long base_addr) + public final void construct (File clientSolib, long base_addr, int wordSize) { Elf solib = openElf(clientSolib); @@ -82,9 +82,20 @@ public abstract class SOLibMapBuilder boolean read = (pHeader.flags & ElfPHeader.PHFLAG_READABLE) > 0 ? true:false; boolean write = (pHeader.flags & ElfPHeader.PHFLAG_WRITABLE) > 0 ? true:false; boolean execute = (pHeader.flags & ElfPHeader.PHFLAG_EXECUTABLE) > 0 ? true:false; - + long mapBegin = base_addr + (pHeader.vaddr &~ (pHeader.align-1)); long mapEnd = base_addr + ((pHeader.vaddr + pHeader.memsz) + pHeader.align -1) &~ (pHeader.align-1); + + // On 32 bit systems, if a segment has been relocated ie base_addr > 0 and base_addr + vaddr is + // more than 0xffffffff then the address overlaps to 0++. As we are using a long, so it can store + // 64 bit addresses on 64 bit systems, check wordsize == 4 and if so, limit size of address space + // to 32 bits. + if (wordSize == 4) + { + mapBegin &= 0x00000000ffffffffl; + mapEnd &= 0x00000000ffffffffl; + } + long aOffset = (pHeader.offset &- pHeader.align); buildMap(mapBegin, mapEnd, read, write, execute, aOffset, clientSolib.getPath(),pHeader.align); hooks/post-receive -- frysk system monitor/debugger
reply other threads:[~2008-01-17 17:34 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20080117173426.21276.qmail@sourceware.org \ --to=pmuldoon@sourceware.org \ --cc=frysk-cvs@sourceware.org \ --cc=frysk@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).