Files
auto-updater[bot] ddfe4bff8e Update Ghidra and regenerate patches (#167)
* Bump Ghidra HEAD commit a6be09898

* Bump to stable Ghidra 10.2.3

* Add new 'testfuncproto' source file for testing

* Regenerate patches

Better automated refactoring for removal of 'using' declarations in
header files. See https://github.com/ekilmer/remusing_cpp for automated
tool. Some manual fixes are still required, but they are small. Setting
'using namespace std;' in source files is still a manual process due to
edge-cases that are hard to detect.

* Add missing include path for libconfig.h

Only affects 'sleigh_support' library

Changed files:

```
M	Ghidra/Features/Decompiler/src/decompile/cpp/Makefile
M	Ghidra/Features/Decompiler/src/decompile/cpp/address.cc
M	Ghidra/Features/Decompiler/src/decompile/cpp/address.hh
M	Ghidra/Features/Decompiler/src/decompile/cpp/architecture.cc
M	Ghidra/Features/Decompiler/src/decompile/cpp/block.cc
M	Ghidra/Features/Decompiler/src/decompile/cpp/capability.hh
M	Ghidra/Features/Decompiler/src/decompile/cpp/consolemain.cc
M	Ghidra/Features/Decompiler/src/decompile/cpp/coreaction.cc
M	Ghidra/Features/Decompiler/src/decompile/cpp/coreaction.hh
M	Ghidra/Features/Decompiler/src/decompile/cpp/error.hh
M	Ghidra/Features/Decompiler/src/decompile/cpp/filemanage.hh
M	Ghidra/Features/Decompiler/src/decompile/cpp/float.cc
M	Ghidra/Features/Decompiler/src/decompile/cpp/flow.cc
M	Ghidra/Features/Decompiler/src/decompile/cpp/fspec.cc
M	Ghidra/Features/Decompiler/src/decompile/cpp/fspec.hh
M	Ghidra/Features/Decompiler/src/decompile/cpp/funcdata_block.cc
M	Ghidra/Features/Decompiler/src/decompile/cpp/ghidra_process.hh
M	Ghidra/Features/Decompiler/src/decompile/cpp/heritage.cc
M	Ghidra/Features/Decompiler/src/decompile/cpp/ifacedecomp.cc
M	Ghidra/Features/Decompiler/src/decompile/cpp/ifacedecomp.hh
M	Ghidra/Features/Decompiler/src/decompile/cpp/inject_ghidra.cc
M	Ghidra/Features/Decompiler/src/decompile/cpp/interface.hh
M	Ghidra/Features/Decompiler/src/decompile/cpp/jumptable.cc
M	Ghidra/Features/Decompiler/src/decompile/cpp/marshal.cc
M	Ghidra/Features/Decompiler/src/decompile/cpp/marshal.hh
M	Ghidra/Features/Decompiler/src/decompile/cpp/merge.cc
M	Ghidra/Features/Decompiler/src/decompile/cpp/op.cc
M	Ghidra/Features/Decompiler/src/decompile/cpp/op.hh
M	Ghidra/Features/Decompiler/src/decompile/cpp/opcodes.hh
M	Ghidra/Features/Decompiler/src/decompile/cpp/partmap.hh
M	Ghidra/Features/Decompiler/src/decompile/cpp/printlanguage.cc
M	Ghidra/Features/Decompiler/src/decompile/cpp/ruleaction.cc
M	Ghidra/Features/Decompiler/src/decompile/cpp/slgh_compile.cc
M	Ghidra/Features/Decompiler/src/decompile/cpp/slgh_compile.hh
M	Ghidra/Features/Decompiler/src/decompile/cpp/slghsymbol.cc
M	Ghidra/Features/Decompiler/src/decompile/cpp/space.cc
M	Ghidra/Features/Decompiler/src/decompile/cpp/space.hh
M	Ghidra/Features/Decompiler/src/decompile/cpp/test.cc
M	Ghidra/Features/Decompiler/src/decompile/cpp/test.hh
M	Ghidra/Features/Decompiler/src/decompile/cpp/testfunction.cc
M	Ghidra/Features/Decompiler/src/decompile/cpp/testfunction.hh
M	Ghidra/Features/Decompiler/src/decompile/cpp/translate.cc
M	Ghidra/Features/Decompiler/src/decompile/cpp/type.cc
M	Ghidra/Features/Decompiler/src/decompile/cpp/typeop.cc
M	Ghidra/Features/Decompiler/src/decompile/cpp/variable.cc
M	Ghidra/Features/Decompiler/src/decompile/cpp/variable.hh
M	Ghidra/Features/Decompiler/src/decompile/cpp/varnode.cc
M	Ghidra/Features/Decompiler/src/decompile/cpp/varnode.hh
M	Ghidra/Features/Decompiler/src/decompile/cpp/xml.hh
A	Ghidra/Features/Decompiler/src/decompile/datatests/condconst.xml
A	Ghidra/Features/Decompiler/src/decompile/datatests/condmulti.xml
A	Ghidra/Features/Decompiler/src/decompile/datatests/retstruct.xml
M	Ghidra/Features/Decompiler/src/decompile/unittests/testfloatemu.cc
A	Ghidra/Features/Decompiler/src/decompile/unittests/testfuncproto.cc
M	Ghidra/Features/Decompiler/src/decompile/unittests/testmarshal.cc
M	Ghidra/Processors/6502/data/languages/65c02.slaspec
M	Ghidra/Processors/68000/data/languages/68000.sinc
M	Ghidra/Processors/AARCH64/certification.manifest
M	Ghidra/Processors/AARCH64/data/languages/AARCH64_win.cspec
A	Ghidra/Processors/AARCH64/data/patterns/AARCH64_win_patterns.xml
A	Ghidra/Processors/AARCH64/data/patterns/prepatternconstraints.xml
M	Ghidra/Processors/AARCH64/src/main/java/ghidra/app/util/bin/format/elf/relocation/AARCH64_ElfRelocationHandler.java
M	Ghidra/Processors/AARCH64/src/main/java/ghidra/app/util/bin/format/macho/relocation/AARCH64_MachoRelocationHandler.java
M	Ghidra/Processors/ARM/data/languages/ARM.ldefs
M	Ghidra/Processors/ARM/data/languages/ARMTHUMBinstructions.sinc
M	Ghidra/Processors/ARM/data/languages/ARMneon.sinc
M	Ghidra/Processors/ARM/src/main/java/ghidra/app/util/bin/format/elf/relocation/ARM_ElfRelocationContext.java
M	Ghidra/Processors/ARM/src/main/java/ghidra/app/util/bin/format/elf/relocation/ARM_ElfRelocationHandler.java
M	Ghidra/Processors/ARM/src/main/java/ghidra/app/util/bin/format/macho/relocation/ARM_MachoRelocationHandler.java
M	Ghidra/Processors/Atmel/data/languages/avr32a.slaspec
M	Ghidra/Processors/Atmel/data/languages/avr32a_dsp_operations.sinc
M	Ghidra/Processors/Atmel/src/main/java/ghidra/app/util/bin/format/elf/relocation/AVR32_ElfRelocationHandler.java
M	Ghidra/Processors/Atmel/src/main/java/ghidra/app/util/bin/format/elf/relocation/AVR8_ElfRelocationHandler.java
M	Ghidra/Processors/MC6800/data/languages/6x09.sinc
M	Ghidra/Processors/MIPS/certification.manifest
M	Ghidra/Processors/MIPS/data/languages/mips.sinc
M	Ghidra/Processors/MIPS/data/languages/mips32Instructions.sinc
M	Ghidra/Processors/MIPS/data/languages/mips32R6be.slaspec
M	Ghidra/Processors/MIPS/data/languages/mips32R6le.slaspec
M	Ghidra/Processors/MIPS/data/languages/mips32_fp64.cspec
M	Ghidra/Processors/MIPS/data/languages/mips32be.cspec
M	Ghidra/Processors/MIPS/data/languages/mips32be.slaspec
M	Ghidra/Processors/MIPS/data/languages/mips32be_eabi.cspec
M	Ghidra/Processors/MIPS/data/languages/mips32le.cspec
M	Ghidra/Processors/MIPS/data/languages/mips32le.slaspec
M	Ghidra/Processors/MIPS/data/languages/mips32le_eabi.cspec
M	Ghidra/Processors/MIPS/data/languages/mips64.cspec
M	Ghidra/Processors/MIPS/data/languages/mips64_32_n32.cspec
M	Ghidra/Processors/MIPS/data/languages/mips64_32_o32.cspec
M	Ghidra/Processors/MIPS/data/languages/mips64_32_o64.cspec
M	Ghidra/Processors/MIPS/data/languages/mips64be.slaspec
M	Ghidra/Processors/MIPS/data/languages/mips64le.slaspec
A	Ghidra/Processors/MIPS/data/languages/mips_dsp.sinc
A	Ghidra/Processors/MIPS/data/languages/mips_mt.sinc
M	Ghidra/Processors/MIPS/src/main/java/ghidra/app/plugin/core/analysis/MipsAddressAnalyzer.java
M	Ghidra/Processors/MIPS/src/main/java/ghidra/app/util/bin/format/elf/extend/MIPS_ElfExtension.java
A	Ghidra/Processors/MIPS/src/main/java/ghidra/app/util/bin/format/elf/relocation/MIPS_ElfRelocationContext.java
M	Ghidra/Processors/MIPS/src/main/java/ghidra/app/util/bin/format/elf/relocation/MIPS_ElfRelocationHandler.java
M	Ghidra/Processors/PIC/src/main/java/ghidra/app/util/bin/format/elf/relocation/PIC30_ElfRelocationContext.java
M	Ghidra/Processors/PIC/src/main/java/ghidra/app/util/bin/format/elf/relocation/PIC30_ElfRelocationHandler.java
M	Ghidra/Processors/PowerPC/src/main/java/ghidra/app/util/bin/format/elf/extend/PowerPC_ElfExtension.java
M	Ghidra/Processors/PowerPC/src/main/java/ghidra/app/util/bin/format/elf/relocation/PowerPC64_ElfRelocationHandler.java
M	Ghidra/Processors/PowerPC/src/main/java/ghidra/app/util/bin/format/elf/relocation/PowerPC_ElfRelocationHandler.java
M	Ghidra/Processors/RISCV/data/languages/riscv32-fp.cspec
M	Ghidra/Processors/RISCV/data/languages/riscv32.cspec
M	Ghidra/Processors/RISCV/data/languages/riscv64-fp.cspec
M	Ghidra/Processors/RISCV/data/languages/riscv64.cspec
M	Ghidra/Processors/RISCV/src/main/java/ghidra/app/util/bin/format/elf/relocation/RISCV_ElfRelocationHandler.java
M	Ghidra/Processors/Sparc/data/languages/SparcV9.sinc
M	Ghidra/Processors/Sparc/src/main/java/ghidra/app/util/bin/format/elf/relocation/SPARC_ElfRelocationHandler.java
M	Ghidra/Processors/SuperH4/src/main/java/ghidra/app/util/bin/format/elf/relocation/SH_ElfRelocationHandler.java
M	Ghidra/Processors/Toy/certification.manifest
M	Ghidra/Processors/Toy/data/languages/toy.pspec
M	Ghidra/Processors/tricore/data/languages/tricore.cspec
M	Ghidra/Processors/tricore/data/languages/tricore.ldefs
M	Ghidra/Processors/tricore/data/languages/tricore.sinc
M	Ghidra/Processors/x86/data/languages/ia.sinc
M	Ghidra/Processors/x86/src/main/java/ghidra/app/util/bin/format/coff/relocation/X86_32_CoffRelocationHandler.java
M	Ghidra/Processors/x86/src/main/java/ghidra/app/util/bin/format/coff/relocation/X86_64_CoffRelocationHandler.java
M	Ghidra/Processors/x86/src/main/java/ghidra/app/util/bin/format/elf/relocation/X86_32_ElfRelocationHandler.java
A	Ghidra/Processors/x86/src/main/java/ghidra/app/util/bin/format/elf/relocation/X86_64_ElfRelocationContext.java
M	Ghidra/Processors/x86/src/main/java/ghidra/app/util/bin/format/elf/relocation/X86_64_ElfRelocationHandler.java
M	Ghidra/Processors/x86/src/main/java/ghidra/app/util/bin/format/macho/relocation/X86_32_MachoRelocationHandler.java
M	Ghidra/Processors/x86/src/main/java/ghidra/app/util/bin/format/macho/relocation/X86_64_MachoRelocationHandler.java
```
2023-03-22 19:14:38 -04:00

101 lines
2.9 KiB
CMake

#
# Copyright (c) 2021-present, Trail of Bits, Inc.
# All rights reserved.
#
# This source code is licensed in accordance with the terms specified in
# the LICENSE file found in the root directory of this source tree.
#
# Generate the build and install directories to use in the support helpers
configure_file(
"${CMAKE_CURRENT_LIST_DIR}/SpecFilePaths.h.in"
"${CMAKE_CURRENT_BINARY_DIR}/include/sleigh/SpecFilePaths.h"
@ONLY
)
# Based on: https://github.com/andrew-hardin/cmake-git-version-tracking/blob/98441f9dc056b8d3d4b4287b09e6a99775d70305/better-example/CMakeLists.txt
# By Andrew Hardin
# Released under the MIT License.
# https://raw.githubusercontent.com/andrew-hardin/cmake-git-version-tracking/98441f9dc056b8d3d4b4287b09e6a99775d70305/LICENSE
#
# Define the two required variables before including
# the source code for watching a git repository.
set(PRE_CONFIGURE_FILE "${CMAKE_CURRENT_LIST_DIR}/Version.cpp.in")
set(POST_CONFIGURE_FILE "${CMAKE_CURRENT_BINARY_DIR}/Version.cpp")
set(GIT_STATE_FILE "${CMAKE_CURRENT_BINARY_DIR}/git-state-sleigh")
set(GIT_WORKING_DIR "${PROJECT_SOURCE_DIR}")
set(GIT_FAIL_IF_NONZERO_EXIT OFF)
include("../cmake/git_watcher.cmake")
# Generate GHIDRA version helpers
configure_file(
"${CMAKE_CURRENT_LIST_DIR}/GhidraVersion.cpp.in"
"${CMAKE_CURRENT_BINARY_DIR}/GhidraVersion.cpp"
@ONLY
)
add_library(sleigh_support
Support.cpp
"${POST_CONFIGURE_FILE}"
"${CMAKE_CURRENT_BINARY_DIR}/GhidraVersion.cpp"
)
add_library(sleigh::support ALIAS sleigh_support)
# Need to explicitly add this dependency because BYPRODUCTS doesn't work under
# CMake 3.16 with GNU Makefiles
add_dependencies(sleigh_support check_git)
target_compile_features(sleigh_support PUBLIC cxx_std_17)
set_target_properties(sleigh_support PROPERTIES
EXPORT_NAME support
OUTPUT_NAME slaSupport
)
target_include_directories(sleigh_support
${warning_guard}
PUBLIC
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>"
)
target_include_directories(sleigh_support
SYSTEM
PUBLIC
"$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/include>"
# For libconfig.h
"$<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/include>"
)
if(NOT CMAKE_SKIP_INSTALL_RULES)
if(PROJECT_IS_TOP_LEVEL)
set(CMAKE_INSTALL_INCLUDEDIR include/sleigh CACHE PATH "")
endif()
include(GNUInstallDirs)
install(
TARGETS sleigh_support
EXPORT sleighSupportTargets
RUNTIME #
COMPONENT sleigh_SupportRuntime
LIBRARY #
COMPONENT sleigh_SupportRuntime
NAMELINK_COMPONENT sleigh_SupportDevelopment
ARCHIVE #
COMPONENT sleigh_SupportDevelopment
INCLUDES DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}"
)
install(
DIRECTORY
include/
"${CMAKE_CURRENT_BINARY_DIR}/include/"
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}"
COMPONENT sleigh_SupportDevelopment
)
install(
EXPORT sleighSupportTargets
DESTINATION "${sleigh_INSTALL_CMAKEDIR}"
NAMESPACE sleigh::
COMPONENT sleigh_SupportDevelopment
)
endif()