Index: frysk-core/frysk/proc/IsaIA32.java =================================================================== RCS file: /cvs/frysk/frysk-core/frysk/proc/IsaIA32.java,v retrieving revision 1.25 diff -u -r1.25 IsaIA32.java --- frysk-core/frysk/proc/IsaIA32.java 3 Jul 2007 18:16:04 -0000 1.25 +++ frysk-core/frysk/proc/IsaIA32.java 5 Jul 2007 12:26:03 -0000 @@ -42,6 +42,7 @@ import java.util.HashMap; import java.util.Iterator; import java.util.LinkedHashMap; +import java.util.LinkedList; import java.util.List; import inua.eio.ByteOrder; import lib.unwind.RegisterX86; @@ -51,15 +52,8 @@ import frysk.proc.live.RegisterSetByteBuffer; import frysk.proc.live.AddressSpaceByteBuffer; -import lib.elf.Elf; -import lib.elf.ElfCommand; -import lib.elf.ElfException; import lib.elf.ElfEMachine; -import lib.dw.Dwarf; -import lib.dw.DwarfCommand; -import lib.dw.DwarfDie; - public class IsaIA32 implements Isa { /** @@ -293,7 +287,7 @@ */ public long getBreakpointAddress(Task task) { - long pcValue = 0; + long pcValue; pcValue = this.pc(task); pcValue = pcValue - 1; @@ -308,21 +302,15 @@ */ public List getOutOfLineAddresses(Proc proc) { - String func = "main"; - try - { - Elf elf = new Elf(proc.getExe(), ElfCommand.ELF_C_READ); - Dwarf dwarf = new Dwarf(elf, DwarfCommand.READ, null); - DwarfDie die = DwarfDie.getDecl(dwarf, func); - return die.getEntryBreakpoints(); - } - catch (ElfException ee) + LinkedList addrs = new LinkedList(); + Auxv[] auxv = proc.getAuxv (); + // Find the Auxv ENTRY data + for (int i = 0; i < auxv.length; i++) { - IllegalStateException ise; - ise = new IllegalStateException("Unable to get at " + func); - ise.initCause(ee); - throw ise; + if (auxv[i].type == inua.elf.AT.ENTRY) + addrs.add(Long.valueOf(auxv[i].val)); } + return addrs; } /** Index: frysk-core/frysk/proc/IsaPowerPC.java =================================================================== RCS file: /cvs/frysk/frysk-core/frysk/proc/IsaPowerPC.java,v retrieving revision 1.9 diff -u -r1.9 IsaPowerPC.java --- frysk-core/frysk/proc/IsaPowerPC.java 2 Jul 2007 14:40:17 -0000 1.9 +++ frysk-core/frysk/proc/IsaPowerPC.java 5 Jul 2007 12:26:03 -0000 @@ -1,6 +1,7 @@ // This file is part of the program FRYSK. // // Copyright 2006 IBM Corp. +// Copyright 2007 Red Hat Inc. // // FRYSK is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by @@ -41,6 +42,7 @@ import java.util.HashMap; import java.util.Iterator; import java.util.LinkedHashMap; +import java.util.LinkedList; import java.util.List; import inua.eio.ByteBuffer; import frysk.proc.live.AddressSpaceByteBuffer; @@ -102,7 +104,15 @@ public List getOutOfLineAddresses(Proc proc) { - throw new IllegalStateException("getOutOfLineAddresses not implemented"); + LinkedList addrs = new LinkedList(); + Auxv[] auxv = proc.getAuxv (); + // Find the Auxv ENTRY data + for (int i = 0; i < auxv.length; i++) + { + if (auxv[i].type == inua.elf.AT.ENTRY) + addrs.add(Long.valueOf(auxv[i].val)); + } + return addrs; } /** Index: frysk-core/frysk/proc/IsaX8664.java =================================================================== RCS file: /cvs/frysk/frysk-core/frysk/proc/IsaX8664.java,v retrieving revision 1.17 diff -u -r1.17 IsaX8664.java --- frysk-core/frysk/proc/IsaX8664.java 3 Jul 2007 18:16:04 -0000 1.17 +++ frysk-core/frysk/proc/IsaX8664.java 5 Jul 2007 12:26:03 -0000 @@ -42,6 +42,7 @@ import java.util.HashMap; import java.util.Iterator; import java.util.LinkedHashMap; +import java.util.LinkedList; import java.util.List; import inua.eio.ByteOrder; import inua.eio.ByteBuffer; @@ -50,16 +51,9 @@ import frysk.proc.live.RegisterSetByteBuffer; import frysk.proc.live.AddressSpaceByteBuffer; -import lib.elf.Elf; -import lib.elf.ElfCommand; -import lib.elf.ElfException; import lib.elf.ElfEMachine; import lib.unwind.RegisterAMD64; -import lib.dw.Dwarf; -import lib.dw.DwarfCommand; -import lib.dw.DwarfDie; - public class IsaX8664 implements Isa { @@ -305,21 +299,15 @@ */ public List getOutOfLineAddresses(Proc proc) { - String func = "main"; - try - { - Elf elf = new Elf(proc.getExe(), ElfCommand.ELF_C_READ); - Dwarf dwarf = new Dwarf(elf, DwarfCommand.READ, null); - DwarfDie die = DwarfDie.getDecl(dwarf, func); - return die.getEntryBreakpoints(); - } - catch (ElfException ee) + LinkedList addrs = new LinkedList(); + Auxv[] auxv = proc.getAuxv (); + // Find the Auxv ENTRY data + for (int i = 0; i < auxv.length; i++) { - IllegalStateException ise; - ise = new IllegalStateException("Unable to get at " + func); - ise.initCause(ee); - throw ise; + if (auxv[i].type == inua.elf.AT.ENTRY) + addrs.add(Long.valueOf(auxv[i].val)); } + return addrs; } /**