mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-05-31 06:12:02 +08:00
Updated remote vm debug command-line options
This commit is contained in:
@@ -152,11 +152,9 @@ if [ "${MODE}" = "debug" ] || [ "${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! -Xnoagent
|
|
||||||
set VMARG_LIST=!VMARG_LIST! -Djava.compiler=NONE
|
|
||||||
set VMARG_LIST=!VMARG_LIST! -Dlog4j.configuration="!DEBUG_LOG4J!"
|
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!
|
set VMARG_LIST=!VMARG_LIST! -agentlib:jdwp=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