public inbox for frysk-cvs@sourceware.org
help / color / mirror / Atom feed
From: cagney@sourceware.org
To: frysk-cvs@sourceware.org
Subject: [SCM]  master: frysk-core/frysk/bindir/ChangeLog
Date: Tue, 19 Feb 2008 16:19:00 -0000	[thread overview]
Message-ID: <20080219161953.17129.qmail@sourceware.org> (raw)

The branch, master has been updated
       via  06cbed2bceaedb7beb6719a3395f48b21ea279ef (commit)
      from  764c4238327cee1cd0bb5f682d7cef444e14e0f9 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email.

- Log -----------------------------------------------------------------
commit 06cbed2bceaedb7beb6719a3395f48b21ea279ef
Author: Andrew Cagney <cagney@redhat.com>
Date:   Tue Feb 19 11:15:44 2008 -0500

    frysk-core/frysk/bindir/ChangeLog
    2008-02-19  Andrew Cagney  <cagney@redhat.com>
    
    	* TestFstep.java: Update to match lib.dwfl.Elf.
    
    frysk-core/frysk/debuginfo/ChangeLog
    2008-02-19  Andrew Cagney  <cagney@redhat.com>
    
    	* DebugInfo.java: Update to match lib.dwfl.Elf.
    
    frysk-core/frysk/dom/ChangeLog
    2008-02-19  Andrew Cagney  <cagney@redhat.com>
    
    	* DOMCommon.java: Update to match lib.dwfl.File.
    
    frysk-core/frysk/ftrace/ChangeLog
    2008-02-19  Andrew Cagney  <cagney@redhat.com>
    
    	* TestMappingGuard.java (performTestAllLibraiesGetDetected()):
    	Make private.
    	* ObjectFile.java: Update to match lib.dwfl.Elf.
    
    frysk-core/frysk/isa/ChangeLog
    2008-02-19  Andrew Cagney  <cagney@redhat.com>
    
    	* ElfMap.java: Update to match lib.dwfl.
    
    frysk-core/frysk/isa/corefiles/ChangeLog
    2008-02-19  Andrew Cagney  <cagney@redhat.com>
    
    	* IA32LinuxElfCorefile.java: Update to match lib.dwfl.
    	* X8664LinuxElfCorefile.java: Ditto.
    	* PPC64LinuxElfCorefile.java: Ditto.
    	* PPC32LinuxElfCorefile.java: Ditto.
    	* LinuxElfCorefile.java: Ditto.
    	(getElfEndianType()): Delete.
    	(getElfWordSize()): Delete.
    
    frysk-core/frysk/proc/dead/ChangeLog
    2008-02-19  Andrew Cagney  <cagney@redhat.com>
    
    	* CorefileByteBuffer.java: Update to match lib.dwfl.
    	* SOLibMapBuilder.java: Ditto.
    	* LinuxExeHost.java: Ditto.
    	* LinuxExeTask.java: Ditto.
    	* LinuxCoreTask.java: Ditto.
    	* LinuxCoreHost.java: Ditto.
    	* LinuxCoreProc.java: Ditto.
    
    frysk-core/frysk/proc/live/ChangeLog
    2008-02-19  Andrew Cagney  <cagney@redhat.com>
    
    	* IsaFactory.java: Update to match lib.dwfl.
    	* TestTaskObserverCode.java: Ditto.
    
    frysk-core/frysk/util/ChangeLog
    2008-02-19  Andrew Cagney  <cagney@redhat.com>
    
    	* CommandlineParser.java: Update to match lib.dwfl.
    	* TestCoredumpAction.java: Ditto.
    
    frysk-sys/lib/dwfl/ChangeLog
    2008-02-19  Andrew Cagney  <cagney@redhat.com>
    
    	* ElfFileException.java (ElfFileException(String)): Delete.
    	(ElfFileException(String,String)): Delete.
    	(ElfFileException(File,String)): New.
    	(ElfFileException(File,Exception)): New.
    	* Elf.java (Elf(String,ElfCommand)): Delete.
    	(updateEHeader(ElfHeader)): Return void.
    	(getLastErrorMsg()): Make static.
    	(getLastErrorNo()): Make static.
    	(getDescriptor(File,ElfCommand)): New.
    	(Elf(FileDescriptor,ElfCommand)): New.
    	(update(ElfCommand)): Return void.
    	(createNewEHeader(int wordSize)): Return ElfEHeader.
    	* ElfException.java: Extend RuntimeException.
    	* cni/Elf.cxx (fillEHeader): Delete.
    	(Elf::elf_getehdr): Throw an exception if there's a problem.
    	(Elf::elf_update): Ditto.
    	(Elf::elf_updatehdr): Ditto.
    	* ElfEHeader.java (EI_CLASS): New.
    	(getWordSize(), setWordSize()): New.
    	(ElfEHeader()): Replace ElfEHeader(Elf).
    	(DATANONE, DATA2LSB, DATA2MSB, DATA): Drop PHEADER_ prefix.
    	(CLASSNONE, CLASS32, CLASS64, CLASS): Drop PHEADER_ prefix.
    	(getByteOrder(), setByteOrder(ByteOrder)): New.
    	* TestElf.java: Update.
    	(testSetWordSize()): New.
    	(testSetByteOrder()): New.
    	* ElfPrXFPRegSet.java: Update.
    	* ElfPrAuxv.java: Update.
    	* ElfPrFPRegSet.java: Update.
    	* ElfPrpsinfo.java: Update.
    	* ElfPrstatus.java: Update.

-----------------------------------------------------------------------

Summary of changes:
 frysk-core/frysk/bindir/ChangeLog                  |    4 +
 frysk-core/frysk/bindir/TestFstep.java             |   16 +-
 frysk-core/frysk/debuginfo/ChangeLog               |    4 +
 frysk-core/frysk/debuginfo/DebugInfo.java          |    3 +-
 frysk-core/frysk/dom/ChangeLog                     |    4 +
 frysk-core/frysk/dom/DOMCommon.java                |    6 +-
 frysk-core/frysk/ftrace/ChangeLog                  |    6 +
 frysk-core/frysk/ftrace/ObjectFile.java            |   83 ++++-----
 frysk-core/frysk/ftrace/TestMappingGuard.java      |    3 +-
 frysk-core/frysk/isa/ChangeLog                     |    4 +
 frysk-core/frysk/isa/ElfMap.java                   |   16 +--
 frysk-core/frysk/isa/corefiles/ChangeLog           |   12 +-
 .../frysk/isa/corefiles/IA32LinuxElfCorefile.java  |    2 +-
 .../frysk/isa/corefiles/LinuxElfCorefile.java      |   69 ++-----
 .../frysk/isa/corefiles/PPC32LinuxElfCorefile.java |    2 +-
 .../frysk/isa/corefiles/PPC64LinuxElfCorefile.java |    2 +-
 .../frysk/isa/corefiles/X8664LinuxElfCorefile.java |    2 +-
 frysk-core/frysk/proc/dead/ChangeLog               |   10 +
 frysk-core/frysk/proc/dead/CorefileByteBuffer.java |   49 +----
 frysk-core/frysk/proc/dead/LinuxCoreHost.java      |    8 +-
 frysk-core/frysk/proc/dead/LinuxCoreProc.java      |    7 +-
 frysk-core/frysk/proc/dead/LinuxExeHost.java       |    7 +-
 frysk-core/frysk/proc/dead/LinuxExeTask.java       |    3 +-
 frysk-core/frysk/proc/dead/SOLibMapBuilder.java    |   49 ++----
 frysk-core/frysk/proc/live/ChangeLog               |    5 +
 frysk-core/frysk/proc/live/IsaFactory.java         |   21 +--
 .../frysk/proc/live/TestTaskObserverCode.java      |   12 +-
 frysk-core/frysk/util/ChangeLog                    |    6 +-
 frysk-core/frysk/util/CommandlineParser.java       |    4 +-
 frysk-core/frysk/util/TestCoredumpAction.java      |   36 +---
 frysk-sys/lib/dwfl/ChangeLog                       |   34 +++
 frysk-sys/lib/dwfl/Elf.java                        |   73 ++++----
 frysk-sys/lib/dwfl/ElfEHeader.java                 |  111 ++++++++--
 frysk-sys/lib/dwfl/ElfException.java               |   21 ++-
 frysk-sys/lib/dwfl/ElfFileException.java           |   66 +++----
 frysk-sys/lib/dwfl/ElfPrAuxv.java                  |   25 +--
 frysk-sys/lib/dwfl/ElfPrFPRegSet.java              |   29 +--
 frysk-sys/lib/dwfl/ElfPrXFPRegSet.java             |   29 +--
 frysk-sys/lib/dwfl/ElfPrpsinfo.java                |   36 +---
 frysk-sys/lib/dwfl/ElfPrstatus.java                |   31 +---
 frysk-sys/lib/dwfl/TestElf.java                    |  216 ++++++++++----------
 frysk-sys/lib/dwfl/cni/Elf.cxx                     |  101 +++++-----
 42 files changed, 577 insertions(+), 650 deletions(-)

First 500 lines of diff:
diff --git a/frysk-core/frysk/bindir/ChangeLog b/frysk-core/frysk/bindir/ChangeLog
index a35ab8d..ddf28e2 100644
--- a/frysk-core/frysk/bindir/ChangeLog
+++ b/frysk-core/frysk/bindir/ChangeLog
@@ -1,3 +1,7 @@
+2008-02-19  Andrew Cagney  <cagney@redhat.com>
+
+	* TestFstep.java: Update to match lib.dwfl.Elf.
+
 2008-02-19  Phil Muldoon  <pmuldoon@redhat.com>
 
 	* fcore.xml: Add -stack option. 
diff --git a/frysk-core/frysk/bindir/TestFstep.java b/frysk-core/frysk/bindir/TestFstep.java
index 6247067..6e6227a 100644
--- a/frysk-core/frysk/bindir/TestFstep.java
+++ b/frysk-core/frysk/bindir/TestFstep.java
@@ -41,17 +41,21 @@
 package frysk.bindir;
 
 import frysk.Config;
-import lib.dwfl.*;
+import java.io.File;
 import frysk.expunit.Regex;
 import frysk.testbed.TestLib;
 import frysk.testbed.TearDownExpect;
+import lib.dwfl.Elf;
+import lib.dwfl.ElfEHeader;
+import lib.dwfl.ElfCommand;
 
 public class TestFstep extends TestLib {
-  // Makes sure that fstep at least comes across the entry point of the
-  // stepped program.
-  public void testFirstStep() throws Exception
-  {
-    Elf e = new Elf("/bin/true", ElfCommand.ELF_C_READ);
+    /**
+     * Makes sure that fstep at least comes across the entry point of
+     * the stepped program.
+     */
+    public void testFirstStep() throws Exception {
+	Elf e = new Elf(new File("/bin/true"), ElfCommand.ELF_C_READ);
     try {
 	ElfEHeader h = e.getEHeader();
 	final String entryAddress = "0x" + Long.toHexString(h.entry);
diff --git a/frysk-core/frysk/debuginfo/ChangeLog b/frysk-core/frysk/debuginfo/ChangeLog
index f55fd9c..758d8a7 100644
--- a/frysk-core/frysk/debuginfo/ChangeLog
+++ b/frysk-core/frysk/debuginfo/ChangeLog
@@ -1,3 +1,7 @@
+2008-02-19  Andrew Cagney  <cagney@redhat.com>
+
+	* DebugInfo.java: Update to match lib.dwfl.Elf.
+
 2008-02-12  Andrew Cagney  <cagney@redhat.com>
 
 	* TestDebugInfoStackTrace.java: Update to match frysk.sys.Pid.
diff --git a/frysk-core/frysk/debuginfo/DebugInfo.java b/frysk-core/frysk/debuginfo/DebugInfo.java
index 12e817c..3f1a92f 100644
--- a/frysk-core/frysk/debuginfo/DebugInfo.java
+++ b/frysk-core/frysk/debuginfo/DebugInfo.java
@@ -54,6 +54,7 @@ import lib.dwfl.DwAt;
 import lib.dwfl.DwflDieBias;
 import lib.dwfl.Elf;
 import lib.dwfl.ElfCommand;
+import java.io.File;
 
 public class DebugInfo {
     private Elf elf;
@@ -66,7 +67,7 @@ public class DebugInfo {
     public DebugInfo (DebugInfoFrame frame) {
 	Proc proc = frame.getTask().getProc();
 	try {
-	    elf = new Elf(proc.getExe(), ElfCommand.ELF_C_READ);
+	    elf = new Elf(new File(proc.getExe()), ElfCommand.ELF_C_READ);
 	    dwarf = new Dwarf(elf, DwarfCommand.READ, null);
 	}
 	catch (lib.dwfl.ElfException ignore) {
diff --git a/frysk-core/frysk/dom/ChangeLog b/frysk-core/frysk/dom/ChangeLog
index bebfb75..a92d1d8 100644
--- a/frysk-core/frysk/dom/ChangeLog
+++ b/frysk-core/frysk/dom/ChangeLog
@@ -1,3 +1,7 @@
+2008-02-19  Andrew Cagney  <cagney@redhat.com>
+
+	* DOMCommon.java: Update to match lib.dwfl.File.
+
 2007-12-13  Sami Wagiaalla  <swagiaal@redhat.com>
 
 	Moved frysk.rt.Line to frysk.scopes.SourceLocation.
diff --git a/frysk-core/frysk/dom/DOMCommon.java b/frysk-core/frysk/dom/DOMCommon.java
index 0afba02..8f2f67e 100644
--- a/frysk-core/frysk/dom/DOMCommon.java
+++ b/frysk-core/frysk/dom/DOMCommon.java
@@ -1,6 +1,6 @@
 // This file is part of the program FRYSK.
 //
-// Copyright 2007, Red Hat Inc.
+// Copyright 2007, 2008, 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
@@ -82,7 +82,7 @@ public class DOMCommon {
     ArrayList sourcefiles = new ArrayList();
     if (pathFound(executable)) {
       try {
-        Elf elf = new Elf(executable, ElfCommand.ELF_C_READ);
+	  Elf elf = new Elf(new File(executable), ElfCommand.ELF_C_READ);
         Dwarf dw = new Dwarf(elf, DwarfCommand.READ, null);
         String[] files = dw.getSourceFiles();
 
@@ -127,7 +127,7 @@ public class DOMCommon {
     Elf elf = null;
     ArrayList incpaths = new ArrayList();
     try {
-      elf = new Elf(executable, ElfCommand.ELF_C_READ);
+	elf = new Elf(new File(executable), ElfCommand.ELF_C_READ);
     } catch (lib.dwfl.ElfException ee) {
       throw new RuntimeException("Cannot open elf file. Name I was given "
           + "was " + executable, ee);
diff --git a/frysk-core/frysk/ftrace/ChangeLog b/frysk-core/frysk/ftrace/ChangeLog
index d2f58c2..e3c6c0d 100644
--- a/frysk-core/frysk/ftrace/ChangeLog
+++ b/frysk-core/frysk/ftrace/ChangeLog
@@ -1,3 +1,9 @@
+2008-02-19  Andrew Cagney  <cagney@redhat.com>
+
+	* TestMappingGuard.java (performTestAllLibraiesGetDetected()):
+	Make private.
+	* ObjectFile.java: Update to match lib.dwfl.Elf.
+
 2008-02-14  Andrew Cagney  <cagney@redhat.com>
 
 	* Ftrace.java (addTracePid(ProcId)): Delete.
diff --git a/frysk-core/frysk/ftrace/ObjectFile.java b/frysk-core/frysk/ftrace/ObjectFile.java
index 3b4016b..1da5df4 100644
--- a/frysk-core/frysk/ftrace/ObjectFile.java
+++ b/frysk-core/frysk/ftrace/ObjectFile.java
@@ -1,6 +1,6 @@
 // This file is part of the program FRYSK.
 //
-// Copyright 2007, Red Hat Inc.
+// Copyright 2007, 2008, 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
@@ -60,7 +60,8 @@ import lib.dwfl.ElfSymbol;
 import lib.dwfl.ElfSymbolBinding;
 import lib.dwfl.ElfSymbolType;
 import lib.dwfl.ElfSymbolVisibility;
-
+import lib.dwfl.ElfFileException;
+import lib.dwfl.ElfException;
 import lib.stdcpp.Demangler;
 
 /**
@@ -209,9 +210,7 @@ public class ObjectFile
 	    tracePoints.add(tp);
 	}
 
-	public synchronized ArrayList getTracePoints(TracePointOrigin origin)
-	    throws lib.dwfl.ElfException
-	{
+	public synchronized ArrayList getTracePoints(TracePointOrigin origin) {
 	    ArrayList tracePoints = (ArrayList)this.tracePointMap.get(origin);
 	    if (tracePoints != null) {
 		logger.log(Level.FINE, "" + tracePoints.size() + " tracepoints for origin " + origin + " retrieved from cache.");
@@ -308,9 +307,7 @@ public class ObjectFile
     }
     private ObjFBuilder builder;
 
-    protected ObjectFile(File file, final Elf elfFile, ElfEHeader eh)
-	throws lib.dwfl.ElfException
-    {
+    protected ObjectFile(File file, final Elf elfFile, ElfEHeader eh) {
 	this.filename = file;
 	this.entryPoint = eh.entry;
 	this.builder = new ObjFBuilder();
@@ -344,7 +341,7 @@ public class ObjectFile
 
 	if (!haveLoadable) {
 	    logger.log(Level.FINE, "Failed, didn't find any loadable segments.");
-	    throw new lib.dwfl.ElfFileException("Failed, didn't find any loadable segments.");
+	    throw new ElfFileException(file, "Failed, didn't find any loadable segments.");
 	}
 
 	if (eh.type == ElfEHeader.PHEADER_ET_EXEC)
@@ -353,7 +350,7 @@ public class ObjectFile
 	    logger.log(Level.FINER, "This file is DSO or PIE EXECUTABLE.");
 	else {
 	    logger.log(Level.FINE, "Failed, unsupported ELF file type.");
-	    throw new lib.dwfl.ElfFileException("Failed, unsupported ELF file type.");
+	    throw new ElfFileException(file, "Failed, unsupported ELF file type.");
 	}
 
 	boolean foundDynamic = false;
@@ -438,7 +435,7 @@ public class ObjectFile
 	    }
 	    else if (sheader.type == ElfSectionHeader.ELF_SHT_SYMTAB) {
 		if (this.staticSymtab != null)
-		    throw new lib.dwfl.ElfFileException("Strange: More than one static symbol tables.");
+		    throw new ElfFileException(file, "Strange: More than one static symbol tables.");
 		logger.log(Level.FINER, "Found static symtab section `" + sheader.name + "'.");
 		this.staticSymtab = section;
 	    }
@@ -447,23 +444,23 @@ public class ObjectFile
 	if (builder.haveDynamic) {
 	    // Elf consistency sanity checks.
 	    if (!foundDynamic)
-		throw new lib.dwfl.ElfFileException("DYNAMIC section not found in ELF file.");
+		throw new ElfFileException(file, "DYNAMIC section not found in ELF file.");
 	    if (!havePlt)
-		throw new lib.dwfl.ElfFileException("No (suitable) .plt found in ELF file.");
+		throw new ElfFileException(file, "No (suitable) .plt found in ELF file.");
 	    if (!haveRelPlt)
-		throw new lib.dwfl.ElfFileException("No (suitable) .rel.plt found in ELF file.");
+		throw new ElfFileException(file, "No (suitable) .rel.plt found in ELF file.");
 	    if (this.dynamicSymtab == null)
-		throw new lib.dwfl.ElfFileException("Couldn't get SYMTAB from DYNAMIC section.");
+		throw new ElfFileException(file, "Couldn't get SYMTAB from DYNAMIC section.");
 	    if (this.dynamicStrtab == null)
-		throw new lib.dwfl.ElfFileException("Couldn't get STRTAB from DYNAMIC section.");
+		throw new ElfFileException(file, "Couldn't get STRTAB from DYNAMIC section.");
 	    if ((this.dynamicVerneed != null || this.dynamicVerdef != null) && this.dynamicVersym == null)
-		throw new lib.dwfl.ElfFileException("Versym section missing when verdef or verneed present.");
+		throw new ElfFileException(file, "Versym section missing when verdef or verneed present.");
 	    if (this.dynamicVerneed == null && this.dynamicVerdef == null && this.dynamicVersym != null)
-		throw new lib.dwfl.ElfFileException("Versym section present when neither verdef nor verneed present.");
+		throw new ElfFileException(file, "Versym section present when neither verdef nor verneed present.");
 	    if (this.dynamicVerdefCount != 0 && this.dynamicVerdef == null)
-		throw new lib.dwfl.ElfFileException("Strange: VERDEFNUM tag present, but not VERDEF.");
+		throw new ElfFileException(file, "Strange: VERDEFNUM tag present, but not VERDEF.");
 	    if (this.dynamicVerneedCount != 0 && this.dynamicVerneed == null)
-		throw new lib.dwfl.ElfFileException("Strange: VERNEEDNUM tag present, but not VERNEED.");
+		throw new ElfFileException(file, "Strange: VERNEEDNUM tag present, but not VERNEED.");
 	}
 
 	// Read SONAME, if there was one.
@@ -483,9 +480,7 @@ public class ObjectFile
 	logger.log(Level.FINE, "Loading finished successfully.");
     }
 
-    public void eachTracePoint(TracePointIterator client, TracePointOrigin origin)
-	throws lib.dwfl.ElfException
-    {
+    public void eachTracePoint(TracePointIterator client, TracePointOrigin origin) {
 	logger.log(Level.FINE, "Loading tracepoints for origin " + origin + ".");
 	List tracePoints = builder.getTracePoints(origin);
 
@@ -500,9 +495,7 @@ public class ObjectFile
 	logger.log(Level.FINE, "Done processing tracepoints for origin " + origin + ".");
     }
 
-    public TracePoint lookupTracePoint(String name, TracePointOrigin origin)
-	throws lib.dwfl.ElfException
-    {
+    public TracePoint lookupTracePoint(String name, TracePointOrigin origin) {
 	logger.log(Level.FINE, "Looking up tracepoint for `" + name + "' in " + origin + ".");
 	List tracePoints = builder.getTracePoints(origin);
 	for (Iterator it = tracePoints.iterator(); it.hasNext();) {
@@ -513,9 +506,7 @@ public class ObjectFile
 	return null;
     }
 
-    public void eachTracePoint(TracePointIterator client)
-	throws lib.dwfl.ElfException
-    {
+    public void eachTracePoint(TracePointIterator client) {
 	logger.log(Level.FINE, "Load ALL tracepoints.");
 	eachTracePoint(client, TracePointOrigin.PLT);
 	eachTracePoint(client, TracePointOrigin.DYNAMIC);
@@ -608,28 +599,26 @@ public class ObjectFile
 	    return objFile;
 	}
 
+	Elf elfFile;
 	try {
-	    Elf elfFile = new Elf(filename, ElfCommand.ELF_C_READ);
-	    ElfEHeader eh = elfFile.getEHeader();
-	    if (eh == null) {
-		logger.log(Level.FINE, "Failed, couldn't get an ELF header.");
-		return null;
-	    }
-
-	    objFile = new ObjectFile(filename, elfFile, eh);
-	    cachedFiles.put(filename, objFile);
-	    logger.log(Level.FINE, "Done.");
-	    return objFile;
-	}
-	catch (lib.dwfl.ElfFileException efe) {
-	    efe.printStackTrace();
-	    System.err.println("load error: " + efe);
-	}
-	catch (lib.dwfl.ElfException eexp) {
+	    elfFile = new Elf(filename, ElfCommand.ELF_C_READ);
+	} catch (ElfException eexp) {
 	    eexp.printStackTrace();
 	    System.err.println("load error: " + eexp);
+	    return null;
 	}
 
-	return null;
+	ElfEHeader eh;
+	try {
+	    eh = elfFile.getEHeader();
+	} catch (ElfException e) {
+	    logger.log(Level.FINE, "Failed, couldn't get an ELF header.");
+	    return null;
+	}
+
+	objFile = new ObjectFile(filename, elfFile, eh);
+	cachedFiles.put(filename, objFile);
+	logger.log(Level.FINE, "Done.");
+	return objFile;
     }
 }
diff --git a/frysk-core/frysk/ftrace/TestMappingGuard.java b/frysk-core/frysk/ftrace/TestMappingGuard.java
index c31df51..7ee6193 100644
--- a/frysk-core/frysk/ftrace/TestMappingGuard.java
+++ b/frysk-core/frysk/ftrace/TestMappingGuard.java
@@ -76,8 +76,7 @@ public class TestMappingGuard
 	public void addFailed (Object observable, Throwable w) {}
     }
 
-    public void performTestAllLibrariesGetDetected()
-    {
+    private void performTestAllLibrariesGetDetected() {
 	class MyMappingObserver extends DummyMappingObserver {
 	    public ArrayList allLibraries = new ArrayList();
 	    public Action updateMappedFile(frysk.proc.Task task, MemoryMapping mapping) {
diff --git a/frysk-core/frysk/isa/ChangeLog b/frysk-core/frysk/isa/ChangeLog
index 289d224..c4f315a 100644
--- a/frysk-core/frysk/isa/ChangeLog
+++ b/frysk-core/frysk/isa/ChangeLog
@@ -1,3 +1,7 @@
+2008-02-19  Andrew Cagney  <cagney@redhat.com>
+
+	* ElfMap.java: Update to match lib.dwfl.
+
 2007-12-11  Andrew Cagney  <cagney@redhat.com>
 
 	* TestRegisterMap.java: New file.
diff --git a/frysk-core/frysk/isa/ElfMap.java b/frysk-core/frysk/isa/ElfMap.java
index 3e6aedd..b42ca14 100644
--- a/frysk-core/frysk/isa/ElfMap.java
+++ b/frysk-core/frysk/isa/ElfMap.java
@@ -42,9 +42,6 @@ package frysk.isa;
 import lib.dwfl.ElfEMachine;
 import lib.dwfl.ElfEHeader;
 import java.io.File;
-import java.io.IOException;
-import lib.dwfl.ElfException;
-import lib.dwfl.ElfFileException;
 import lib.dwfl.Elf;
 import lib.dwfl.ElfCommand;
 import java.util.Map;
@@ -93,20 +90,11 @@ public final class ElfMap {
 
     public static ISA getISA(File exe) {
 	Elf elfFile;
-	try {
-	    elfFile = new Elf(exe.getCanonicalPath(), ElfCommand.ELF_C_READ);
-	} catch (IOException e) {
-	    throw new RuntimeException("opening " + exe.getPath(), e);
-	} catch (ElfFileException e) {
-	    throw new RuntimeException ("opening " + exe.getPath(), e);
-	} catch (ElfException e) {
-	    throw new RuntimeException ("opening " + exe.getPath(), e);
-	}
+	elfFile = new Elf(exe, ElfCommand.ELF_C_READ);
 	try {
 	    ElfEHeader header = elfFile.getEHeader();
 	    return getISA(header);
-	}
-	finally {
+	} finally {
 	    elfFile.close();
 	}
     }
diff --git a/frysk-core/frysk/isa/corefiles/ChangeLog b/frysk-core/frysk/isa/corefiles/ChangeLog
index f7308cd..4bef327 100644
--- a/frysk-core/frysk/isa/corefiles/ChangeLog
+++ b/frysk-core/frysk/isa/corefiles/ChangeLog
@@ -1,9 +1,19 @@
-2008-02-19  Phil Muldoon  <pmuldoon@redhat.com>
+2008-02-19  Andrew Cagney  <cagney@redhat.com>
 
 	* LinuxElfCorefile.java (buildMap): Add stackOnly
 	logic test.
 	(setStackOnly): New.
 
+2008-02-19  Phil Muldoon  <pmuldoon@redhat.com>
+
+	* IA32LinuxElfCorefile.java: Update to match lib.dwfl.
+	* X8664LinuxElfCorefile.java: Ditto.
+	* PPC64LinuxElfCorefile.java: Ditto.
+	* PPC32LinuxElfCorefile.java: Ditto.
+	* LinuxElfCorefile.java: Ditto.
+	(getElfEndianType()): Delete.
+	(getElfWordSize()): Delete.
+
 2008-02-15  Phil Muldoon  <pmuldoon@redhat.com>
 
 	* PPC64LinuxElfCorefile.java (writeNotePrpsinfo): Fix
diff --git a/frysk-core/frysk/isa/corefiles/IA32LinuxElfCorefile.java b/frysk-core/frysk/isa/corefiles/IA32LinuxElfCorefile.java
index 3c48481..56d0b77 100644
--- a/frysk-core/frysk/isa/corefiles/IA32LinuxElfCorefile.java
+++ b/frysk-core/frysk/isa/corefiles/IA32LinuxElfCorefile.java
@@ -320,7 +320,7 @@ public class IA32LinuxElfCorefile extends LinuxElfCorefile {
      * @see frysk.util.LinuxElfCorefile#getElfMachineClass()
      */
     protected byte getElfMachineClass() {
-	return ElfEHeader.PHEADER_ELFCLASS32;
+	return ElfEHeader.CLASS32;
     }
 
 }
diff --git a/frysk-core/frysk/isa/corefiles/LinuxElfCorefile.java b/frysk-core/frysk/isa/corefiles/LinuxElfCorefile.java
index 1bda4b3..c142874 100644
--- a/frysk-core/frysk/isa/corefiles/LinuxElfCorefile.java
+++ b/frysk-core/frysk/isa/corefiles/LinuxElfCorefile.java
@@ -40,7 +40,6 @@
 package frysk.isa.corefiles;
 
 import frysk.sys.ProcessIdentifierFactory;
-import inua.eio.ByteOrder;
 import frysk.isa.ISA;
 import java.util.ArrayList;
 import java.util.List;
@@ -49,8 +48,6 @@ import lib.dwfl.DwflModule;
 import lib.dwfl.Elf;
 import lib.dwfl.ElfCommand;
 import lib.dwfl.ElfEHeader;
-import lib.dwfl.ElfException;
-import lib.dwfl.ElfFileException;
 import lib.dwfl.ElfNhdr;
 import lib.dwfl.ElfPHeader;
 import frysk.dwfl.DwflCache;
@@ -59,6 +56,7 @@ import frysk.proc.Proc;
 import frysk.proc.Task;
 import frysk.sys.StatelessFile;
 import frysk.sys.proc.MapsBuilder;
+import java.io.File;
 
 public abstract class LinuxElfCorefile {
 
@@ -180,10 +178,7 @@ public abstract class LinuxElfCorefile {
 	builder.construct(ProcessIdentifierFactory.create(this.process.getMainTask().getTid()));
 
 	// Write elf file
-	final long i = linuxElfCorefileImage.update(ElfCommand.ELF_C_WRITE);
-	if (i < 0)
-	    throw new RuntimeException("LibElf elf_update failed with "
-		    + linuxElfCorefileImage.getLastErrorMsg());
+	linuxElfCorefileImage.update(ElfCommand.ELF_C_WRITE);
 	// Go home.
 	linuxElfCorefileImage.close();
 	
@@ -236,31 +231,6 @@ public abstract class LinuxElfCorefile {
 	StatelessFile rawCore = new StatelessFile(name);
 	rawCore.pwrite(offset, data, 0, data.length);
     }
-    /**
-     * Return the endian type as associated by this ISA
-     * 
-     * @return byte - endian type.
-     */
-    protected byte getElfEndianType() {
-	ISA currentArch = process.getMainTask().getISA();
-	ByteOrder order = currentArch.order();
-	if (order == ByteOrder.BIG_ENDIAN)
-	    return ElfEHeader.PHEADER_ELFDATA2MSB;
-	else
-	    return ElfEHeader.PHEADER_ELFDATA2LSB;
-    }
-
-    /**
-     * 
-     * Return the word size as represented by this ISA
-     * 
-     * @return int - size of word
-     * 
-     */
-    protected int getElfWordSize() {
-	ISA currentArch = process.getMainTask().getISA();
-	return currentArch.wordSize();
-    }
 
     /**
      * writeNotePrpsInfo
@@ -451,37 +421,33 @@ public abstract class LinuxElfCorefile {
      * @return int size of the elf header
      */
     protected int populateElfHeader(Elf elfCore) {
+	ISA isa = process.getMainTask().getISA();
 
-	elfCore.createNewEHeader(getElfWordSize());
-	ElfEHeader elf_header = elfCore.getEHeader();
-
-	elf_header.ident[4] = getElfMachineClass();
-	elf_header.ident[5] = getElfEndianType();


hooks/post-receive
--
frysk system monitor/debugger


             reply	other threads:[~2008-02-19 16:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-19 16:19 cagney [this message]
  -- strict thread matches above, loose matches on Subject: below --
2008-02-26 20:15 cagney
2008-01-25 17:32 cagney

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=20080219161953.17129.qmail@sourceware.org \
    --to=cagney@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: link
Be 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).