ghidra/Ghidra/Debug/Debugger-agent-dbgeng/build.gradle

92 lines
2.8 KiB
Groovy
Raw Normal View History

2021-04-01 18:00:42 +00:00
/* ###
* IP: GHIDRA
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
2020-12-10 14:39:41 +00:00
apply from: "$rootProject.projectDir/gradle/javaProject.gradle"
apply from: "$rootProject.projectDir/gradle/jacocoProject.gradle"
apply from: "$rootProject.projectDir/gradle/javaTestProject.gradle"
apply from: "$rootProject.projectDir/gradle/nativeProject.gradle"
apply from: "$rootProject.projectDir/gradle/distributableGhidraModule.gradle"
apply from: "$rootProject.projectDir/gradle/debugger/hasNodepJar.gradle"
GP-3754: post-review review GP-3754: last pass GP-3754: most review issues address (ymm0/testSave not); tests pass GP-3754: review - eval/exec GP-3754: moved registers to thread GP-3754: review pass 7 - register w/o banks GP-3754: review pass 6 - basic clean-up items GP-3754: pass 5 - tests all pass (minus commented-out ones) GP-3754: review pass 4(?) GP-3754: review pass 3 GP-3754: review pass 2 GP-3754: review pass 1 GP-3754: ref Pybag GP-3754: clean-up GP-3754: testing post-changes in hooks GP-3754: fix for env GP-3754: convenience method for get_debugger GP-3754: tests all running successfully GP-3754: hook tests running GP-3754: hook tests: memory changed not wokring, bpt modified does nothing GP-3754: lot of work to get testExited to pass GP-3754: start on hooks tests; mods to methods not-runnable while running GP-3754: methods tests working GP-3754: bulk of bpt tests running GP-3754: whittling down the list GP-3754: more passing method tests GP-3754: at least a few method tests working (don't run batch) GP-3754: cmd tests pass w/o closing stdin GP-3754: command test basically running GP-3754: 3 cmd tests failing; 3 commented out GP-3754: ghidra_trace_set_values uses broken except for in testGetValues GP-3754: whittling down the command tests GP-3754: tests esp. SetValue GP-3754: testMinimal works but cannot 'execute' GP-3754: JUnits still don't run GP-3754: breakpoints in the list GP-3754: continued work on hooks; bpts not registering as bpts GP-3754: templates for hooks GP-3754: tests, first viable hook (module_load)' GP-3754: first pass at methods GP-3754: memory/regs working GP-3754: most of the puts done GP-3754: modules/regions working GP-3754: process/threads working GP-3754: added to manifest GP-3754: minimal shell: arch faked out / thru activate w/o push
2023-09-12 15:46:10 +00:00
apply from: "$rootProject.projectDir/gradle/debugger/hasPythonPackage.gradle"
apply plugin: 'eclipse'
2020-12-10 14:39:41 +00:00
eclipse.project.name = 'Debug Debugger-agent-dbgeng'
dependencies {
2021-04-12 15:07:06 +00:00
api project(":Framework-AsyncComm")
api project(":Framework-Debugging")
api project(":Debugger-gadp")
2020-12-10 14:39:41 +00:00
2021-04-12 15:07:06 +00:00
//testImplementation project(":Base")
testImplementation project(path: ':Framework-AsyncComm', configuration: 'testArtifacts')
testImplementation project(path: ':Framework-Debugging', configuration: 'testArtifacts')
testImplementation project(path: ":Debugger-gadp", configuration: 'testArtifacts')
2020-12-10 14:39:41 +00:00
}
if ("win_x86_64".equals(getCurrentPlatformName())) {
String makeName = "win_x86_64DbgmodelTlbMake"
task(type: Exec, makeName) {
ext.tmpBatch = file("build/buildTlb.bat")
ext.idl = file("src/main/py/src/ghidradbg/dbgmodel/DbgModel.idl")
ext.tlb = file("build/os/win_x86_64/dbgmodel.tlb")
inputs.file(idl)
outputs.file(tlb)
doFirst {
file(tlb).parentFile.mkdirs()
def midlCmd = "midl /tlb ${tlb} ${idl}"
println "Executing: " + midlCmd
tmpBatch.withWriter { out ->
out.println "call " + VISUAL_STUDIO_VCVARS_CMD
out.println midlCmd
}
}
doLast {
assert file(tlb).exists() : "Failed to build dbgmodel.tlb"
}
commandLine "cmd", "/c", tmpBatch
}
tasks.assemblePyPackage {
from(tasks."$makeName") {
into("src/ghidradbg/dbgmodel/tlb")
}
}
}
else {
tasks.assemblePyPackage {
from(rootProject.BIN_REPO + '/' + getGhidraRelativePath(project) + "/os/win_x86_64/dbgmodel.tlb") {
into("src/ghidradbg/dbgmodel/tlb")
}
}
}
tasks.nodepJar {
2020-12-10 14:39:41 +00:00
manifest {
attributes['Main-Class'] = 'agent.dbgeng.gadp.DbgEngGadpServer'
}
}
test {
jvmArgs('-Xrs') // TODO: Is this needed, or left over from trial-and-error
if ("win_x86_64".equals(getCurrentPlatformName())) {
dependsOn(":Framework-Debugging:testSpecimenWin_x86_64")
2020-12-10 14:39:41 +00:00
}
}