Package org.eclipse.cdt.utils.debug.dwarf

# Class DwarfReader

java.lang.Object
org.eclipse.cdt.utils.debug.dwarf.Dwarf
org.eclipse.cdt.utils.debug.dwarf.DwarfReader

All Implemented Interfaces:
  `AutoCloseable`, `ICompileOptionsFinder`, `ISymbolReader`

public class DwarfReader extends Dwarf implements ISymbolReader, ICompileOptionsFinder
Light-weight parser of Dwarf2 data which is intended for getting only source files that contribute to the given executable.

## Constructor Summary

Constructors
Constructor
Description
`DwarfReader(String file)`
`DwarfReader(PE64 exe)`
`DwarfReader(Elf exe)`

## Method Summary

Modifier and Type
Method
Description
`String`
`getCompileOptions(String fileName)`
Get the set of command line flags used for a particular file name.
`String[]`
`getSourceFiles()`
`String[]`
`getSourceFiles(org.eclipse.core.runtime.IProgressMonitor monitor)`
Gets the source files from this symbol reader.
`void`
`init(PE64 exe)`
`void`
`init(Elf exe)`

### Methods inherited from class org.eclipse.cdt.utils.debug.dwarf.Dwarf

`close, finalize, main, parse`

### Methods inherited from class java.lang.Object

`clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Methods inherited from interface org.eclipse.cdt.core.ISymbolReader

`close`

## Constructor Details

### DwarfReader

public DwarfReader(String file) throws IOException

Throws:
  `IOException`

### DwarfReader

public DwarfReader(Elf exe) throws IOException

Throws:
  `IOException`

### DwarfReader

public DwarfReader(PE64 exe) throws IOException

Throws:
  `IOException`
Since:
  6.9

## Method Details

### init

public void init(Elf exe) throws IOException

Overrides:
  `init` in class `Dwarf`
Throws:
  `IOException`

### init

public void init(PE64 exe) throws IOException

Overrides:
  `init` in class `Dwarf`
Throws:
  `IOException`

### getSourceFiles

public String[] getSourceFiles()

Specified by:
  `getSourceFiles` in interface `ISymbolReader`

### getSourceFiles

public String[] getSourceFiles(org.eclipse.core.runtime.IProgressMonitor monitor)
Description copied from interface: `ISymbolReader`
Gets the source files from this symbol reader.

Specified by:
  `getSourceFiles` in interface `ISymbolReader`
Parameters:
  `monitor` - a progress monitor since this may be a lengthly operation
Returns:
  an array of path names to the source files
Since:
  5.2

### getCompileOptions

public String getCompileOptions(String fileName)
Get the set of command line flags used for a particular file name.

Specified by:
  `getCompileOptions` in interface `ICompileOptionsFinder`
Parameters:
  `fileName` - - name of file
Returns:
  string containing all macros used on command line to compile the file
Since:
  5.7