gnu.gcj.runtime

Class NameFinder


public class NameFinder
extends Object

Lookup addresses (represented as longs) to find source & line number info. The following system property is available (defaults to true):
  • close() should be called to get rid of all resources. This class is used from java.lang.VMThrowable.

    Constructor Summary

    NameFinder()
    Create a new NameFinder to lookup names in binaryFile.

    Method Summary

    void
    close()
    Releases all resources used by this NameFinder.
    static String
    demangleInterpreterMethod(String m, String cn)
    Returns human readable method name and aguments given a method type signature as known to the interpreter and a classname.
    int
    getLineNum()
    If lookup() was successful, returns the line number of addr.
    String
    getSourceFile()
    Returns the source file name if lookup() was successful.
    void
    lookup(String file, long addr)

    Methods inherited from class java.lang.Object

    clone, equals, extends Object> getClass, finalize, hashCode, notify, notifyAll, toString, wait, wait, wait

    Constructor Details

    NameFinder

    public NameFinder()
    Create a new NameFinder to lookup names in binaryFile. Call close to get rid of any resources created while using the lookup methods.

    Method Details

    close

    public void close()
    Releases all resources used by this NameFinder.

    demangleInterpreterMethod

    public static String demangleInterpreterMethod(String m,
                                                   String cn)
    Returns human readable method name and aguments given a method type signature as known to the interpreter and a classname.

    getLineNum

    public int getLineNum()
    If lookup() was successful, returns the line number of addr. If the line number could not be determined, -1 is returned.

    getSourceFile

    public String getSourceFile()
    Returns the source file name if lookup() was successful. If the source file could not be determined, the binary name will be returned instead.

    lookup

    public void lookup(String file,
                       long addr)

    NameFinder.java -- Translates addresses to StackTraceElements. Copyright (C) 2002, 2004 Free Software Foundation, Inc. This file is part of libgcj. This software is copyrighted work licensed under the terms of the Libgcj License. Please consult the file "LIBGCJ_LICENSE" for details.