Skip to content

Commit

Permalink
Update to latest stable 10.1 release (#30)
Browse files Browse the repository at this point in the history
Updated from 10.0.4 release
  • Loading branch information
ekilmer committed Dec 12, 2021
1 parent 60664e1 commit 387f9b0
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 30 deletions.
29 changes: 5 additions & 24 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -266,11 +266,6 @@ add_executable(decomp_opt
"${library_root}/consolemain.cc"
)
add_executable(sleigh::decomp_opt ALIAS decomp_opt)
if("${SLEIGH_GHIDRA_RELEASE_TYPE}" STREQUAL "HEAD")
target_sources(decomp_opt PRIVATE
"${library_root}/testfunction.cc"
)
endif()

target_compile_definitions(decomp_opt PRIVATE
__TERMINAL__
Expand Down Expand Up @@ -303,14 +298,11 @@ if(SLEIGH_ENABLE_TESTS)
${sleigh_extra_source_list}

"${library_root}/test.cc"

"${library_root}/../unittests/testcirclerange.cc"
"${library_root}/../unittests/testfloatemu.cc"
)
if("${SLEIGH_GHIDRA_RELEASE_TYPE}" STREQUAL "HEAD")
target_sources(ghidra_test_dbg PRIVATE
"${library_root}/../unittests/testtypes.cc"
"${library_root}/../unittests/testcirclerange.cc"
"${library_root}/../unittests/testtypes.cc"
)
endif()

target_link_libraries(ghidra_test_dbg PRIVATE
sleigh::sleigh_settings
Expand All @@ -321,14 +313,9 @@ if(SLEIGH_ENABLE_TESTS)
__TERMINAL__
)

set(extra_test_args "")
if("${SLEIGH_GHIDRA_RELEASE_TYPE}" STREQUAL "HEAD")
# We compile the sla files in our build directory
set(extra_test_args -sleighpath "${CMAKE_CURRENT_BINARY_DIR}")
endif()
add_test(
NAME ghidra_test_dbg
COMMAND ghidra_test_dbg ${extra_test_args} unittests
COMMAND ghidra_test_dbg -sleighpath "${CMAKE_CURRENT_BINARY_DIR}" unittests
)
endif()

Expand All @@ -342,13 +329,6 @@ add_executable(ghidra_opt
${sleigh_ghidra_source_list}
)
add_executable(sleigh::ghidra_opt ALIAS ghidra_opt)
if("${SLEIGH_GHIDRA_RELEASE_TYPE}" STREQUAL "HEAD")
target_sources(ghidra_opt PRIVATE
$<$<CONFIG:DEBUG>:
"${library_root}/testfunction.cc"
>
)
endif()

target_link_libraries(ghidra_opt PRIVATE
sleigh::sleigh_settings
Expand All @@ -361,6 +341,7 @@ if(CMAKE_BUILD_TYPE STREQUAL "Debug")
"${library_root}/ifacedecomp.cc"
"${library_root}/ifaceterm.cc"
"${library_root}/interface.cc"
"${library_root}/testfunction.cc"
)

target_compile_definitions(ghidra_opt PRIVATE
Expand Down
2 changes: 1 addition & 1 deletion cmake/packaging.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# the LICENSE file found in the root directory of this source tree.
#

set(PACKAGE_VERSION 3)
set(PACKAGE_VERSION 1)
if("${SLEIGH_GHIDRA_RELEASE_TYPE}" STREQUAL "HEAD")
set(PACKAGE_VERSION "DEV.${ghidra_short_commit}")
endif()
Expand Down
14 changes: 13 additions & 1 deletion spec-files-list/spec_files_stable.cmake
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
set(spec_file_list
"${ghidrasource_SOURCE_DIR}/Ghidra/Processors/6502/data/languages/6502.slaspec"
"${ghidrasource_SOURCE_DIR}/Ghidra/Processors/6502/data/languages/65c02.slaspec"
"${ghidrasource_SOURCE_DIR}/Ghidra/Processors/68000/data/languages/68020.slaspec"
"${ghidrasource_SOURCE_DIR}/Ghidra/Processors/68000/data/languages/68030.slaspec"
"${ghidrasource_SOURCE_DIR}/Ghidra/Processors/68000/data/languages/68040.slaspec"
Expand All @@ -14,6 +15,7 @@ set(spec_file_list
"${ghidrasource_SOURCE_DIR}/Ghidra/Processors/8085/data/languages/8085.slaspec"
"${ghidrasource_SOURCE_DIR}/Ghidra/Processors/AARCH64/data/languages/AARCH64.slaspec"
"${ghidrasource_SOURCE_DIR}/Ghidra/Processors/AARCH64/data/languages/AARCH64BE.slaspec"
"${ghidrasource_SOURCE_DIR}/Ghidra/Processors/AARCH64/data/languages/AARCH64_AppleSilicon.slaspec"
"${ghidrasource_SOURCE_DIR}/Ghidra/Processors/ARM/data/languages/ARM4_be.slaspec"
"${ghidrasource_SOURCE_DIR}/Ghidra/Processors/ARM/data/languages/ARM4_le.slaspec"
"${ghidrasource_SOURCE_DIR}/Ghidra/Processors/ARM/data/languages/ARM4t_be.slaspec"
Expand All @@ -38,7 +40,17 @@ set(spec_file_list
"${ghidrasource_SOURCE_DIR}/Ghidra/Processors/CR16/data/languages/CR16C.slaspec"
"${ghidrasource_SOURCE_DIR}/Ghidra/Processors/DATA/data/languages/data-be-64.slaspec"
"${ghidrasource_SOURCE_DIR}/Ghidra/Processors/DATA/data/languages/data-le-64.slaspec"
"${ghidrasource_SOURCE_DIR}/Ghidra/Processors/Dalvik/data/languages/Dalvik.slaspec"
"${ghidrasource_SOURCE_DIR}/Ghidra/Processors/Dalvik/data/languages/Dalvik_Base.slaspec"
"${ghidrasource_SOURCE_DIR}/Ghidra/Processors/Dalvik/data/languages/Dalvik_DEX_Android10.slaspec"
"${ghidrasource_SOURCE_DIR}/Ghidra/Processors/Dalvik/data/languages/Dalvik_DEX_Android11.slaspec"
"${ghidrasource_SOURCE_DIR}/Ghidra/Processors/Dalvik/data/languages/Dalvik_DEX_Android12.slaspec"
"${ghidrasource_SOURCE_DIR}/Ghidra/Processors/Dalvik/data/languages/Dalvik_DEX_KitKat.slaspec"
"${ghidrasource_SOURCE_DIR}/Ghidra/Processors/Dalvik/data/languages/Dalvik_DEX_Lollipop.slaspec"
"${ghidrasource_SOURCE_DIR}/Ghidra/Processors/Dalvik/data/languages/Dalvik_DEX_Marshmallow.slaspec"
"${ghidrasource_SOURCE_DIR}/Ghidra/Processors/Dalvik/data/languages/Dalvik_DEX_Nougat.slaspec"
"${ghidrasource_SOURCE_DIR}/Ghidra/Processors/Dalvik/data/languages/Dalvik_DEX_Oreo.slaspec"
"${ghidrasource_SOURCE_DIR}/Ghidra/Processors/Dalvik/data/languages/Dalvik_DEX_Pie.slaspec"
"${ghidrasource_SOURCE_DIR}/Ghidra/Processors/Dalvik/data/languages/Dalvik_ODEX_KitKat.slaspec"
"${ghidrasource_SOURCE_DIR}/Ghidra/Processors/HCS08/data/languages/HC05.slaspec"
"${ghidrasource_SOURCE_DIR}/Ghidra/Processors/HCS08/data/languages/HC08.slaspec"
"${ghidrasource_SOURCE_DIR}/Ghidra/Processors/HCS08/data/languages/HCS08.slaspec"
Expand Down
11 changes: 7 additions & 4 deletions src/setup-ghidra-source.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,13 @@ set_property(CACHE SLEIGH_GHIDRA_RELEASE_TYPE PROPERTY STRINGS "stable" "HEAD")
# **** Setup pinned git info ****

# Ghidra pinned stable version commit
set(ghidra_version "10.0.4")
set(ghidra_git_tag "5b07797cb859d8801ca3a1e08bda1321ca3ce002")
set(ghidra_version "10.1")
set(ghidra_git_tag "2fcf0d21bf360af68dd87e5d8ed270ea1e72554c")
# pinned stable patches list
set(ghidra_patches "")
set(ghidra_patches
PATCH_COMMAND git am --ignore-space-change --ignore-whitespace --no-gpg-sign
"${CMAKE_CURRENT_SOURCE_DIR}/patches/stable/0001-Fix-arg-parsing-in-sleigh-C-test-runner.patch"
)

# Ghidra pinned commits used for pinning last known working HEAD commit
if("${SLEIGH_GHIDRA_RELEASE_TYPE}" STREQUAL HEAD)
Expand All @@ -25,7 +28,7 @@ if("${SLEIGH_GHIDRA_RELEASE_TYPE}" STREQUAL HEAD)
set(ghidra_git_tag "${ghidra_head_git_tag}")
set(ghidra_patches
PATCH_COMMAND git am --ignore-space-change --ignore-whitespace --no-gpg-sign
"${CMAKE_CURRENT_SOURCE_DIR}/patches/HEAD/0001-Fix-arg-parsing-in-sleigh-C-test-runner.patch"
"${CMAKE_CURRENT_SOURCE_DIR}/patches/stable/0001-Fix-arg-parsing-in-sleigh-C-test-runner.patch"
)
endif()

Expand Down

0 comments on commit 387f9b0

Please sign in to comment.