Skip to content

Commit 3d507fc

Browse files
authored
Ghidra 11.4
2 parents cb80fea + 96f11df commit 3d507fc

File tree

2,928 files changed

+203970
-74516
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,928 files changed

+203970
-74516
lines changed

DevGuide.md

Lines changed: 48 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,6 +354,53 @@ We also provide out-of-the-box QEMU integration via GDB.
354354

355355
When submitting help tickets and pull requests, please tag those related to the debugger with "Debugger" so that we can triage them more quickly.
356356

357+
## Troubleshooting and Help
358+
359+
### Eclipse Issues
360+
After pulling or syncing with the latest Ghidra source repository, you might run into the following
361+
issues in Eclipse:
362+
363+
* __Problem:__ _There are Eclipse compilation errors that I don't know how to deal with...I give up!_
364+
* __Solution:__
365+
* From Eclipse, collapse all projects in the _Package Explorer_ or _Project Explorer_ by
366+
clicking the `` icon in that frame
367+
* Locate any projects in the _Package Explorer_ or _Project Explorer_ that have little `?` icons
368+
on them (these projects should no longer be in source control)
369+
* Right-click on __only them__, and then click _Delete_.
370+
* __CHECK__ the _"Delete project contents on disk"_ checkbox.
371+
* Click _OK_ (confirm git does not contain any new unstaged files for delete)
372+
* Select all projects in the _Package Explorer_ or _Project Explorer_
373+
* Right-click on them, and then click _Delete_ (this may not work if projects are not collapsed)
374+
* Leave _"Delete project contents on disk"_ checkbox __UNCHECKED__
375+
* Click _OK_. You should now have an empty _Package Explorer_ or _Project Explorer_.
376+
* `gradle -I gradle/support/fetchDependencies.gradle`
377+
* `gradle prepdev cleanEclipse eclipse buildNatives`
378+
* From Eclipse, _File -> Import..._
379+
* _General | Existing Projects into Workspace_
380+
* Select root directory to be your downloaded or cloned ghidra source repository
381+
* Check _"Search for nested projects"_
382+
* Click _Finish_
383+
384+
This should get Eclipse back to a fresh state. There should never be a need to re-clone the
385+
repository.
386+
387+
* __Problem:__ _The Ghidra run configurations (launchers) are missing_.
388+
* __Solution:__
389+
The Ghidra run configurations are kept under source control in various modules' `.launch/`
390+
directories (i.e., `Ghidra/Features/Base/.launch/`). As long as the corresponding module
391+
project is imported into Eclipse (i.e., `Features Base`), the run configurations should be
392+
available in Eclipse under _Run -> Run Configurations_. If they aren't there and the
393+
projects are imported, try closing and reopening Eclipse.
394+
395+
__NOTE:__ Sometimes you have to launch Ghidra via the _Run -> Run Configurations..._ window one
396+
time for the run configuration to show up under the favorites menu in the main Eclipse button
397+
bar.
398+
399+
__NOTE:__ Never address missing run configurations by manually importing them via _File ->
400+
Import... -> Run/Debug -> Launch Configurations._ This avoids the real issue and will
401+
inevitably result in duplicate run configurations showing up one day, which can cause
402+
additional confusion.
403+
357404
## Known Issues
358405
* There is a known issue in Gradle that can prevent it from discovering native toolchains on Linux
359406
if a non-English system locale is being used. As a workaround, set the following environment
@@ -363,7 +410,7 @@ When submitting help tickets and pull requests, please tag those related to the
363410

364411
[java]: https://dev.java
365412
[cpp]: https://isocpp.org
366-
[sleigh]: https://htmlpreview.github.io/?https://github.com/NationalSecurityAgency/ghidra/blob/master/GhidraDocs/languages/index.html
413+
[sleigh]: https://htmlpreview.github.io/?https://github.com/NationalSecurityAgency/ghidra/blob/stable/GhidraDocs/languages/index.html
367414
[python]: https://www.python.org
368415
[venv]: https://docs.python.org/3/tutorial/venv.html
369416
[jython]: https://www.jython.org

GPL/DMG/src/dmg/java/mobiledevices/dmg/ghidra/GDataConverterBE.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,6 @@
1313
public class GDataConverterBE implements GDataConverter {
1414
public static final GDataConverterBE INSTANCE = new GDataConverterBE();
1515

16-
/**
17-
*
18-
*/
1916
private static final long serialVersionUID = 1L;
2017

2118
/**

GPL/DMG/src/dmg/java/mobiledevices/dmg/ghidra/GDataConverterLE.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,7 @@
1111

1212
public class GDataConverterLE implements GDataConverter {
1313
public static GDataConverterLE INSTANCE = new GDataConverterLE();
14-
/**
15-
*
16-
*/
14+
1715
private static final long serialVersionUID = 1L;
1816

1917
/**

GPL/DemanglerGnu/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ def srcVersion24 = "src/demangler_gnu_v2_24"
3535
*/
3636
task zipBuildableSource(type:Zip) {
3737

38-
group 'private'
39-
description "Collects the source files needed to build this module."
38+
group = 'private'
39+
description = "Collects the source files needed to build this module."
4040
archiveBaseName = project.name + "-src-for-build"
4141
archiveExtension = 'zip'
4242

GPL/GnuDisassembler/buildGdis.gradle

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,8 @@ gradle.taskGraph.whenReady {
7676
* Task to unpack the standard binutils zip file
7777
*******************************************************************************************/
7878
task binutilsUnpack {
79-
description "Unpack binutils (for building gdis)"
80-
group "Native Build Dependencies"
79+
description = "Unpack binutils (for building gdis)"
80+
group = "Native Build Dependencies"
8181
outputs.file { binutilsUnpackDir }
8282
onlyIf { !binutilsUnpackDir.exists() }
8383

@@ -104,8 +104,8 @@ supportedPlatforms.each { platform ->
104104
def artifactsDir = file("build/binutils/${platform}")
105105

106106
task(buildName) {
107-
description "Configure and make binutils for $platform (for building gdis)"
108-
group "Native Prebuild Dependencies"
107+
description ="Configure and make binutils for $platform (for building gdis)"
108+
group = "Native Prebuild Dependencies"
109109

110110
onlyIf { !configDir.exists() }
111111

@@ -122,21 +122,21 @@ supportedPlatforms.each { platform ->
122122
println "Configuring binutils - config directory: $configDir"
123123
println "${binutilsDir}/configure --prefix=\"${configDir}\" --enable-targets=all --with-zlib=no --disable-nls --disable-werror"
124124
configDir.mkdirs();
125-
exec {
125+
providers.exec {
126126
workingDir configDir
127127
commandLine "${binutilsDir}/configure", "--prefix=${configDir}", "--enable-targets=all", "--with-zlib=no", "--disable-nls", "--disable-werror"
128-
}
128+
}.result.get()
129129

130130
println "Building binutils - config directory: $configDir"
131-
exec {
131+
providers.exec {
132132
commandLine "make", "-C", "${configDir}", "all"
133-
}
133+
}.result.get()
134134
}
135135
}
136136

137137
task(postBuildName, type: Copy) {
138-
description "Copy binutil artifcacts for $platform (for building gdis)"
139-
group "Native Prebuild Dependencies"
138+
description = "Copy binutil artifcacts for $platform (for building gdis)"
139+
group = "Native Prebuild Dependencies"
140140

141141
dependsOn buildName
142142

GPL/nativeBuildProperties.gradle

Lines changed: 15 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -34,39 +34,25 @@ model {
3434
}
3535
}
3636

37-
// The toolChains block is needed because Gradle doesn't find gcc/clang on ARM-based Linux
38-
// and macOS platforms without explicitly declaring their targets. Might be a bug in the
39-
// native Gradle plugin.
37+
// The toolChains block is needed because Gradle doesn't find the native toolchain in various
38+
// scenarios. These checks, can be removed when Gradle fixes them, and we advertise a
39+
// minimum Gradle version that includes the fix.
4040
toolChains {
41-
if (isCurrentLinux()) {
42-
gcc(Gcc) {
43-
if (isCurrentArm_64()) {
44-
target("linux_arm_64")
45-
}
46-
}
41+
def current = getCurrentPlatformName()
42+
if (isLinux(current)) {
43+
// https://github.com/gradle/gradle/issues/17660 (fixed in Gradle 8.11)
44+
gcc(Gcc).target(current)
45+
clang(Clang).target(current)
4746
}
48-
if (isCurrentMac()) {
49-
clang(Clang) {
50-
if (isCurrentArm_64()) {
51-
target("mac_arm_64")
52-
}
53-
}
54-
}
55-
if (isCurrentFreeBSD()) {
56-
gcc(Gcc) {
57-
if (isCurrentArm_64()) {
58-
target("freebsd_arm_64")
59-
}
60-
else {
61-
target("freebsd_x86_64")
62-
}
63-
}
47+
if (isFreeBSD(current)) {
48+
// https://github.com/gradle/gradle/issues/32895
49+
gcc(Gcc).target(current)
50+
clang(Clang).target(current)
6451
}
65-
if (isCurrentWindows() && VISUAL_STUDIO_INSTALL_DIR) {
66-
// specify installDir because Gradle doesn't find VS Build Tools.
67-
// See https://github.com/gradle/gradle-native/issues/617#issuecomment-575735288
52+
if (isWindows(current) && VISUAL_STUDIO_INSTALL_DIR) {
53+
// https://github.com/gradle/gradle-native/issues/617#issuecomment-575735288
6854
visualCpp(VisualCpp) {
69-
installDir VISUAL_STUDIO_INSTALL_DIR
55+
installDir = VISUAL_STUDIO_INSTALL_DIR
7056
}
7157
}
7258
}

GPL/vsconfig.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def configureVisualStudio() {
4545
println " -> Visual Studio vswhere.exe returned an error code (${vswhereExit})!"
4646
}
4747
println " -> Please confirm ${vswherePath} is version 2.5 or later."
48-
println " -> Please check README.md or InstallationGuide.html to verify you are using a supported version of Visual Studio."
48+
println " -> Please check README.md or GettingStarted.md to verify you are using a supported version of Visual Studio."
4949
return
5050
}
5151
def vswhereJson = new groovy.json.JsonSlurper().parseText(vswhereOutput);

0 commit comments

Comments
 (0)