mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-05-28 09:51:37 +08:00
Merge remote-tracking branch 'origin/GP-0-dragonmacher-test-fixes-3-23-21'
This commit is contained in:
+6
-4
@@ -583,20 +583,22 @@ public class CodeBrowserOptionsTest extends AbstractGhidraHeadedIntegrationTest
|
|||||||
final int WORD_WRAP = 3;
|
final int WORD_WRAP = 3;
|
||||||
final int MAX_LINES = 4;
|
final int MAX_LINES = 4;
|
||||||
final int SHOW_REF_ADDR = 5;
|
final int SHOW_REF_ADDR = 5;
|
||||||
final int SHOW_SEMICOLON = 6;
|
//final int SHOW_FUNCTION_AUTO = 6;
|
||||||
|
final int SHOW_SEMICOLON = 7;
|
||||||
showTool(tool);
|
showTool(tool);
|
||||||
loadProgram();
|
loadProgram();
|
||||||
Options options = tool.getOptions(GhidraOptions.CATEGORY_BROWSER_FIELDS);
|
Options options = tool.getOptions(GhidraOptions.CATEGORY_BROWSER_FIELDS);
|
||||||
List<String> names = getOptionNames(options, "EOL Comments Field");
|
List<String> names = getOptionNames(options, "EOL Comments Field");
|
||||||
assertEquals(8, names.size());
|
assertEquals(9, names.size());
|
||||||
assertEquals(EolCommentFieldFactory.ENABLE_ALWAYS_SHOW_AUTOMATIC_MSG, names.get(0));
|
assertEquals(EolCommentFieldFactory.ENABLE_ALWAYS_SHOW_AUTOMATIC_MSG, names.get(0));
|
||||||
assertEquals(EolCommentFieldFactory.ENABLE_ALWAYS_SHOW_REF_REPEATABLE_MSG, names.get(1));
|
assertEquals(EolCommentFieldFactory.ENABLE_ALWAYS_SHOW_REF_REPEATABLE_MSG, names.get(1));
|
||||||
assertEquals(EolCommentFieldFactory.ENABLE_ALWAYS_SHOW_REPEATABLE_MSG, names.get(2));
|
assertEquals(EolCommentFieldFactory.ENABLE_ALWAYS_SHOW_REPEATABLE_MSG, names.get(2));
|
||||||
assertEquals(EolCommentFieldFactory.ENABLE_WORD_WRAP_MSG, names.get(3));
|
assertEquals(EolCommentFieldFactory.ENABLE_WORD_WRAP_MSG, names.get(3));
|
||||||
assertEquals(EolCommentFieldFactory.MAX_DISPLAY_LINES_MSG, names.get(4));
|
assertEquals(EolCommentFieldFactory.MAX_DISPLAY_LINES_MSG, names.get(4));
|
||||||
assertEquals(EolCommentFieldFactory.ENABLE_PREPEND_REF_ADDRESS_MSG, names.get(5));
|
assertEquals(EolCommentFieldFactory.ENABLE_PREPEND_REF_ADDRESS_MSG, names.get(5));
|
||||||
assertEquals(EolCommentFieldFactory.ENABLE_SHOW_SEMICOLON_MSG, names.get(6));
|
assertEquals(EolCommentFieldFactory.SHOW_FUNCTION_AUTOMITIC_COMMENT_MSG, names.get(6));
|
||||||
assertEquals(EolCommentFieldFactory.USE_ABBREVIATED_AUTOMITIC_COMMENT_MSG, names.get(7));
|
assertEquals(EolCommentFieldFactory.ENABLE_SHOW_SEMICOLON_MSG, names.get(7));
|
||||||
|
assertEquals(EolCommentFieldFactory.USE_ABBREVIATED_AUTOMITIC_COMMENT_MSG, names.get(8));
|
||||||
|
|
||||||
Address callAddress = addr("0x1003fcc");
|
Address callAddress = addr("0x1003fcc");
|
||||||
Address callRefAddress = addr("0x1006642");
|
Address callRefAddress = addr("0x1006642");
|
||||||
|
|||||||
+5
-4
@@ -2351,13 +2351,14 @@ public class SymbolManager implements SymbolTable, ManagerDB {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(namespace instanceof NamespaceDB)) {
|
Symbol symbol = namespace.getSymbol();
|
||||||
|
if (!(symbol instanceof SymbolDB)) {
|
||||||
|
// unexpected namespace type; all supported types will be db objects
|
||||||
throw new IllegalArgumentException(
|
throw new IllegalArgumentException(
|
||||||
"Namespace is not a valid parent for symbols: " +
|
"Namespace is not a valid parent for symbols: " + namespace.getClass());
|
||||||
namespace.getClass());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
SymbolDB dbSymbol = (SymbolDB) namespace.getSymbol();
|
SymbolDB dbSymbol = (SymbolDB) symbol;
|
||||||
if (program != dbSymbol.getProgram()) {
|
if (program != dbSymbol.getProgram()) {
|
||||||
throw new IllegalArgumentException(
|
throw new IllegalArgumentException(
|
||||||
"Namespace symbol is from a different program");
|
"Namespace symbol is from a different program");
|
||||||
|
|||||||
@@ -151,12 +151,10 @@ if [ "${MODE}" = "debug" ] || [ "${MODE}" = "debug-suspend" ]; then
|
|||||||
if [ "${MODE}" = "debug-suspend" ]; then
|
if [ "${MODE}" = "debug-suspend" ]; then
|
||||||
SUSPEND=y
|
SUSPEND=y
|
||||||
fi
|
fi
|
||||||
|
|
||||||
VMARG_LIST+=" -Xdebug"
|
|
||||||
VMARG_LIST+=" -Xnoagent"
|
|
||||||
VMARG_LIST+=" -Djava.compiler=NONE"
|
|
||||||
VMARG_LIST+=" -Dlog4j.configuration=\"${DEBUG_LOG4J}\""
|
VMARG_LIST+=" -Dlog4j.configuration=\"${DEBUG_LOG4J}\""
|
||||||
VMARG_LIST+=" -Xrunjdwp:transport=dt_socket,server=y,suspend=${SUSPEND},address=${DEBUG_ADDRESS}"
|
VMARG_LIST+=" -agentlib:jdwp=transport=dt_socket,server=y,suspend=${SUSPEND},address=${DEBUG_ADDRESS}"
|
||||||
|
|
||||||
|
|
||||||
elif [ "${MODE}" = "fg" ]; then
|
elif [ "${MODE}" = "fg" ]; then
|
||||||
:
|
:
|
||||||
|
|||||||
@@ -123,7 +123,7 @@ if "%JAVA_HOME%" == "" (
|
|||||||
rem reestablish JAVA path based upon final JAVA_HOME
|
rem reestablish JAVA path based upon final JAVA_HOME
|
||||||
set "JAVA=%JAVA_HOME%\bin\java.exe"
|
set "JAVA=%JAVA_HOME%\bin\java.exe"
|
||||||
|
|
||||||
:: set DEBUG=-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=*:18888
|
:: set DEBUG=-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:18888
|
||||||
|
|
||||||
if "%OPTION%"=="console" (
|
if "%OPTION%"=="console" (
|
||||||
start "%APP_LONG_NAME%" "%JAVA%" %DEBUG% -jar "%WRAPPER_HOME%/wrapper.jar" -c "%WRAPPER_CONF%"
|
start "%APP_LONG_NAME%" "%JAVA%" %DEBUG% -jar "%WRAPPER_HOME%/wrapper.jar" -c "%WRAPPER_CONF%"
|
||||||
|
|||||||
@@ -136,11 +136,8 @@ if "%DEBUG%"=="y" (
|
|||||||
set DEBUG_ADDRESS=127.0.0.1:18001
|
set DEBUG_ADDRESS=127.0.0.1:18001
|
||||||
)
|
)
|
||||||
|
|
||||||
set VMARG_LIST=!VMARG_LIST! -Xdebug
|
set VMARG_LIST=!VMARG_LIST! -Dlog4j.configuration="!DEBUG_LOG4J!"
|
||||||
set VMARG_LIST=!VMARG_LIST! -Xnoagent
|
set VMARG_LIST=!VMARG_LIST! -agentlib:jdwp=transport=dt_socket,server=y,suspend=!SUSPEND!,address=!DEBUG_ADDRESS!
|
||||||
set VMARG_LIST=!VMARG_LIST! -Djava.compiler=NONE
|
|
||||||
set VMARG_LIST=!VMARG_LIST! -Dlog4j.configuration="!DEBUG_LOG4J!"
|
|
||||||
set VMARG_LIST=!VMARG_LIST! -Xrunjdwp:transport=dt_socket,server=y,suspend=!SUSPEND!,address=!DEBUG_ADDRESS!
|
|
||||||
goto continue3
|
goto continue3
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -179,10 +179,18 @@ def initTestJVM(Task task, String rootDirName) {
|
|||||||
'-Djdk.attach.allowAttachSelf',
|
'-Djdk.attach.allowAttachSelf',
|
||||||
'-javaagent:' + jmockitPath,
|
'-javaagent:' + jmockitPath,
|
||||||
'-DLock.DEBUG=true',
|
'-DLock.DEBUG=true',
|
||||||
'-Xdebug',
|
'-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=' + debugPort
|
||||||
'-Xnoagent',
|
|
||||||
'-Djava.compiler=NONE',
|
|
||||||
'-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=' + debugPort
|
// Note: modern remote debug invocation;
|
||||||
|
// -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8000
|
||||||
|
|
||||||
|
//
|
||||||
|
// We removed these lines, which should not be needed in modern JVMs
|
||||||
|
// -Xdebug
|
||||||
|
// -Xnoagent
|
||||||
|
// -Djava.compiler=NONE
|
||||||
|
// -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8000
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/*********************************************************************************
|
/*********************************************************************************
|
||||||
|
|||||||
+12
-4
@@ -347,10 +347,18 @@ def initTestJVM(Task task, String rootDirName) {
|
|||||||
'-Djdk.attach.allowAttachSelf',
|
'-Djdk.attach.allowAttachSelf',
|
||||||
'-javaagent:' + jmockitPath,
|
'-javaagent:' + jmockitPath,
|
||||||
'-DLock.DEBUG=true',
|
'-DLock.DEBUG=true',
|
||||||
'-Xdebug',
|
'-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=' + debugPort
|
||||||
'-Xnoagent',
|
|
||||||
'-Djava.compiler=NONE',
|
|
||||||
'-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=' + debugPort
|
// Note: modern remote debug invocation;
|
||||||
|
// -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8000
|
||||||
|
|
||||||
|
//
|
||||||
|
// We removed these lines, which should not be needed in modern JVMs
|
||||||
|
// -Xdebug
|
||||||
|
// -Xnoagent
|
||||||
|
// -Djava.compiler=NONE
|
||||||
|
// -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8000
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user