mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-09-28 17:11:11 -09:00
GP-2647 Add/Modify system properties for PDB Universal
This commit is contained in:
@@ -32,7 +32,7 @@ public class PdbLog {
|
|||||||
|
|
||||||
private static Writer nullWriter;
|
private static Writer nullWriter;
|
||||||
private static Writer fileWriter;
|
private static Writer fileWriter;
|
||||||
private static final boolean SYSTEM_LOGGING_ENABLED = Boolean.getBoolean("pdb.logging");
|
private static final boolean SYSTEM_LOGGING_ENABLED = Boolean.getBoolean("ghidra.pdb.logging");
|
||||||
private static boolean enabled = SYSTEM_LOGGING_ENABLED;
|
private static boolean enabled = SYSTEM_LOGGING_ENABLED;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -31,8 +31,8 @@ import ghidra.util.exception.AssertException;
|
|||||||
*/
|
*/
|
||||||
public class PdbApplicatorOptions {
|
public class PdbApplicatorOptions {
|
||||||
|
|
||||||
// Developer turn on/off options that are in still in development.
|
// Developer turn on/off options that are in still in development. See launch.properties.
|
||||||
private static final boolean developerMode = false;
|
private static final boolean DEVELOPER_MODE = Boolean.getBoolean("ghidra.pdb.developerMode");
|
||||||
|
|
||||||
// Applicator Control.
|
// Applicator Control.
|
||||||
private static final String OPTION_NAME_PROCESSING_CONTROL = "Control";
|
private static final String OPTION_NAME_PROCESSING_CONTROL = "Control";
|
||||||
@@ -181,13 +181,13 @@ public class PdbApplicatorOptions {
|
|||||||
private void registerOptions(Options options, boolean enableControl) {
|
private void registerOptions(Options options, boolean enableControl) {
|
||||||
HelpLocation help = null;
|
HelpLocation help = null;
|
||||||
|
|
||||||
if (developerMode || enableControl) {
|
if (DEVELOPER_MODE || enableControl) {
|
||||||
options.registerOption(OPTION_NAME_PROCESSING_CONTROL, PdbApplicatorControl.ALL, help,
|
options.registerOption(OPTION_NAME_PROCESSING_CONTROL, PdbApplicatorControl.ALL, help,
|
||||||
OPTION_DESCRIPTION_PROCESSING_CONTROL);
|
OPTION_DESCRIPTION_PROCESSING_CONTROL);
|
||||||
}
|
}
|
||||||
|
|
||||||
// PdbApplicatorOptions
|
// PdbApplicatorOptions
|
||||||
if (developerMode) {
|
if (DEVELOPER_MODE) {
|
||||||
|
|
||||||
options.registerOption(OPTION_NAME_APPLY_CODE_SCOPE_BLOCK_COMMENTS,
|
options.registerOption(OPTION_NAME_APPLY_CODE_SCOPE_BLOCK_COMMENTS,
|
||||||
applyCodeScopeBlockComments, help,
|
applyCodeScopeBlockComments, help,
|
||||||
@@ -232,12 +232,12 @@ public class PdbApplicatorOptions {
|
|||||||
|
|
||||||
private void loadOptions(Options options, boolean enableControl) {
|
private void loadOptions(Options options, boolean enableControl) {
|
||||||
|
|
||||||
if (developerMode || enableControl) {
|
if (DEVELOPER_MODE || enableControl) {
|
||||||
control = options.getEnum(OPTION_NAME_PROCESSING_CONTROL, PdbApplicatorControl.ALL);
|
control = options.getEnum(OPTION_NAME_PROCESSING_CONTROL, PdbApplicatorControl.ALL);
|
||||||
}
|
}
|
||||||
|
|
||||||
// PdbApplicatorOptions
|
// PdbApplicatorOptions
|
||||||
if (developerMode) {
|
if (DEVELOPER_MODE) {
|
||||||
|
|
||||||
applyCodeScopeBlockComments = options.getBoolean(
|
applyCodeScopeBlockComments = options.getBoolean(
|
||||||
OPTION_NAME_APPLY_CODE_SCOPE_BLOCK_COMMENTS, applyCodeScopeBlockComments);
|
OPTION_NAME_APPLY_CODE_SCOPE_BLOCK_COMMENTS, applyCodeScopeBlockComments);
|
||||||
|
|||||||
@@ -91,5 +91,8 @@ VMARGS=--add-opens=java.desktop/sun.awt.image=ALL-UNNAMED
|
|||||||
# Limit on XML parsing. See https://docs.oracle.com/javase/tutorial/jaxp/limits/limits.html
|
# Limit on XML parsing. See https://docs.oracle.com/javase/tutorial/jaxp/limits/limits.html
|
||||||
#VMARGS=-Djdk.xml.totalEntitySizeLimit=50000000
|
#VMARGS=-Djdk.xml.totalEntitySizeLimit=50000000
|
||||||
|
|
||||||
# Enables Pdb debug logging during import and analysis to .ghidra/.ghidra_ver/pdb.analyzer.log
|
# Enables PDB debug logging during import and analysis to .ghidra/.ghidra_ver/pdb.analyzer.log
|
||||||
#VMARGS=-Dpdb.logging=true
|
#VMARGS=-Dghidra.pdb.logging=true
|
||||||
|
|
||||||
|
# Enables PDB developer mode
|
||||||
|
#VMARGS=-Dghidra.pdb.developerMode=true
|
||||||
|
|||||||
Reference in New Issue
Block a user