|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.cmpware.elf.Dwarf2LineInfo
public class Dwarf2LineInfo
This describes an ELF / DWARF2 line numbering information. Each compilation unit should have one of these objects.
Copyright (c) 2004 Cmpware, Inc. All Rights Reserved.
| Field Summary | |
|---|---|
static java.lang.String |
copyright
Copyright string |
| Constructor Summary | |
|---|---|
Dwarf2LineInfo()
|
|
| Method Summary | |
|---|---|
int |
getAddr(java.lang.String dirName,
java.lang.String fileName,
int lineNumber)
This method returns the memory address of a source code line given the directory and file names and the line number. |
java.lang.String |
getDirName(int addr)
This method returns the source file directory name associated with thw address. |
java.util.Vector |
getErrorList()
This method returns the list of errors. |
java.lang.String |
getFileName(int addr)
This method returns the source file name associated with address. |
int |
getLineNumber(int addr)
This method returns the line number in the source file associated with address. |
java.lang.String |
lineEntries()
This returs a string representation of the address / line number / filename data. |
void |
load(byte[] debug_line,
int offset,
boolean swapBytes,
int addrSize)
This method loads up the line number information for a compilation unit. |
void |
setCompDirName(java.lang.String compDirName)
This method sets the current working directory. |
void |
setErrorList(java.util.Vector errorList)
This method sets the error list vector. |
java.lang.String |
toString(boolean swapBytes)
This method retuns a string representation of the Line number data. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String copyright
| Constructor Detail |
|---|
public Dwarf2LineInfo()
| Method Detail |
|---|
public void load(byte[] debug_line,
int offset,
boolean swapBytes,
int addrSize)
debug_line - the .debug_line Elf section.offset - The offset into the .debug_line
Elf section containing the line number
information for this Compilation Unit.swapBytes - This is the endian flag from
the Elf file indicating if byte swapping
is necessary.addrSize - the number of bytes in an address.
currently only 4 and 8 are supported.public int getLineNumber(int addr)
addr - The address to me mapped to a source file
line number.
public java.lang.String getFileName(int addr)
addr - The address to me mapped to a source file.
public java.lang.String getDirName(int addr)
addr - The address to me mapped to a source file.
public int getAddr(java.lang.String dirName,
java.lang.String fileName,
int lineNumber)
dirName - The directory name where the file resides. This
is the name from the ELF file, not necessarily the filesystem.fileName - The source code file name. This is the name as it
is in the ELF file, not necessarily any file name that will
retreive the file from the file system.lineNumber - The line number in the file. The top of the
file is line 1.
public java.util.Vector getErrorList()
public void setErrorList(java.util.Vector errorList)
errorList - The error list vector.public void setCompDirName(java.lang.String compDirName)
compDirName - The Current Working Directory.public java.lang.String toString(boolean swapBytes)
swapBytes - The flag indicating if byte
swapping is performed on the original
data from the .line_info section. This
is required by the disassembler.public java.lang.String lineEntries()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||