Package ghidra.app.util.bin.format.dwarf

# Class DWARFImportOptions

java.lang.Object
ghidra.app.util.bin.format.dwarf.DWARFImportOptions

public class DWARFImportOptions extends Object
Import options exposed by the `DWARFAnalyzer`

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static enum`
  `DWARFImportOptions.MacroEnumSetting`
  Used to control which macro info entries are used to create enums.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `DWARFImportOptions()`
  Create new instance

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Charset`
  `getCharset(Charset defaultCharset)`
  `String`
  `getCharsetName()`
  `String`
  `getDefaultCC()`
  `DWARFImportOptions.MacroEnumSetting`
  `getMacroEnumSetting()`
  `long`
  `getMaxSourceMapEntryLength()`
  Option to control the maximum length of a source map entry.
  `ghidra.app.plugin.core.analysis.AnalysisOptionsUpdater`
  `getOptionsUpdater()`
  See `Analyzer.getOptionsUpdater()`
  `boolean`
  `isCopyExternalDebugFileSymbols()`
  `boolean`
  `isCopyRenameAnonTypes()`
  Option to control a feature that copies anonymous types into a structure's "namespace" CategoryPath and giving that anonymous type a new name based on the structure's field's name.
  `boolean`
  `isCreateFuncSignatures()`
  Option to control creating FunctionSignature datatypes for each function defintion found in the DWARF debug data.
  `boolean`
  `isElideTypedefsWithSameName()`
  Option to control eliding typedef creation if the dest type has the same name.
  `boolean`
  `isIgnoreParamStorage()`
  `boolean`
  `isImportDataTypes()`
  Option to turn on/off the import of data types.
  `boolean`
  `isImportFuncs()`
  Option to turn on/off the import of funcs.
  `boolean`
  `isImportLocalVariables()`
  `boolean`
  `isOrganizeTypesBySourceFile()`
  Option to organize imported datatypes into sub-folders based on their source file name.
  `boolean`
  `isOutputDIEInfo()`
  Option to control tagging data types and functions with their DWARF DIE record number.
  `boolean`
  `isOutputInlineFuncComments()`
  Option to control tagging inlined-functions with comments.
  `boolean`
  `isOutputLexicalBlockComments()`
  Option to control tagging lexical blocks with Ghidra comments.
  `boolean`
  `isOutputSourceLineInfo()`
  Option to control whether source map info from DWARF is stored in the Program.
  `boolean`
  `isOutputSourceLocationInfo()`
  Option to control tagging data types and functions with their source code location (ie.
  `boolean`
  `isShowVariableStorageInfo()`
  `boolean`
  `isSpecialCaseSizedBaseTypes()`
  Option to recognize named base types that have an explicit size in the name (eg "int32_t) and use statically sized data types instead of compiler-dependent data types.
  `boolean`
  `isTryPackStructs()`
  Option to enable packing on structures/unions created during the DWARF import.
  `boolean`
  `isUseBookmarks()`
  `boolean`
  `isUseStaticStackFrameRegisterValue()`
  `void`
  `optionsChanged(Options options)`
  See `Analyzer.optionsChanged(Options, ghidra.program.model.listing.Program)`
  `void`
  `registerOptions(Options options)`
  See `Analyzer.registerOptions(Options, ghidra.program.model.listing.Program)`
  `void`
  `setCharsetName(String charsetName)`
  `void`
  `setCopyExternalDebugFileSymbols(boolean b)`
  `void`
  `setCopyRenameAnonTypes(boolean b)`
  Option to control a feature that copies anonymous types into a structure's "namespace" CategoryPath and giving that anonymousfunction.getEntryPoint() type a new name based on the structure's field's name.
  `void`
  `setCreateFuncSignatures(boolean createFuncSignatures)`
  Option to control creating FunctionSignature datatypes for each function defintion found in the DWARF debug data.
  `void`
  `setDefaultCC(String defaultCC)`
  `void`
  `setElideTypedefsWithSameName(boolean elide_typedefs_with_same_name)`
  Option to control eliding typedef creation if the dest type has the same name.
  `void`
  `setIgnoreParamStorage(boolean ignoreParamStorage)`
  `void`
  `setImportDataTypes(boolean importDataTypes)`
  Option to turn on/off the import of data types.
  `void`
  `setImportFuncs(boolean output_Funcs)`
  `void`
  `setImportLocalVariables(boolean importLocalVariables)`
  `void`
  `setMacroEnumSetting(DWARFImportOptions.MacroEnumSetting setting)`
  `void`
  `setMaxSourceMapEntryLength(long maxLength)`
  Option to control the maximum length of a source map entry.
  `void`
  `setOrganizeTypesBySourceFile(boolean organizeTypesBySourceFile)`
  Option to organize imported datatypes into sub-folders based on their source file name.
  `void`
  `setOutputDIEInfo(boolean output_DWARF_die_info)`
  Option to control tagging data types and functions with their DWARF DIE record number.
  `void`
  `setOutputInlineFuncComments(boolean output_InlineFunc_comments)`
  `void`
  `setOutputLexicalBlockComments(boolean output_LexicalBlock_comments)`
  Option to control tagging lexical blocks with Ghidra comments.
  `void`
  `setOutputSourceLineInfo(boolean outputSourceLineInfo)`
  Option to control whether source map info from DWARF is stored in the Program.
  `void`
  `setOutputSourceLocationInfo(boolean output_DWARF_location_info)`
  Option to control tagging data types and functions with their source code location (ie.
  `void`
  `setShowVariableStorageInfo(boolean showVariableStorageInfo)`
  `void`
  `setSpecialCaseSizedBaseTypes(boolean b)`
  Option to recognize named base types that have an explicit size in the name (eg "int32_t) and use statically sized data types instead of compiler-dependent data types.
  `void`
  `setTryPackDataTypes(boolean tryPackStructs)`
  Option to enable packing on structures created during the DWARF import.
  `void`
  `setUseStaticStackFrameRegisterValue(boolean useStaticStackFrameRegisterValue)`

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

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

- ## Constructor Details

  - ### DWARFImportOptions

    public DWARFImportOptions()
    Create new instance

- ## Method Details

  - ### getOptionsUpdater

    public ghidra.app.plugin.core.analysis.AnalysisOptionsUpdater getOptionsUpdater()
    See `Analyzer.getOptionsUpdater()`
    Returns:
      `AnalysisOptionsUpdater`

  - ### isOutputSourceLocationInfo

    public boolean isOutputSourceLocationInfo()
    Option to control tagging data types and functions with their source code location (ie. filename : line number ) if the information is present in the DWARF record.
    Returns:
      boolean true if the DWARF importer should tag items with their source code location info.

  - ### setOutputSourceLocationInfo

    public void setOutputSourceLocationInfo(boolean output_DWARF_location_info)
    Option to control tagging data types and functions with their source code location (ie. filename : line number ) if the information is present in the DWARF record.
    Parameters:
      `output_DWARF_location_info` - boolean to set

  - ### isOutputDIEInfo

    public boolean isOutputDIEInfo()
    Option to control tagging data types and functions with their DWARF DIE record number.
    Returns:
      boolean true if the DWARF importer should tag items with their DIE record number.

  - ### setOutputDIEInfo

    public void setOutputDIEInfo(boolean output_DWARF_die_info)
    Option to control tagging data types and functions with their DWARF DIE record number.
    Parameters:
      `output_DWARF_die_info` - boolean to set

  - ### isElideTypedefsWithSameName

    public boolean isElideTypedefsWithSameName()
    Option to control eliding typedef creation if the dest type has the same name.
    Returns:
      boolean true if the DWARF importer should skip creating a typedef if its dest has the same name.

  - ### setElideTypedefsWithSameName

    public void setElideTypedefsWithSameName(boolean elide_typedefs_with_same_name)
    Option to control eliding typedef creation if the dest type has the same name.
    Parameters:
      `elide_typedefs_with_same_name` - boolean to set

  - ### isImportDataTypes

    public boolean isImportDataTypes()
    Option to turn on/off the import of data types.
    Returns:
      boolean true if import should import data types.

  - ### setImportDataTypes

    public void setImportDataTypes(boolean importDataTypes)
    Option to turn on/off the import of data types.
    Parameters:
      `importDataTypes` - boolean to set

  - ### isImportFuncs

    public boolean isImportFuncs()
    Option to turn on/off the import of funcs.
    Returns:
      boolean true if import should import funcs.

  - ### setImportFuncs

    public void setImportFuncs(boolean output_Funcs)

  - ### isOutputInlineFuncComments

    public boolean isOutputInlineFuncComments()
    Option to control tagging inlined-functions with comments.
    Returns:
      boolean flag.

  - ### setOutputInlineFuncComments

    public void setOutputInlineFuncComments(boolean output_InlineFunc_comments)

  - ### isOutputLexicalBlockComments

    public boolean isOutputLexicalBlockComments()
    Option to control tagging lexical blocks with Ghidra comments.
    Returns:
      boolean flag.

  - ### setOutputLexicalBlockComments

    public void setOutputLexicalBlockComments(boolean output_LexicalBlock_comments)
    Option to control tagging lexical blocks with Ghidra comments.
    Parameters:
      `output_LexicalBlock_comments` - boolean flag to set.

  - ### isCopyRenameAnonTypes

    public boolean isCopyRenameAnonTypes()
    Option to control a feature that copies anonymous types into a structure's "namespace" CategoryPath and giving that anonymous type a new name based on the structure's field's name.
    Returns:
      boolean flag.

  - ### setCopyRenameAnonTypes

    public void setCopyRenameAnonTypes(boolean b)
    Option to control a feature that copies anonymous types into a structure's "namespace" CategoryPath and giving that anonymousfunction.getEntryPoint() type a new name based on the structure's field's name.
    Parameters:
      `b` - boolean flag to set.

  - ### isCreateFuncSignatures

    public boolean isCreateFuncSignatures()
    Option to control creating FunctionSignature datatypes for each function defintion found in the DWARF debug data.
    Returns:
      boolean flag.

  - ### setCreateFuncSignatures

    public void setCreateFuncSignatures(boolean createFuncSignatures)
    Option to control creating FunctionSignature datatypes for each function defintion found in the DWARF debug data.
    Parameters:
      `createFuncSignatures` - boolean flag to set.

  - ### isOrganizeTypesBySourceFile

    public boolean isOrganizeTypesBySourceFile()
    Option to organize imported datatypes into sub-folders based on their source file name.
    Returns:
      boolean flag

  - ### setOrganizeTypesBySourceFile

    public void setOrganizeTypesBySourceFile(boolean organizeTypesBySourceFile)
    Option to organize imported datatypes into sub-folders based on their source file name.
    Parameters:
      `organizeTypesBySourceFile` - boolean flag to set.

  - ### isTryPackStructs

    public boolean isTryPackStructs()
    Option to enable packing on structures/unions created during the DWARF import. If packing would change the structure's details, packing is left disabled.
    Returns:
      boolean flag

  - ### setTryPackDataTypes

    public void setTryPackDataTypes(boolean tryPackStructs)
    Option to enable packing on structures created during the DWARF import. If packing would change the structure's details, packing is left disabled.
    Parameters:
      `tryPackStructs` - boolean flag to set

  - ### isSpecialCaseSizedBaseTypes

    public boolean isSpecialCaseSizedBaseTypes()
    Option to recognize named base types that have an explicit size in the name (eg "int32_t) and use statically sized data types instead of compiler-dependent data types.
    Returns:
      boolean true if option is turned on

  - ### setSpecialCaseSizedBaseTypes

    public void setSpecialCaseSizedBaseTypes(boolean b)
    Option to recognize named base types that have an explicit size in the name (eg "int32_t) and use statically sized data types instead of compiler-dependent data types.
    Parameters:
      `b` - true to turn option on, false to turn off

  - ### isImportLocalVariables

    public boolean isImportLocalVariables()

  - ### setImportLocalVariables

    public void setImportLocalVariables(boolean importLocalVariables)

  - ### isUseBookmarks

    public boolean isUseBookmarks()

  - ### isOutputSourceLineInfo

    public boolean isOutputSourceLineInfo()
    Option to control whether source map info from DWARF is stored in the Program.
    Returns:
      `true` if option turned on

  - ### setOutputSourceLineInfo

    public void setOutputSourceLineInfo(boolean outputSourceLineInfo)
    Option to control whether source map info from DWARF is stored in the Program.
    Parameters:
      `outputSourceLineInfo` - true to turn option on, false to turn off

  - ### isIgnoreParamStorage

    public boolean isIgnoreParamStorage()

  - ### setIgnoreParamStorage

    public void setIgnoreParamStorage(boolean ignoreParamStorage)

  - ### getDefaultCC

    public String getDefaultCC()

  - ### setDefaultCC

    public void setDefaultCC(String defaultCC)

  - ### getMaxSourceMapEntryLength

    public long getMaxSourceMapEntryLength()
    Option to control the maximum length of a source map entry. If a longer length is calculated it will be replaced with 0.
    Returns:
      max source map entry length

  - ### setMaxSourceMapEntryLength

    public void setMaxSourceMapEntryLength(long maxLength)
    Option to control the maximum length of a source map entry. If a longer length is calculated it will be replaced with 0.
    Parameters:
      `maxLength` - new max source entry length

  - ### isCopyExternalDebugFileSymbols

    public boolean isCopyExternalDebugFileSymbols()

  - ### setCopyExternalDebugFileSymbols

    public void setCopyExternalDebugFileSymbols(boolean b)

  - ### getCharset

    public Charset getCharset(Charset defaultCharset)

  - ### getCharsetName

    public String getCharsetName()

  - ### setCharsetName

    public void setCharsetName(String charsetName)

  - ### isShowVariableStorageInfo

    public boolean isShowVariableStorageInfo()

  - ### setShowVariableStorageInfo

    public void setShowVariableStorageInfo(boolean showVariableStorageInfo)

  - ### isUseStaticStackFrameRegisterValue

    public boolean isUseStaticStackFrameRegisterValue()

  - ### setUseStaticStackFrameRegisterValue

    public void setUseStaticStackFrameRegisterValue(boolean useStaticStackFrameRegisterValue)

  - ### getMacroEnumSetting

    public DWARFImportOptions.MacroEnumSetting getMacroEnumSetting()

  - ### setMacroEnumSetting

    public void setMacroEnumSetting(DWARFImportOptions.MacroEnumSetting setting)

  - ### registerOptions

    public void registerOptions(Options options)
    See `Analyzer.registerOptions(Options, ghidra.program.model.listing.Program)`
    Parameters:
      `options` - `Options`

  - ### optionsChanged

    public void optionsChanged(Options options)
    See `Analyzer.optionsChanged(Options, ghidra.program.model.listing.Program)`
    Parameters:
      `options` - `Options`