mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-09-28 17:11:11 -09:00
GP-5700: Expose module directories to scripts on request
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
#@menu-group lldb
|
||||
#@icon icon.debugger
|
||||
#@help lldb#android
|
||||
#@depends Debugger-rmi-trace
|
||||
#@enum StartCmd:str "process launch" "process launch --stop-at-entry"
|
||||
#@arg :file "Image" "The target binary executable image"
|
||||
#@env OPT_TARGET_ARGS:str="" "Arguments" "Command-line arguments to pass to the target"
|
||||
@@ -21,8 +22,8 @@
|
||||
|
||||
. ..\support\lldbsetuputils.ps1
|
||||
|
||||
$pypathTrace = Ghidra-Module-PyPath "Debug/Debugger-rmi-trace"
|
||||
$pypathLldb = Ghidra-Module-PyPath "Debug/Debugger-agent-lldb"
|
||||
$pypathTrace = Ghidra-Module-PyPath "Debugger-rmi-trace"
|
||||
$pypathLldb = Ghidra-Module-PyPath
|
||||
$Env:PYTHONPATH = "$pypathLldb;$pypathTrace;$Env:PYTHONPATH"
|
||||
|
||||
$arglist = Compute-Lldb-Platform-Args `
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
#@menu-group lldb
|
||||
#@icon icon.debugger
|
||||
#@help lldb#android
|
||||
#@depends Debugger-rmi-trace
|
||||
#@enum StartCmd:str "process launch" "process launch --stop-at-entry"
|
||||
#@arg :file "Image" "The target binary executable image"
|
||||
#@args "Arguments" "Command-line arguments to pass to the target"
|
||||
@@ -37,8 +38,8 @@
|
||||
|
||||
. ../support/lldbsetuputils.sh
|
||||
|
||||
pypathTrace=$(ghidra-module-pypath "Debug/Debugger-rmi-trace")
|
||||
pypathLldb=$(ghidra-module-pypath "Debug/Debugger-agent-lldb")
|
||||
pypathTrace=$(ghidra-module-pypath "Debugger-rmi-trace")
|
||||
pypathLldb=$(ghidra-module-pypath)
|
||||
export PYTHONPATH=$pypathLldb:$pypathTrace:$PYTHONPATH
|
||||
|
||||
target_image="$1"
|
||||
|
||||
@@ -9,14 +9,15 @@
|
||||
#@menu-group lldb
|
||||
#@icon icon.debugger
|
||||
#@help lldb#macos_kernel
|
||||
#@depends Debugger-rmi-trace
|
||||
#@env OPT_HOST:str="localhost" "Host" "The hostname of the target"
|
||||
#@env OPT_ARCH:str="" "Architecture" "Target architecture override"
|
||||
#@env OPT_LLDB_PATH:file="lldb" "lldb command" "The path to lldb on the local system. Omit the full path to resolve using the system PATH."
|
||||
|
||||
. ..\support\lldbsetuputils.ps1
|
||||
|
||||
$pypathTrace = Ghidra-Module-PyPath "Debug/Debugger-rmi-trace"
|
||||
$pypathLldb = Ghidra-Module-PyPath "Debug/Debugger-agent-lldb"
|
||||
$pypathTrace = Ghidra-Module-PyPath "Debugger-rmi-trace"
|
||||
$pypathLldb = Ghidra-Module-PyPath
|
||||
$Env:PYTHONPATH = "$pypathLldb;$pypathTrace;$Env:PYTHONPATH"
|
||||
|
||||
$arglist = Compute-Lldb-Remote-Args `
|
||||
|
||||
@@ -25,14 +25,15 @@
|
||||
#@menu-group lldb
|
||||
#@icon icon.debugger
|
||||
#@help lldb#macos_kernel
|
||||
#@depends Debugger-rmi-trace
|
||||
#@env OPT_HOST:str="localhost" "Host" "The hostname of the target"
|
||||
#@env OPT_ARCH:str="" "Architecture" "Target architecture override"
|
||||
#@env OPT_LLDB_PATH:file="lldb" "lldb command" "The path to lldb on the local system. Omit the full path to resolve using the system PATH."
|
||||
|
||||
. ../support/lldbsetuputils.sh
|
||||
|
||||
pypathTrace=$(ghidra-module-pypath "Debug/Debugger-rmi-trace")
|
||||
pypathLldb=$(ghidra-module-pypath "Debug/Debugger-agent-lldb")
|
||||
pypathTrace=$(ghidra-module-pypath "Debugger-rmi-trace")
|
||||
pypathLldb=$(ghidra-module-pypath)
|
||||
export PYTHONPATH=$pypathLldb:$pypathTrace:$PYTHONPATH
|
||||
|
||||
function launch-lldb() {
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
#@menu-group lldb
|
||||
#@icon icon.debugger
|
||||
#@help lldb#local
|
||||
#@depends Debugger-rmi-trace
|
||||
#@enum StartCmd:str "process launch" "process launch --stop-at-entry"
|
||||
#@arg :file "Image" "The target binary executable image"
|
||||
#@env OPT_TARGET_ARGS:str="" "Arguments" "Command-line arguments to pass to the target"
|
||||
@@ -18,8 +19,8 @@
|
||||
|
||||
. ..\support\lldbsetuputils.ps1
|
||||
|
||||
$pypathTrace = Ghidra-Module-PyPath "Debug/Debugger-rmi-trace"
|
||||
$pypathLldb = Ghidra-Module-PyPath "Debug/Debugger-agent-lldb"
|
||||
$pypathTrace = Ghidra-Module-PyPath "Debugger-rmi-trace"
|
||||
$pypathLldb = Ghidra-Module-PyPath
|
||||
$Env:PYTHONPATH = "$pypathLldb;$pypathTrace;$Env:PYTHONPATH"
|
||||
|
||||
$arglist = Compute-Lldb-Usermode-Args `
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
#@menu-group lldb
|
||||
#@icon icon.debugger
|
||||
#@help lldb#local
|
||||
#@depends Debugger-rmi-trace
|
||||
#@enum StartCmd:str "process launch" "process launch --stop-at-entry"
|
||||
#@arg :file "Image" "The target binary executable image"
|
||||
#@args "Arguments" "Command-line arguments to pass to the target"
|
||||
@@ -36,8 +37,8 @@
|
||||
|
||||
. ../support/lldbsetuputils.sh
|
||||
|
||||
pypathTrace=$(ghidra-module-pypath "Debug/Debugger-rmi-trace")
|
||||
pypathLldb=$(ghidra-module-pypath "Debug/Debugger-agent-lldb")
|
||||
pypathTrace=$(ghidra-module-pypath "Debugger-rmi-trace")
|
||||
pypathLldb=$(ghidra-module-pypath)
|
||||
export PYTHONPATH=$pypathLldb:$pypathTrace:$PYTHONPATH
|
||||
|
||||
target_image="$1"
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
#@menu-group lldb
|
||||
#@icon icon.debugger
|
||||
#@help lldb#remote
|
||||
#@depends Debugger-rmi-trace
|
||||
#@arg :file "Image" "The target binary executable image (a copy on the local system)"
|
||||
#@env OPT_HOST:str="localhost" "Host" "The hostname of the target"
|
||||
#@env OPT_PORT:str="9999" "Port" "The host's listening port"
|
||||
@@ -18,8 +19,8 @@
|
||||
|
||||
. ..\support\lldbsetuputils.ps1
|
||||
|
||||
$pypathTrace = Ghidra-Module-PyPath "Debug/Debugger-rmi-trace"
|
||||
$pypathLldb = Ghidra-Module-PyPath "Debug/Debugger-agent-lldb"
|
||||
$pypathTrace = Ghidra-Module-PyPath "Debugger-rmi-trace"
|
||||
$pypathLldb = Ghidra-Module-PyPath
|
||||
$Env:PYTHONPATH = "$pypathLldb;$pypathTrace;$Env:PYTHONPATH"
|
||||
|
||||
$arglist = Compute-Lldb-Remote-Args `
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
#@menu-group lldb
|
||||
#@icon icon.debugger
|
||||
#@help lldb#remote
|
||||
#@depends Debugger-rmi-trace
|
||||
#@arg :file "Image" "The target binary executable image (a copy on the local system)"
|
||||
#@env OPT_HOST:str="localhost" "Host" "The hostname of the target"
|
||||
#@env OPT_PORT:str="9999" "Port" "The host's listening port"
|
||||
@@ -34,8 +35,8 @@
|
||||
|
||||
. ../support/lldbsetuputils.sh
|
||||
|
||||
pypathTrace=$(ghidra-module-pypath "Debug/Debugger-rmi-trace")
|
||||
pypathLldb=$(ghidra-module-pypath "Debug/Debugger-agent-lldb")
|
||||
pypathTrace=$(ghidra-module-pypath "Debugger-rmi-trace")
|
||||
pypathLldb=$(ghidra-module-pypath)
|
||||
export PYTHONPATH=$pypathLldb:$pypathTrace:$PYTHONPATH
|
||||
|
||||
target_image="$1"
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
#@timeout 60000
|
||||
#@title lldb via ssh
|
||||
#@image-opt arg:1
|
||||
#@desc <html><body width="300px">
|
||||
@@ -11,6 +10,7 @@
|
||||
#@menu-group lldb
|
||||
#@icon icon.debugger
|
||||
#@help lldb#ssh
|
||||
#@depends Debugger-rmi-trace
|
||||
#@enum StartCmd:str "process launch" "process launch --stop-at-entry"
|
||||
#@enum Endian:str auto big little
|
||||
#@arg :str "Image" "The target binary executable image on the remote system"
|
||||
@@ -60,7 +60,7 @@ finished, try launching again.
|
||||
|
||||
if ($answer) {
|
||||
Write-Host "Copying Wheels to $Env:OPT_HOST"
|
||||
Mitigate-Scp-PyModules "Debug/Debugger-rmi-trace" "Debug/Debugger-agent-lldb"
|
||||
Mitigate-Scp-PyModules "Debugger-rmi-trace" "<SELF>"
|
||||
|
||||
Write-Host "Installing Wheels into LLDB's embedded Python"
|
||||
$arglist = Compute-Lldb-PipInstall-Args "'-f'" "os.environ['HOME']" "'ghidralldb>=$version'"
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
##
|
||||
#@timeout 60000
|
||||
#@title lldb via ssh
|
||||
#@image-opt arg:1
|
||||
#@desc <html><body width="300px">
|
||||
@@ -27,6 +26,7 @@
|
||||
#@menu-group lldb
|
||||
#@icon icon.debugger
|
||||
#@help lldb#ssh
|
||||
#@depends Debugger-rmi-trace
|
||||
#@enum StartCmd:str "process launch" "process launch --stop-at-entry"
|
||||
#@enum Endian:str auto big little
|
||||
#@arg :str "Image" "The target binary executable image on the remote system"
|
||||
@@ -92,7 +92,7 @@ finished, try launching again.
|
||||
" "Would you like to install 'ghidralldb>=$version'?"; then
|
||||
|
||||
echo "Copying Wheels to $OPT_HOST"
|
||||
mitigate-scp-pymodules "Debug/Debugger-rmi-trace" "Debug/Debugger-agent-lldb"
|
||||
mitigate-scp-pymodules "Debugger-rmi-trace" "<SELF>"
|
||||
|
||||
echo "Installing Wheels into LLDB's embedded Python"
|
||||
do-installation
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
|
||||
. ..\..\..\Debugger-rmi-trace\data\support\setuputils.ps1
|
||||
. $Env:MODULE_Debugger_rmi_trace_HOME\data\support\setuputils.ps1
|
||||
|
||||
function Add-Lldb-Init-Args {
|
||||
param([ref]$ArgList)
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
##
|
||||
. ../../../Debugger-rmi-trace/data/support/setuputils.sh
|
||||
. $MODULE_Debugger_rmi_trace_HOME/data/support/setuputils.sh
|
||||
|
||||
add-lldb-init-args() {
|
||||
args+=(-o "version")
|
||||
|
||||
Reference in New Issue
Block a user