Initial working cmkr project

This commit is contained in:
Duncan Ogilvie 2024-08-05 15:54:28 +02:00
parent 49c87f21d3
commit f800261b0d
14 changed files with 1656 additions and 12 deletions

View File

@ -3,9 +3,14 @@ root = true
; Windows-style newlines
[*]
end_of_line = CRLF
end_of_line = crlf
trim_trailing_whitespace = true
; Tab indentation
[*.{cpp,h}]
indent_style = space
tab_width = 4
tab_width = 4
[{CMakeLists.txt,*.cmake,cmake.toml}]
indent_style = space
end_of_line = lf

4
.gitattributes vendored
View File

@ -1,2 +1,6 @@
# cmkr
/**/CMakeLists.txt linguist-generated
/cmake/cmkr.cmake linguist-vendored
# Disable core.autocrlf (https://stackoverflow.com/a/52996849/1806760)
* -text

953
CMakeLists.txt generated Normal file
View File

@ -0,0 +1,953 @@
# This file is automatically generated from cmake.toml - DO NOT EDIT
# See https://github.com/build-cpp/cmkr for more information
cmake_minimum_required(VERSION 3.15)
if(CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR)
message(FATAL_ERROR "In-tree builds are not supported. Run CMake from a separate directory: cmake -B build")
endif()
set(CMKR_ROOT_PROJECT OFF)
if(CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR)
set(CMKR_ROOT_PROJECT ON)
# Bootstrap cmkr and automatically regenerate CMakeLists.txt
include("cmake/cmkr.cmake" OPTIONAL RESULT_VARIABLE CMKR_INCLUDE_RESULT)
if(CMKR_INCLUDE_RESULT)
cmkr()
endif()
# Enable folder support
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
# Create a configure-time dependency on cmake.toml to improve IDE support
configure_file(cmake.toml cmake.toml COPYONLY)
endif()
include("cmake/VSToolchain.cmake")
project(x64dbg
DESCRIPTION
"An open-source x64/x32 debugger for windows."
)
include("cmake/Qt5Helpers.cmake")
include("cmake/ParallelCompilation.cmake")
# Packages
find_package(Qt5 REQUIRED
COMPONENTS
Widgets
Network
WinExtras
)
# Target: zydis_wrapper
set(zydis_wrapper_SOURCES
cmake.toml
"src/zydis_wrapper/Zydis/Zydis.h"
"src/zydis_wrapper/zydis/Zydis.c"
"src/zydis_wrapper/zydis_wrapper.cpp"
"src/zydis_wrapper/zydis_wrapper.h"
)
add_library(zydis_wrapper STATIC)
target_sources(zydis_wrapper PRIVATE ${zydis_wrapper_SOURCES})
source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} FILES ${zydis_wrapper_SOURCES})
target_compile_definitions(zydis_wrapper PUBLIC
ZYCORE_STATIC_BUILD
ZYDIS_STATIC_BUILD
)
target_include_directories(zydis_wrapper PUBLIC
"src/zydis_wrapper"
)
target_include_directories(zydis_wrapper PRIVATE
"src/zydis_wrapper/Zydis"
)
# Target: bridge
set(bridge_SOURCES
cmake.toml
"src/bridge/Utf8Ini.h"
"src/bridge/_global.cpp"
"src/bridge/_global.h"
"src/bridge/bridgegraph.h"
"src/bridge/bridgelist.h"
"src/bridge/bridgemain.cpp"
"src/bridge/bridgemain.h"
"src/bridge/bridgemain_checker.c"
)
add_library(bridge SHARED)
target_sources(bridge PRIVATE ${bridge_SOURCES})
source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} FILES ${bridge_SOURCES})
target_compile_definitions(bridge PRIVATE
BUILD_BRIDGE
)
if(CMAKE_SIZEOF_VOID_P EQUAL 4) # x86
set_target_properties(bridge PROPERTIES
OUTPUT_NAME
x32bridge
)
endif()
if(CMAKE_SIZEOF_VOID_P EQUAL 8) # x64
set_target_properties(bridge PROPERTIES
OUTPUT_NAME
x64bridge
)
endif()
# Target: btparser
set(btparser_SOURCES
cmake.toml
"src/dbg/btparser/btparser/ast.h"
"src/dbg/btparser/btparser/helpers.h"
"src/dbg/btparser/btparser/keywords.h"
"src/dbg/btparser/btparser/lexer.cpp"
"src/dbg/btparser/btparser/lexer.h"
"src/dbg/btparser/btparser/operators.h"
"src/dbg/btparser/btparser/parser.cpp"
"src/dbg/btparser/btparser/parser.h"
"src/dbg/btparser/btparser/testfiles.h "
)
add_library(btparser STATIC)
target_sources(btparser PRIVATE ${btparser_SOURCES})
source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} FILES ${btparser_SOURCES})
target_include_directories(btparser PUBLIC
"src/dbg/btparser"
)
# Target: dbg
set(dbg_SOURCES
cmake.toml
"src/dbg/DeviceNameResolver/DeviceNameResolver.h"
"src/dbg/GetPeArch.h"
"src/dbg/TitanEngine/TitanEngine.h"
"src/dbg/TraceRecord.cpp"
"src/dbg/TraceRecord.h"
"src/dbg/WinInet-Downloader/downslib.cpp"
"src/dbg/WinInet-Downloader/downslib.h"
"src/dbg/XEDParse/XEDParse.h"
"src/dbg/_dbgfunctions.cpp"
"src/dbg/_dbgfunctions.h"
"src/dbg/_exports.cpp"
"src/dbg/_exports.h"
"src/dbg/_global.cpp"
"src/dbg/_global.h"
"src/dbg/_plugin_types.h"
"src/dbg/_plugins.cpp"
"src/dbg/_plugins.h"
"src/dbg/_scriptapi.h"
"src/dbg/_scriptapi_argument.cpp"
"src/dbg/_scriptapi_argument.h"
"src/dbg/_scriptapi_assembler.cpp"
"src/dbg/_scriptapi_assembler.h"
"src/dbg/_scriptapi_bookmark.cpp"
"src/dbg/_scriptapi_bookmark.h"
"src/dbg/_scriptapi_comment.cpp"
"src/dbg/_scriptapi_comment.h"
"src/dbg/_scriptapi_debug.cpp"
"src/dbg/_scriptapi_debug.h"
"src/dbg/_scriptapi_flag.cpp"
"src/dbg/_scriptapi_flag.h"
"src/dbg/_scriptapi_function.cpp"
"src/dbg/_scriptapi_function.h"
"src/dbg/_scriptapi_gui.cpp"
"src/dbg/_scriptapi_gui.h"
"src/dbg/_scriptapi_label.cpp"
"src/dbg/_scriptapi_label.h"
"src/dbg/_scriptapi_memory.cpp"
"src/dbg/_scriptapi_memory.h"
"src/dbg/_scriptapi_misc.cpp"
"src/dbg/_scriptapi_misc.h"
"src/dbg/_scriptapi_module.cpp"
"src/dbg/_scriptapi_module.h"
"src/dbg/_scriptapi_pattern.cpp"
"src/dbg/_scriptapi_pattern.h"
"src/dbg/_scriptapi_register.cpp"
"src/dbg/_scriptapi_register.h"
"src/dbg/_scriptapi_stack.cpp"
"src/dbg/_scriptapi_stack.h"
"src/dbg/_scriptapi_symbol.cpp"
"src/dbg/_scriptapi_symbol.h"
"src/dbg/addrinfo.cpp"
"src/dbg/addrinfo.h"
"src/dbg/analysis/AnalysisPass.cpp"
"src/dbg/analysis/AnalysisPass.h"
"src/dbg/analysis/BasicBlock.h"
"src/dbg/analysis/CodeFollowPass.cpp"
"src/dbg/analysis/CodeFollowPass.h"
"src/dbg/analysis/FunctionPass.cpp"
"src/dbg/analysis/FunctionPass.h"
"src/dbg/analysis/LinearPass.cpp"
"src/dbg/analysis/LinearPass.h"
"src/dbg/analysis/advancedanalysis.cpp"
"src/dbg/analysis/advancedanalysis.h"
"src/dbg/analysis/analysis.cpp"
"src/dbg/analysis/analysis.h"
"src/dbg/analysis/analysis_nukem.cpp"
"src/dbg/analysis/analysis_nukem.h"
"src/dbg/analysis/controlflowanalysis.cpp"
"src/dbg/analysis/controlflowanalysis.h"
"src/dbg/analysis/exceptiondirectoryanalysis.cpp"
"src/dbg/analysis/exceptiondirectoryanalysis.h"
"src/dbg/analysis/linearanalysis.cpp"
"src/dbg/analysis/linearanalysis.h"
"src/dbg/analysis/recursiveanalysis.cpp"
"src/dbg/analysis/recursiveanalysis.h"
"src/dbg/analysis/xrefsanalysis.cpp"
"src/dbg/analysis/xrefsanalysis.h"
"src/dbg/animate.cpp"
"src/dbg/animate.h"
"src/dbg/argument.cpp"
"src/dbg/argument.h"
"src/dbg/assemble.cpp"
"src/dbg/assemble.h"
"src/dbg/bookmark.cpp"
"src/dbg/bookmark.h"
"src/dbg/breakpoint.cpp"
"src/dbg/breakpoint.h"
"src/dbg/bridgemain.h"
"src/dbg/command.cpp"
"src/dbg/command.h"
"src/dbg/commandline.cpp"
"src/dbg/commandline.h"
"src/dbg/commandparser.cpp"
"src/dbg/commandparser.h"
"src/dbg/commands/cmd-all.h"
"src/dbg/commands/cmd-analysis.cpp"
"src/dbg/commands/cmd-analysis.h"
"src/dbg/commands/cmd-breakpoint-control.cpp"
"src/dbg/commands/cmd-breakpoint-control.h"
"src/dbg/commands/cmd-conditional-breakpoint-control.cpp"
"src/dbg/commands/cmd-conditional-breakpoint-control.h"
"src/dbg/commands/cmd-debug-control.cpp"
"src/dbg/commands/cmd-debug-control.h"
"src/dbg/commands/cmd-general-purpose.cpp"
"src/dbg/commands/cmd-general-purpose.h"
"src/dbg/commands/cmd-gui.cpp"
"src/dbg/commands/cmd-gui.h"
"src/dbg/commands/cmd-memory-operations.cpp"
"src/dbg/commands/cmd-memory-operations.h"
"src/dbg/commands/cmd-misc.cpp"
"src/dbg/commands/cmd-misc.h"
"src/dbg/commands/cmd-operating-system-control.cpp"
"src/dbg/commands/cmd-operating-system-control.h"
"src/dbg/commands/cmd-plugins.cpp"
"src/dbg/commands/cmd-plugins.h"
"src/dbg/commands/cmd-script.cpp"
"src/dbg/commands/cmd-script.h"
"src/dbg/commands/cmd-searching.cpp"
"src/dbg/commands/cmd-searching.h"
"src/dbg/commands/cmd-thread-control.cpp"
"src/dbg/commands/cmd-thread-control.h"
"src/dbg/commands/cmd-tracing.cpp"
"src/dbg/commands/cmd-tracing.h"
"src/dbg/commands/cmd-types.cpp"
"src/dbg/commands/cmd-types.h"
"src/dbg/commands/cmd-undocumented.cpp"
"src/dbg/commands/cmd-undocumented.h"
"src/dbg/commands/cmd-user-database.cpp"
"src/dbg/commands/cmd-user-database.h"
"src/dbg/commands/cmd-variables.cpp"
"src/dbg/commands/cmd-variables.h"
"src/dbg/commands/cmd-watch-control.cpp"
"src/dbg/commands/cmd-watch-control.h"
"src/dbg/comment.cpp"
"src/dbg/comment.h"
"src/dbg/console.cpp"
"src/dbg/console.h"
"src/dbg/database.cpp"
"src/dbg/database.h"
"src/dbg/datainst_helper.cpp"
"src/dbg/datainst_helper.h"
"src/dbg/dbghelp_safe.cpp"
"src/dbg/dbghelp_safe.h"
"src/dbg/debugger.cpp"
"src/dbg/debugger.h"
"src/dbg/debugger_cookie.h"
"src/dbg/debugger_tracing.h"
"src/dbg/disasm_fast.cpp"
"src/dbg/disasm_fast.h"
"src/dbg/disasm_helper.cpp"
"src/dbg/disasm_helper.h"
"src/dbg/dynamicmem.h"
"src/dbg/encodemap.cpp"
"src/dbg/encodemap.h"
"src/dbg/exception.cpp"
"src/dbg/exception.h"
"src/dbg/exhandlerinfo.cpp"
"src/dbg/exhandlerinfo.h"
"src/dbg/expressionfunctions.cpp"
"src/dbg/expressionfunctions.h"
"src/dbg/expressionparser.cpp"
"src/dbg/expressionparser.h"
"src/dbg/exprfunc.cpp"
"src/dbg/exprfunc.h"
"src/dbg/filehelper.cpp"
"src/dbg/filehelper.h"
"src/dbg/filemap.h"
"src/dbg/formatfunctions.cpp"
"src/dbg/formatfunctions.h"
"src/dbg/function.cpp"
"src/dbg/function.h"
"src/dbg/handle.h"
"src/dbg/handles.cpp"
"src/dbg/handles.h"
"src/dbg/historycontext.cpp"
"src/dbg/historycontext.h"
"src/dbg/jansson/jansson.h"
"src/dbg/jansson/jansson_config.h"
"src/dbg/jansson/jansson_x64dbg.h"
"src/dbg/jit.cpp"
"src/dbg/jit.h"
"src/dbg/label.cpp"
"src/dbg/label.h"
"src/dbg/loop.cpp"
"src/dbg/loop.h"
"src/dbg/lz4/lz4.h"
"src/dbg/lz4/lz4file.h"
"src/dbg/lz4/lz4hc.h"
"src/dbg/main.cpp"
"src/dbg/memory.cpp"
"src/dbg/memory.h"
"src/dbg/mnemonichelp.cpp"
"src/dbg/mnemonichelp.h"
"src/dbg/module.cpp"
"src/dbg/module.h"
"src/dbg/msdia/cvConst.h"
"src/dbg/msdia/dia2.h"
"src/dbg/msdia/diaCreate.h"
"src/dbg/msdia/diacreate.cpp"
"src/dbg/msgqueue.cpp"
"src/dbg/msgqueue.h"
"src/dbg/murmurhash.cpp"
"src/dbg/murmurhash.h"
"src/dbg/ntdll/ntdll.h"
"src/dbg/patches.cpp"
"src/dbg/patches.h"
"src/dbg/patternfind.cpp"
"src/dbg/patternfind.h"
"src/dbg/pdbdiafile.cpp"
"src/dbg/pdbdiafile.h"
"src/dbg/pdbdiatypes.h"
"src/dbg/plugin_loader.cpp"
"src/dbg/plugin_loader.h"
"src/dbg/reference.cpp"
"src/dbg/reference.h"
"src/dbg/serializablemap.h"
"src/dbg/simplescript.cpp"
"src/dbg/simplescript.h"
"src/dbg/stackinfo.cpp"
"src/dbg/stackinfo.h"
"src/dbg/stringformat.cpp"
"src/dbg/stringformat.h"
"src/dbg/stringutils.cpp"
"src/dbg/stringutils.h"
"src/dbg/symbolinfo.cpp"
"src/dbg/symbolinfo.h"
"src/dbg/symbolsourcebase.cpp"
"src/dbg/symbolsourcebase.h"
"src/dbg/symbolsourcedia.cpp"
"src/dbg/symbolsourcedia.h"
"src/dbg/symbolundecorator.h"
"src/dbg/syscalls.h"
"src/dbg/taskthread.h"
"src/dbg/tcpconnections.cpp"
"src/dbg/tcpconnections.h"
"src/dbg/thread.cpp"
"src/dbg/thread.h"
"src/dbg/threading.cpp"
"src/dbg/threading.h"
"src/dbg/types.cpp"
"src/dbg/types.h"
"src/dbg/typesparser.cpp"
"src/dbg/value.cpp"
"src/dbg/value.h"
"src/dbg/variable.cpp"
"src/dbg/variable.h"
"src/dbg/watch.cpp"
"src/dbg/watch.h"
"src/dbg/x64dbg.cpp"
"src/dbg/x64dbg.h"
"src/dbg/xrefs.cpp"
"src/dbg/xrefs.h"
)
add_library(dbg SHARED)
target_sources(dbg PRIVATE ${dbg_SOURCES})
source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} FILES ${dbg_SOURCES})
target_compile_definitions(dbg PRIVATE
BUILD_DBG
)
target_include_directories(dbg PRIVATE
"src/dbg"
"src/dbg/analysis"
"src/dbg/commands"
)
target_link_libraries(dbg PRIVATE
zydis_wrapper
bridge
btparser
Psapi
Shlwapi
Ws2_32
)
if(CMAKE_SIZEOF_VOID_P EQUAL 4) # x86
target_link_libraries(dbg PRIVATE
"${CMAKE_CURRENT_SOURCE_DIR}/src/dbg/dbghelp/dbghelp_x86.lib"
"${CMAKE_CURRENT_SOURCE_DIR}/src/dbg/DeviceNameResolver/DeviceNameResolver_x86.lib"
"${CMAKE_CURRENT_SOURCE_DIR}/src/dbg/jansson/jansson_x86.lib"
"${CMAKE_CURRENT_SOURCE_DIR}/src/dbg/lz4/lz4_x86.lib"
"${CMAKE_CURRENT_SOURCE_DIR}/src/dbg/ntdll/ntdll_x86.lib"
"${CMAKE_CURRENT_SOURCE_DIR}/src/dbg/TitanEngine/TitanEngine_x86.lib"
"${CMAKE_CURRENT_SOURCE_DIR}/src/dbg/XEDParse/XEDParse_x86.lib"
"${CMAKE_CURRENT_SOURCE_DIR}/src/dbg/LLVMDemangle/LLVMDemangle_x86.lib"
)
endif()
if(CMAKE_SIZEOF_VOID_P EQUAL 8) # x64
target_link_libraries(dbg PRIVATE
"${CMAKE_CURRENT_SOURCE_DIR}/src/dbg/dbghelp/dbghelp_x64.lib"
"${CMAKE_CURRENT_SOURCE_DIR}/src/dbg/DeviceNameResolver/DeviceNameResolver_x64.lib"
"${CMAKE_CURRENT_SOURCE_DIR}/src/dbg/jansson/jansson_x64.lib"
"${CMAKE_CURRENT_SOURCE_DIR}/src/dbg/lz4/lz4_x64.lib"
"${CMAKE_CURRENT_SOURCE_DIR}/src/dbg/ntdll/ntdll_x64.lib"
"${CMAKE_CURRENT_SOURCE_DIR}/src/dbg/TitanEngine/TitanEngine_x64.lib"
"${CMAKE_CURRENT_SOURCE_DIR}/src/dbg/XEDParse/XEDParse_x64.lib"
"${CMAKE_CURRENT_SOURCE_DIR}/src/dbg/LLVMDemangle/LLVMDemangle_x64.lib"
)
endif()
if(CMAKE_SIZEOF_VOID_P EQUAL 4) # x86
set_target_properties(dbg PROPERTIES
OUTPUT_NAME
x32dbg
)
endif()
if(CMAKE_SIZEOF_VOID_P EQUAL 8) # x64
set_target_properties(dbg PROPERTIES
OUTPUT_NAME
x64dbg
)
endif()
# Target: gui
set(gui_SOURCES
cmake.toml
"src/gui/Src/BasicView/AbstractSearchList.h"
"src/gui/Src/BasicView/AbstractStdTable.cpp"
"src/gui/Src/BasicView/AbstractStdTable.h"
"src/gui/Src/BasicView/AbstractTableView.cpp"
"src/gui/Src/BasicView/AbstractTableView.h"
"src/gui/Src/BasicView/Disassembly.cpp"
"src/gui/Src/BasicView/Disassembly.h"
"src/gui/Src/BasicView/HeaderButton.h"
"src/gui/Src/BasicView/HexDump.cpp"
"src/gui/Src/BasicView/HexDump.h"
"src/gui/Src/BasicView/HistoryLineEdit.cpp"
"src/gui/Src/BasicView/HistoryLineEdit.h"
"src/gui/Src/BasicView/LabeledSplitter.cpp"
"src/gui/Src/BasicView/LabeledSplitter.h"
"src/gui/Src/BasicView/LabeledSplitterDetachedWindow.cpp"
"src/gui/Src/BasicView/LabeledSplitterDetachedWindow.h"
"src/gui/Src/BasicView/ReferenceView.cpp"
"src/gui/Src/BasicView/ReferenceView.h"
"src/gui/Src/BasicView/SearchListView.cpp"
"src/gui/Src/BasicView/SearchListView.h"
"src/gui/Src/BasicView/ShortcutEdit.cpp"
"src/gui/Src/BasicView/ShortcutEdit.h"
"src/gui/Src/BasicView/StdIconSearchListView.cpp"
"src/gui/Src/BasicView/StdIconSearchListView.h"
"src/gui/Src/BasicView/StdIconTable.cpp"
"src/gui/Src/BasicView/StdIconTable.h"
"src/gui/Src/BasicView/StdSearchListView.cpp"
"src/gui/Src/BasicView/StdSearchListView.h"
"src/gui/Src/BasicView/StdTable.cpp"
"src/gui/Src/BasicView/StdTable.h"
"src/gui/Src/BasicView/StdTableSearchList.cpp"
"src/gui/Src/BasicView/StdTableSearchList.h"
"src/gui/Src/Bridge/Bridge.cpp"
"src/gui/Src/Bridge/Bridge.h"
"src/gui/Src/Bridge/BridgeResult.cpp"
"src/gui/Src/Bridge/BridgeResult.h"
"src/gui/Src/Disassembler/Architecture.cpp"
"src/gui/Src/Disassembler/Architecture.h"
"src/gui/Src/Disassembler/QZydis.cpp"
"src/gui/Src/Disassembler/QZydis.h"
"src/gui/Src/Disassembler/ZydisTokenizer.cpp"
"src/gui/Src/Disassembler/ZydisTokenizer.h"
"src/gui/Src/Exports.h"
"src/gui/Src/Gui/AboutDialog.cpp"
"src/gui/Src/Gui/AboutDialog.h"
"src/gui/Src/Gui/AboutDialog.ui"
"src/gui/Src/Gui/AppearanceDialog.cpp"
"src/gui/Src/Gui/AppearanceDialog.h"
"src/gui/Src/Gui/AppearanceDialog.ui"
"src/gui/Src/Gui/AssembleDialog.cpp"
"src/gui/Src/Gui/AssembleDialog.h"
"src/gui/Src/Gui/AssembleDialog.ui"
"src/gui/Src/Gui/AttachDialog.cpp"
"src/gui/Src/Gui/AttachDialog.h"
"src/gui/Src/Gui/AttachDialog.ui"
"src/gui/Src/Gui/BreakpointsView.cpp"
"src/gui/Src/Gui/BreakpointsView.h"
"src/gui/Src/Gui/BrowseDialog.cpp"
"src/gui/Src/Gui/BrowseDialog.h"
"src/gui/Src/Gui/BrowseDialog.ui"
"src/gui/Src/Gui/CPUArgumentWidget.cpp"
"src/gui/Src/Gui/CPUArgumentWidget.h"
"src/gui/Src/Gui/CPUArgumentWidget.ui"
"src/gui/Src/Gui/CPUDisassembly.cpp"
"src/gui/Src/Gui/CPUDisassembly.h"
"src/gui/Src/Gui/CPUDump.cpp"
"src/gui/Src/Gui/CPUDump.h"
"src/gui/Src/Gui/CPUInfoBox.cpp"
"src/gui/Src/Gui/CPUInfoBox.h"
"src/gui/Src/Gui/CPUMultiDump.cpp"
"src/gui/Src/Gui/CPUMultiDump.h"
"src/gui/Src/Gui/CPURegistersView.cpp"
"src/gui/Src/Gui/CPURegistersView.h"
"src/gui/Src/Gui/CPUSideBar.cpp"
"src/gui/Src/Gui/CPUSideBar.h"
"src/gui/Src/Gui/CPUStack.cpp"
"src/gui/Src/Gui/CPUStack.h"
"src/gui/Src/Gui/CPUWidget.cpp"
"src/gui/Src/Gui/CPUWidget.h"
"src/gui/Src/Gui/CPUWidget.ui"
"src/gui/Src/Gui/CalculatorDialog.cpp"
"src/gui/Src/Gui/CalculatorDialog.h"
"src/gui/Src/Gui/CalculatorDialog.ui"
"src/gui/Src/Gui/CallStackView.cpp"
"src/gui/Src/Gui/CallStackView.h"
"src/gui/Src/Gui/CloseDialog.cpp"
"src/gui/Src/Gui/CloseDialog.h"
"src/gui/Src/Gui/CloseDialog.ui"
"src/gui/Src/Gui/CodepageSelectionDialog.cpp"
"src/gui/Src/Gui/CodepageSelectionDialog.h"
"src/gui/Src/Gui/CodepageSelectionDialog.ui"
"src/gui/Src/Gui/ColumnReorderDialog.cpp"
"src/gui/Src/Gui/ColumnReorderDialog.h"
"src/gui/Src/Gui/ColumnReorderDialog.ui"
"src/gui/Src/Gui/ComboBoxDialog.cpp"
"src/gui/Src/Gui/ComboBoxDialog.h"
"src/gui/Src/Gui/ComboBoxDialog.ui"
"src/gui/Src/Gui/CommandLineEdit.cpp"
"src/gui/Src/Gui/CommandLineEdit.h"
"src/gui/Src/Gui/CustomizeMenuDialog.cpp"
"src/gui/Src/Gui/CustomizeMenuDialog.h"
"src/gui/Src/Gui/CustomizeMenuDialog.ui"
"src/gui/Src/Gui/DebugStatusLabel.cpp"
"src/gui/Src/Gui/DebugStatusLabel.h"
"src/gui/Src/Gui/DisassemblerGraphView.cpp"
"src/gui/Src/Gui/DisassemblerGraphView.h"
"src/gui/Src/Gui/DisassemblyPopup.cpp"
"src/gui/Src/Gui/DisassemblyPopup.h"
"src/gui/Src/Gui/EditBreakpointDialog.cpp"
"src/gui/Src/Gui/EditBreakpointDialog.h"
"src/gui/Src/Gui/EditBreakpointDialog.ui"
"src/gui/Src/Gui/EditFloatRegister.cpp"
"src/gui/Src/Gui/EditFloatRegister.h"
"src/gui/Src/Gui/EditFloatRegister.ui"
"src/gui/Src/Gui/ExceptionRangeDialog.cpp"
"src/gui/Src/Gui/ExceptionRangeDialog.h"
"src/gui/Src/Gui/ExceptionRangeDialog.ui"
"src/gui/Src/Gui/FavouriteTools.cpp"
"src/gui/Src/Gui/FavouriteTools.h"
"src/gui/Src/Gui/FavouriteTools.ui"
"src/gui/Src/Gui/FileLines.h"
"src/gui/Src/Gui/GotoDialog.cpp"
"src/gui/Src/Gui/GotoDialog.h"
"src/gui/Src/Gui/GotoDialog.ui"
"src/gui/Src/Gui/HandlesView.cpp"
"src/gui/Src/Gui/HandlesView.h"
"src/gui/Src/Gui/HexEditDialog.cpp"
"src/gui/Src/Gui/HexEditDialog.h"
"src/gui/Src/Gui/HexEditDialog.ui"
"src/gui/Src/Gui/HexLineEdit.cpp"
"src/gui/Src/Gui/HexLineEdit.h"
"src/gui/Src/Gui/HexLineEdit.ui"
"src/gui/Src/Gui/LineEditDialog.cpp"
"src/gui/Src/Gui/LineEditDialog.h"
"src/gui/Src/Gui/LineEditDialog.ui"
"src/gui/Src/Gui/LocalVarsView.cpp"
"src/gui/Src/Gui/LocalVarsView.h"
"src/gui/Src/Gui/LogStatusLabel.cpp"
"src/gui/Src/Gui/LogStatusLabel.h"
"src/gui/Src/Gui/LogView.cpp"
"src/gui/Src/Gui/LogView.h"
"src/gui/Src/Gui/MainWindow.cpp"
"src/gui/Src/Gui/MainWindow.h"
"src/gui/Src/Gui/MainWindow.ui"
"src/gui/Src/Gui/MemoryMapView.cpp"
"src/gui/Src/Gui/MemoryMapView.h"
"src/gui/Src/Gui/MessagesBreakpoints.cpp"
"src/gui/Src/Gui/MessagesBreakpoints.h"
"src/gui/Src/Gui/MessagesBreakpoints.ui"
"src/gui/Src/Gui/MultiItemsSelectWindow.cpp"
"src/gui/Src/Gui/MultiItemsSelectWindow.h"
"src/gui/Src/Gui/NotepadView.cpp"
"src/gui/Src/Gui/NotepadView.h"
"src/gui/Src/Gui/NotesManager.cpp"
"src/gui/Src/Gui/NotesManager.h"
"src/gui/Src/Gui/PageMemoryRights.cpp"
"src/gui/Src/Gui/PageMemoryRights.h"
"src/gui/Src/Gui/PageMemoryRights.ui"
"src/gui/Src/Gui/PatchDialog.cpp"
"src/gui/Src/Gui/PatchDialog.h"
"src/gui/Src/Gui/PatchDialog.ui"
"src/gui/Src/Gui/PatchDialogGroupSelector.cpp"
"src/gui/Src/Gui/PatchDialogGroupSelector.h"
"src/gui/Src/Gui/PatchDialogGroupSelector.ui"
"src/gui/Src/Gui/ReferenceManager.cpp"
"src/gui/Src/Gui/ReferenceManager.h"
"src/gui/Src/Gui/RegistersView.cpp"
"src/gui/Src/Gui/RegistersView.h"
"src/gui/Src/Gui/RichTextItemDelegate.cpp"
"src/gui/Src/Gui/RichTextItemDelegate.h"
"src/gui/Src/Gui/SEHChainView.cpp"
"src/gui/Src/Gui/SEHChainView.h"
"src/gui/Src/Gui/ScriptView.cpp"
"src/gui/Src/Gui/ScriptView.h"
"src/gui/Src/Gui/SelectFields.cpp"
"src/gui/Src/Gui/SelectFields.h"
"src/gui/Src/Gui/SelectFields.ui"
"src/gui/Src/Gui/SettingsDialog.cpp"
"src/gui/Src/Gui/SettingsDialog.h"
"src/gui/Src/Gui/SettingsDialog.ui"
"src/gui/Src/Gui/ShortcutsDialog.cpp"
"src/gui/Src/Gui/ShortcutsDialog.h"
"src/gui/Src/Gui/ShortcutsDialog.ui"
"src/gui/Src/Gui/SimpleTraceDialog.cpp"
"src/gui/Src/Gui/SimpleTraceDialog.h"
"src/gui/Src/Gui/SimpleTraceDialog.ui"
"src/gui/Src/Gui/SourceView.cpp"
"src/gui/Src/Gui/SourceView.h"
"src/gui/Src/Gui/SourceViewerManager.cpp"
"src/gui/Src/Gui/SourceViewerManager.h"
"src/gui/Src/Gui/StructWidget.cpp"
"src/gui/Src/Gui/StructWidget.h"
"src/gui/Src/Gui/StructWidget.ui"
"src/gui/Src/Gui/SymbolView.cpp"
"src/gui/Src/Gui/SymbolView.h"
"src/gui/Src/Gui/SymbolView.ui"
"src/gui/Src/Gui/SystemBreakpointScriptDialog.cpp"
"src/gui/Src/Gui/SystemBreakpointScriptDialog.h"
"src/gui/Src/Gui/SystemBreakpointScriptDialog.ui"
"src/gui/Src/Gui/TabBar.cpp"
"src/gui/Src/Gui/TabBar.h"
"src/gui/Src/Gui/TabWidget.cpp"
"src/gui/Src/Gui/TabWidget.h"
"src/gui/Src/Gui/ThreadView.cpp"
"src/gui/Src/Gui/ThreadView.h"
"src/gui/Src/Gui/TimeWastedCounter.cpp"
"src/gui/Src/Gui/TimeWastedCounter.h"
"src/gui/Src/Gui/VirtualModDialog.cpp"
"src/gui/Src/Gui/VirtualModDialog.h"
"src/gui/Src/Gui/VirtualModDialog.ui"
"src/gui/Src/Gui/WatchView.cpp"
"src/gui/Src/Gui/WatchView.h"
"src/gui/Src/Gui/WordEditDialog.cpp"
"src/gui/Src/Gui/WordEditDialog.h"
"src/gui/Src/Gui/WordEditDialog.ui"
"src/gui/Src/Gui/XrefBrowseDialog.cpp"
"src/gui/Src/Gui/XrefBrowseDialog.h"
"src/gui/Src/Gui/XrefBrowseDialog.ui"
"src/gui/Src/Gui/ZehSymbolTable.cpp"
"src/gui/Src/Gui/ZehSymbolTable.h"
"src/gui/Src/Imports.cpp"
"src/gui/Src/Imports.h"
"src/gui/Src/Memory/MemoryPage.cpp"
"src/gui/Src/Memory/MemoryPage.h"
"src/gui/Src/QHexEdit/ArrayCommand.cpp"
"src/gui/Src/QHexEdit/ArrayCommand.h"
"src/gui/Src/QHexEdit/QHexEdit.cpp"
"src/gui/Src/QHexEdit/QHexEdit.h"
"src/gui/Src/QHexEdit/QHexEditPrivate.cpp"
"src/gui/Src/QHexEdit/QHexEditPrivate.h"
"src/gui/Src/QHexEdit/XByteArray.cpp"
"src/gui/Src/QHexEdit/XByteArray.h"
"src/gui/Src/ThirdPartyLibs/ldconvert/ldconvert.h"
"src/gui/Src/Tracer/TraceBrowser.cpp"
"src/gui/Src/Tracer/TraceBrowser.h"
"src/gui/Src/Tracer/TraceDump.cpp"
"src/gui/Src/Tracer/TraceDump.h"
"src/gui/Src/Tracer/TraceFileDump.cpp"
"src/gui/Src/Tracer/TraceFileDump.h"
"src/gui/Src/Tracer/TraceFileReader.cpp"
"src/gui/Src/Tracer/TraceFileReader.h"
"src/gui/Src/Tracer/TraceFileReaderInternal.h"
"src/gui/Src/Tracer/TraceFileSearch.cpp"
"src/gui/Src/Tracer/TraceFileSearch.h"
"src/gui/Src/Tracer/TraceInfoBox.cpp"
"src/gui/Src/Tracer/TraceInfoBox.h"
"src/gui/Src/Tracer/TraceManager.cpp"
"src/gui/Src/Tracer/TraceManager.h"
"src/gui/Src/Tracer/TraceRegisters.cpp"
"src/gui/Src/Tracer/TraceRegisters.h"
"src/gui/Src/Tracer/TraceStack.cpp"
"src/gui/Src/Tracer/TraceStack.h"
"src/gui/Src/Tracer/TraceWidget.cpp"
"src/gui/Src/Tracer/TraceWidget.h"
"src/gui/Src/Tracer/TraceWidget.ui"
"src/gui/Src/Tracer/TraceXrefBrowseDialog.cpp"
"src/gui/Src/Tracer/TraceXrefBrowseDialog.h"
"src/gui/Src/Tracer/TraceXrefBrowseDialog.ui"
"src/gui/Src/Utils/ActionHelpers.h"
"src/gui/Src/Utils/BackgroundFlickerThread.cpp"
"src/gui/Src/Utils/BackgroundFlickerThread.h"
"src/gui/Src/Utils/Breakpoints.cpp"
"src/gui/Src/Utils/Breakpoints.h"
"src/gui/Src/Utils/CachedFontMetrics.h"
"src/gui/Src/Utils/CodeFolding.cpp"
"src/gui/Src/Utils/CodeFolding.h"
"src/gui/Src/Utils/CommonActions.cpp"
"src/gui/Src/Utils/CommonActions.h"
"src/gui/Src/Utils/Configuration.cpp"
"src/gui/Src/Utils/Configuration.h"
"src/gui/Src/Utils/EncodeMap.cpp"
"src/gui/Src/Utils/EncodeMap.h"
"src/gui/Src/Utils/FlickerThread.cpp"
"src/gui/Src/Utils/FlickerThread.h"
"src/gui/Src/Utils/HexValidator.cpp"
"src/gui/Src/Utils/HexValidator.h"
"src/gui/Src/Utils/LongLongValidator.cpp"
"src/gui/Src/Utils/LongLongValidator.h"
"src/gui/Src/Utils/MRUList.cpp"
"src/gui/Src/Utils/MRUList.h"
"src/gui/Src/Utils/MainWindowCloseThread.cpp"
"src/gui/Src/Utils/MainWindowCloseThread.h"
"src/gui/Src/Utils/MenuBuilder.cpp"
"src/gui/Src/Utils/MenuBuilder.h"
"src/gui/Src/Utils/MethodInvoker.h"
"src/gui/Src/Utils/MiscUtil.cpp"
"src/gui/Src/Utils/MiscUtil.h"
"src/gui/Src/Utils/RichTextPainter.cpp"
"src/gui/Src/Utils/RichTextPainter.h"
"src/gui/Src/Utils/StringUtil.cpp"
"src/gui/Src/Utils/StringUtil.h"
"src/gui/Src/Utils/SymbolAutoCompleteModel.cpp"
"src/gui/Src/Utils/SymbolAutoCompleteModel.h"
"src/gui/Src/Utils/UpdateChecker.cpp"
"src/gui/Src/Utils/UpdateChecker.h"
"src/gui/Src/Utils/VaHistory.h"
"src/gui/Src/Utils/ValidateExpressionThread.cpp"
"src/gui/Src/Utils/ValidateExpressionThread.h"
"src/gui/Src/main.cpp"
"src/gui/Src/main.h"
"src/gui/resource.qrc"
)
add_library(gui SHARED)
target_sources(gui PRIVATE ${gui_SOURCES})
source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} FILES ${gui_SOURCES})
target_compile_definitions(gui PRIVATE
BUILD_LIB
NOMINMAX
)
target_include_directories(gui PRIVATE
src
"src/gui/Src"
"src/gui/Src/Gui"
"src/gui/Src/BasicView"
"src/gui/Src/Disassembler"
"src/gui/Src/Memory"
"src/gui/Src/Bridge"
"src/gui/Src/Global"
"src/gui/Src/Utils"
"src/gui/Src/ThirdPartyLibs/ldconvert"
)
target_link_libraries(gui PRIVATE
Qt5::Widgets
Qt5::Network
Qt5::WinExtras
zydis_wrapper
bridge
winmm
)
if(CMAKE_SIZEOF_VOID_P EQUAL 4) # x86
target_link_libraries(gui PRIVATE
"${CMAKE_CURRENT_SOURCE_DIR}/src/gui/Src/ThirdPartyLibs/ldconvert/ldconvert_x86.lib"
)
endif()
if(CMAKE_SIZEOF_VOID_P EQUAL 8) # x64
target_link_libraries(gui PRIVATE
"${CMAKE_CURRENT_SOURCE_DIR}/src/gui/Src/ThirdPartyLibs/ldconvert/ldconvert_x64.lib"
)
endif()
if(CMAKE_SIZEOF_VOID_P EQUAL 4) # x86
set_target_properties(gui PROPERTIES
OUTPUT_NAME
x32gui
)
endif()
if(CMAKE_SIZEOF_VOID_P EQUAL 8) # x64
set_target_properties(gui PROPERTIES
OUTPUT_NAME
x64gui
)
endif()
set(CMKR_TARGET gui)
# Enable Qt moc/rrc/uic support
target_qt(${CMKR_TARGET})
# Copy Qt DLLs next to the application
target_windeployqt(${CMKR_TARGET})
# Target: loaddll
set(loaddll_SOURCES
cmake.toml
"src/loaddll/loaddll.cpp"
)
add_executable(loaddll)
target_sources(loaddll PRIVATE ${loaddll_SOURCES})
source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} FILES ${loaddll_SOURCES})
if(CMAKE_SIZEOF_VOID_P EQUAL 4) # x86
target_link_libraries(loaddll PRIVATE
"${CMAKE_CURRENT_SOURCE_DIR}/src/dbg/ntdll/ntdll_x86.lib"
)
endif()
if(CMAKE_SIZEOF_VOID_P EQUAL 8) # x64
target_link_libraries(loaddll PRIVATE
"${CMAKE_CURRENT_SOURCE_DIR}/src/dbg/ntdll/ntdll_x64.lib"
)
endif()
set_target_properties(loaddll PROPERTIES
WIN32_EXECUTABLE
ON
)
get_directory_property(CMKR_VS_STARTUP_PROJECT DIRECTORY ${PROJECT_SOURCE_DIR} DEFINITION VS_STARTUP_PROJECT)
if(NOT CMKR_VS_STARTUP_PROJECT)
set_property(DIRECTORY ${PROJECT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT loaddll)
endif()
# Target: exe
set(exe_SOURCES
cmake.toml
"src/exe/LoadResourceString.h"
"src/exe/crashdump.cpp"
"src/exe/crashdump.h"
"src/exe/icon.h"
"src/exe/manifest.xml"
"src/exe/resource.h"
"src/exe/resource.rc"
"src/exe/signaturecheck.cpp"
"src/exe/signaturecheck.h"
"src/exe/strings.h"
"src/exe/strings.rc"
"src/exe/x64dbg_exe.cpp"
)
if(CMAKE_SIZEOF_VOID_P EQUAL 4) # x86
list(APPEND exe_SOURCES
"src/exe/icon32.rc"
)
endif()
if(CMAKE_SIZEOF_VOID_P EQUAL 8) # x64
list(APPEND exe_SOURCES
"src/exe/icon64.rc"
)
endif()
add_executable(exe)
target_sources(exe PRIVATE ${exe_SOURCES})
source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} FILES ${exe_SOURCES})
target_link_libraries(exe PRIVATE
bridge
)
if(CMAKE_SIZEOF_VOID_P EQUAL 4) # x86
set_target_properties(exe PROPERTIES
OUTPUT_NAME
x32dbg
PDB_NAME
x32dbg_exe
)
endif()
if(CMAKE_SIZEOF_VOID_P EQUAL 8) # x64
set_target_properties(exe PROPERTIES
OUTPUT_NAME
x64dbg
PDB_NAME
x64dbg_exe
)
endif()
set_target_properties(exe PROPERTIES
WIN32_EXECUTABLE
ON
)
get_directory_property(CMKR_VS_STARTUP_PROJECT DIRECTORY ${PROJECT_SOURCE_DIR} DEFINITION VS_STARTUP_PROJECT)
if(NOT CMKR_VS_STARTUP_PROJECT)
set_property(DIRECTORY ${PROJECT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT exe)
endif()
# Target: launcher
if(CMAKE_SIZEOF_VOID_P EQUAL 4) # x86
set(launcher_SOURCES
cmake.toml
"src/exe/icon.rc"
"src/exe/resource.rc"
"src/exe/strings.rc"
"src/launcher/x64dbg_launcher.cpp"
)
add_executable(launcher)
target_sources(launcher PRIVATE ${launcher_SOURCES})
source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} FILES ${launcher_SOURCES})
target_link_libraries(launcher PRIVATE
Shlwapi
)
set_target_properties(launcher PROPERTIES
OUTPUT_NAME
x96dbg
WIN32_EXECUTABLE
ON
)
get_directory_property(CMKR_VS_STARTUP_PROJECT DIRECTORY ${PROJECT_SOURCE_DIR} DEFINITION VS_STARTUP_PROJECT)
if(NOT CMKR_VS_STARTUP_PROJECT)
set_property(DIRECTORY ${PROJECT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT launcher)
endif()
endif()

237
cmake.toml Normal file
View File

@ -0,0 +1,237 @@
[cmake]
version = "3.15"
cmkr-include = "cmake/cmkr.cmake"
[project]
name = "x64dbg"
description = "An open-source x64/x32 debugger for windows."
include-before = [
"cmake/VSToolchain.cmake"
]
include-after = [
"cmake/Qt5Helpers.cmake",
"cmake/ParallelCompilation.cmake",
]
[conditions]
x86 = "CMAKE_SIZEOF_VOID_P EQUAL 4"
x64 = "CMAKE_SIZEOF_VOID_P EQUAL 8"
[find-package]
Qt5 = { components = ["Widgets", "Network", "WinExtras"] }
[target.zydis_wrapper]
type = "static"
sources = [
"src/zydis_wrapper/*.cpp",
"src/zydis_wrapper/*.h",
"src/zydis_wrapper/Zydis/Zydis.h",
"src/zydis_wrapper/zydis/Zydis.c",
]
include-directories = [
"src/zydis_wrapper",
]
private-include-directories = [
"src/zydis_wrapper/Zydis",
]
compile-definitions = [
"ZYCORE_STATIC_BUILD",
"ZYDIS_STATIC_BUILD",
]
[target.bridge]
type = "shared"
sources = [
"src/bridge/*.cpp",
"src/bridge/*.c",
"src/bridge/*.h",
]
private-compile-definitions = [
"BUILD_BRIDGE",
]
[target.bridge.properties]
x86.OUTPUT_NAME = "x32bridge"
x64.OUTPUT_NAME = "x64bridge"
[target.btparser]
type = "static"
sources = [
"src/dbg/btparser/btparser/lexer.cpp",
"src/dbg/btparser/btparser/parser.cpp",
"src/dbg/btparser/btparser/ast.h",
"src/dbg/btparser/btparser/helpers.h",
"src/dbg/btparser/btparser/keywords.h",
"src/dbg/btparser/btparser/lexer.h",
"src/dbg/btparser/btparser/operators.h",
"src/dbg/btparser/btparser/parser.h",
"src/dbg/btparser/btparser/testfiles.h ",
]
include-directories = [
"src/dbg/btparser",
]
[target.dbg]
type = "shared"
sources = [
"src/dbg/*.cpp",
"src/dbg/*.h",
"src/dbg/analysis/*.cpp",
"src/dbg/analysis/*.h",
"src/dbg/commands/*.cpp",
"src/dbg/commands/*.h",
"src/dbg/DeviceNameResolver/*.h",
"src/dbg/jansson/*.h",
"src/dbg/lz4/*.h",
"src/dbg/msdia/*.cpp",
"src/dbg/msdia/*.h",
"src/dbg/ntdll/*.h",
"src/dbg/TitanEngine/*.h",
"src/dbg/WinInet-Downloader/*.cpp",
"src/dbg/WinInet-Downloader/*.h",
"src/dbg/XEDParse/*.h",
]
private-link-libraries = [
"zydis_wrapper",
"bridge",
"btparser",
"Psapi",
"Shlwapi",
"Ws2_32",
]
x86.private-link-libraries = [
"src/dbg/dbghelp/dbghelp_x86.lib",
"src/dbg/DeviceNameResolver/DeviceNameResolver_x86.lib",
"src/dbg/jansson/jansson_x86.lib",
"src/dbg/lz4/lz4_x86.lib",
"src/dbg/ntdll/ntdll_x86.lib",
"src/dbg/TitanEngine/TitanEngine_x86.lib",
"src/dbg/XEDParse/XEDParse_x86.lib",
"src/dbg/LLVMDemangle/LLVMDemangle_x86.lib",
]
x64.private-link-libraries = [
"src/dbg/dbghelp/dbghelp_x64.lib",
"src/dbg/DeviceNameResolver/DeviceNameResolver_x64.lib",
"src/dbg/jansson/jansson_x64.lib",
"src/dbg/lz4/lz4_x64.lib",
"src/dbg/ntdll/ntdll_x64.lib",
"src/dbg/TitanEngine/TitanEngine_x64.lib",
"src/dbg/XEDParse/XEDParse_x64.lib",
"src/dbg/LLVMDemangle/LLVMDemangle_x64.lib",
]
private-compile-definitions = [
"BUILD_DBG",
]
private-include-directories = [
"src/dbg",
"src/dbg/analysis",
"src/dbg/commands",
]
[target.dbg.properties]
x86.OUTPUT_NAME = "x32dbg"
x64.OUTPUT_NAME = "x64dbg"
[target.gui]
type = "shared"
sources = [
"src/gui/**.cpp",
"src/gui/**.h",
"src/gui/**.ui",
"src/gui/**.qrc",
]
private-link-libraries = [
"Qt5::Widgets",
"Qt5::Network",
"Qt5::WinExtras",
"zydis_wrapper",
"bridge",
"winmm",
]
x86.private-link-libraries = [
"src/gui/Src/ThirdPartyLibs/ldconvert/ldconvert_x86.lib",
]
x64.private-link-libraries = [
"src/gui/Src/ThirdPartyLibs/ldconvert/ldconvert_x64.lib",
]
private-include-directories = [
"src",
"src/gui/Src",
"src/gui/Src/Gui",
"src/gui/Src/BasicView",
"src/gui/Src/Disassembler",
"src/gui/Src/Memory",
"src/gui/Src/Bridge",
"src/gui/Src/Global",
"src/gui/Src/Utils",
"src/gui/Src/ThirdPartyLibs/ldconvert",
]
private-compile-definitions = [
"BUILD_LIB",
"NOMINMAX",
]
cmake-after = """
# Enable Qt moc/rrc/uic support
target_qt(${CMKR_TARGET})
# Copy Qt DLLs next to the application
target_windeployqt(${CMKR_TARGET})
"""
[target.gui.properties]
x86.OUTPUT_NAME = "x32gui"
x64.OUTPUT_NAME = "x64gui"
[target.loaddll]
type = "executable"
sources = [
"src/loaddll/loaddll.cpp",
]
x86.link-libraries = [
"src/dbg/ntdll/ntdll_x86.lib",
]
x64.link-libraries = [
"src/dbg/ntdll/ntdll_x64.lib",
]
[target.loaddll.properties]
WIN32_EXECUTABLE = "ON"
[target.exe]
type = "executable"
sources = [
"src/exe/*.cpp",
"src/exe/*.h",
"src/exe/manifest.xml",
"src/exe/resource.rc",
"src/exe/strings.rc",
]
x86.sources = ["src/exe/icon32.rc"]
x64.sources = ["src/exe/icon64.rc"]
link-libraries = [
"bridge",
]
[target.exe.properties]
x86.OUTPUT_NAME = "x32dbg"
x64.OUTPUT_NAME = "x64dbg"
x86.PDB_NAME = "x32dbg_exe"
x64.PDB_NAME = "x64dbg_exe"
WIN32_EXECUTABLE = "ON"
[target.launcher]
type = "executable"
condition = "x86"
sources = [
"src/launcher/*.cpp",
"src/exe/icon.rc",
"src/exe/resource.rc",
"src/exe/strings.rc",
]
link-libraries = [
"Shlwapi",
]
[target.launcher.properties]
OUTPUT_NAME = "x96dbg"
WIN32_EXECUTABLE = "ON"

View File

@ -0,0 +1,8 @@
# Visual Studio generator specific flags
if (CMAKE_GENERATOR MATCHES "Visual Studio")
# HACK: DO NOT this to add compiler flags/definitions, use target_compile_options on a
# target instead https://cmake.org/cmake/help/latest/command/target_compile_options.html
# Enable multiprocessor compilation
add_compile_options(/MP)
endif()

74
cmake/Qt5Helpers.cmake Normal file
View File

@ -0,0 +1,74 @@
# https://github.com/mrexodia/Qt5CMakeTemplate
# License: BSL-1.0
# Make the project look nicer in IDEs
set_property(GLOBAL PROPERTY AUTOGEN_SOURCE_GROUP "Generated Files")
set_property(GLOBAL PROPERTY AUTOGEN_TARGETS_FOLDER "CMakePredefinedTargets")
# Install Visual Studio runtime
include(InstallRequiredSystemLibraries)
# Helper function to enable moc/rcc/uic
function(target_qt target)
set_target_properties(${target} PROPERTIES
AUTOMOC
ON
AUTORCC
ON
AUTOUIC
ON
)
endfunction()
# Helper function to deploy Qt DLLs
function(target_windeployqt deploy_target)
# Based on: https://stackoverflow.com/a/41199492/1806760
# TODO: set VCINSTALLDIR environment variable to copy MSVC runtime DLLs
if(Qt5_FOUND AND WIN32 AND TARGET Qt5::qmake AND NOT TARGET Qt5::windeployqt)
get_target_property(_qt5_qmake_location Qt5::qmake IMPORTED_LOCATION)
execute_process(
COMMAND "${_qt5_qmake_location}" -query QT_INSTALL_PREFIX
RESULT_VARIABLE return_code
OUTPUT_VARIABLE qt5_install_prefix
OUTPUT_STRIP_TRAILING_WHITESPACE
)
set(imported_location "${qt5_install_prefix}/bin/windeployqt.exe")
if(EXISTS ${imported_location})
add_executable(Qt5::windeployqt IMPORTED)
set_target_properties(Qt5::windeployqt PROPERTIES
IMPORTED_LOCATION ${imported_location}
)
endif()
endif()
if(TARGET Qt5::windeployqt AND NOT TARGET ${deploy_target}-windeployqt)
# Create a target that rebuilds when cmake is re-run
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/${deploy_target}-windeployqt.c" "static void foo() { }\n")
add_library(${deploy_target}-windeployqt STATIC
"${CMAKE_CURRENT_BINARY_DIR}/${deploy_target}-windeployqt.c"
)
set_target_properties(${deploy_target}-windeployqt PROPERTIES
FOLDER "CMakePredefinedTargets"
)
# Execute windeployqt in a tmp directory after build
add_custom_command(TARGET ${deploy_target}-windeployqt
POST_BUILD
COMMAND ${CMAKE_COMMAND} -E remove_directory "${CMAKE_CURRENT_BINARY_DIR}/${deploy_target}-windeployqt"
COMMAND Qt5::windeployqt --no-compiler-runtime --dir "${CMAKE_CURRENT_BINARY_DIR}/${deploy_target}-windeployqt" "$<TARGET_FILE:${deploy_target}>"
COMMAND ${CMAKE_COMMAND} -E copy_directory "${CMAKE_CURRENT_BINARY_DIR}/${deploy_target}-windeployqt" "$<TARGET_FILE_DIR:${deploy_target}>"
)
# Copy deployment directory during installation
install(
DIRECTORY
"${CMAKE_CURRENT_BINARY_DIR}/${deploy_target}-windeployqt/"
DESTINATION bin
)
endif()
endfunction()

8
cmake/VSToolchain.cmake Normal file
View File

@ -0,0 +1,8 @@
# Set up a more familiar Visual Studio configuration
# Override these options with -DCMAKE_OPTION=Value
#
# See: https://cmake.org/cmake/help/latest/command/set.html#set-cache-entry
set(CMAKE_CONFIGURATION_TYPES "Debug;Release" CACHE STRING "")
set(CMAKE_EXE_LINKER_FLAGS_RELEASE "/DEBUG:FULL /INCREMENTAL:NO /OPT:REF /OPT:ICF" CACHE STRING "")
set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "/DEBUG:FULL /INCREMENTAL:NO /OPT:REF /OPT:ICF" CACHE STRING "")
set(CMAKE_BUILD_TYPE "Release" CACHE STRING "")

261
cmake/cmkr.cmake vendored Normal file
View File

@ -0,0 +1,261 @@
include_guard()
# Change these defaults to point to your infrastructure if desired
set(CMKR_REPO "https://github.com/build-cpp/cmkr" CACHE STRING "cmkr git repository" FORCE)
set(CMKR_TAG "v0.2.34" CACHE STRING "cmkr git tag (this needs to be available forever)" FORCE)
set(CMKR_COMMIT_HASH "" CACHE STRING "cmkr git commit hash (optional)" FORCE)
# To bootstrap/generate a cmkr project: cmake -P cmkr.cmake
if(CMAKE_SCRIPT_MODE_FILE)
set(CMAKE_BINARY_DIR "${CMAKE_BINARY_DIR}/build")
set(CMAKE_CURRENT_BINARY_DIR "${CMAKE_BINARY_DIR}")
file(MAKE_DIRECTORY "${CMAKE_BINARY_DIR}")
endif()
# Signed executable from this release: https://github.com/build-cpp/cmkr/releases/tag/v0.2.34
# To build cmkr from source: cmake -B build -DCMKR_EXECUTABLE=
if(WIN32)
set(CMKR_EXECUTABLE_DEFAULT "${CMAKE_CURRENT_LIST_DIR}/cmkr.exe")
else()
set(CMKR_EXECUTABLE_DEFAULT "")
endif()
# Set these from the command line to customize for development/debugging purposes
set(CMKR_EXECUTABLE ${CMKR_EXECUTABLE_DEFAULT} CACHE FILEPATH "cmkr executable")
set(CMKR_SKIP_GENERATION OFF CACHE BOOL "skip automatic cmkr generation")
set(CMKR_BUILD_TYPE "Debug" CACHE STRING "cmkr build configuration")
mark_as_advanced(CMKR_REPO CMKR_TAG CMKR_COMMIT_HASH CMKR_EXECUTABLE CMKR_SKIP_GENERATION CMKR_BUILD_TYPE)
# Disable cmkr if generation is disabled
if(DEFINED ENV{CI} OR CMKR_SKIP_GENERATION OR CMKR_BUILD_SKIP_GENERATION)
message(STATUS "[cmkr] Skipping automatic cmkr generation")
unset(CMKR_BUILD_SKIP_GENERATION CACHE)
macro(cmkr)
endmacro()
return()
endif()
# Disable cmkr if no cmake.toml file is found
if(NOT CMAKE_SCRIPT_MODE_FILE AND NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/cmake.toml")
message(AUTHOR_WARNING "[cmkr] Not found: ${CMAKE_CURRENT_SOURCE_DIR}/cmake.toml")
macro(cmkr)
endmacro()
return()
endif()
# Convert a Windows native path to CMake path
if(CMKR_EXECUTABLE MATCHES "\\\\")
string(REPLACE "\\" "/" CMKR_EXECUTABLE_CMAKE "${CMKR_EXECUTABLE}")
set(CMKR_EXECUTABLE "${CMKR_EXECUTABLE_CMAKE}" CACHE FILEPATH "" FORCE)
unset(CMKR_EXECUTABLE_CMAKE)
endif()
# Helper macro to execute a process (COMMAND_ERROR_IS_FATAL ANY is 3.19 and higher)
function(cmkr_exec)
execute_process(COMMAND ${ARGV} RESULT_VARIABLE CMKR_EXEC_RESULT)
if(NOT CMKR_EXEC_RESULT EQUAL 0)
message(FATAL_ERROR "cmkr_exec(${ARGV}) failed (exit code ${CMKR_EXEC_RESULT})")
endif()
endfunction()
# Windows-specific hack (CMAKE_EXECUTABLE_PREFIX is not set at the moment)
if(WIN32)
set(CMKR_EXECUTABLE_NAME "cmkr.exe")
else()
set(CMKR_EXECUTABLE_NAME "cmkr")
endif()
# Use cached cmkr if found
if(DEFINED ENV{CMKR_CACHE})
set(CMKR_DIRECTORY_PREFIX "$ENV{CMKR_CACHE}")
string(REPLACE "\\" "/" CMKR_DIRECTORY_PREFIX "${CMKR_DIRECTORY_PREFIX}")
if(NOT CMKR_DIRECTORY_PREFIX MATCHES "\\/$")
set(CMKR_DIRECTORY_PREFIX "${CMKR_DIRECTORY_PREFIX}/")
endif()
# Build in release mode for the cache
set(CMKR_BUILD_TYPE "Release")
else()
set(CMKR_DIRECTORY_PREFIX "${CMAKE_CURRENT_BINARY_DIR}/_cmkr_")
endif()
set(CMKR_DIRECTORY "${CMKR_DIRECTORY_PREFIX}${CMKR_TAG}")
set(CMKR_CACHED_EXECUTABLE "${CMKR_DIRECTORY}/bin/${CMKR_EXECUTABLE_NAME}")
# Helper function to check if a string starts with a prefix
# Cannot use MATCHES, see: https://github.com/build-cpp/cmkr/issues/61
function(cmkr_startswith str prefix result)
string(LENGTH "${prefix}" prefix_length)
string(LENGTH "${str}" str_length)
if(prefix_length LESS_EQUAL str_length)
string(SUBSTRING "${str}" 0 ${prefix_length} str_prefix)
if(prefix STREQUAL str_prefix)
set("${result}" ON PARENT_SCOPE)
return()
endif()
endif()
set("${result}" OFF PARENT_SCOPE)
endfunction()
# Handle upgrading logic
if(CMKR_EXECUTABLE AND NOT CMKR_CACHED_EXECUTABLE STREQUAL CMKR_EXECUTABLE)
cmkr_startswith("${CMKR_EXECUTABLE}" "${CMAKE_CURRENT_BINARY_DIR}/_cmkr" CMKR_STARTSWITH_BUILD)
cmkr_startswith("${CMKR_EXECUTABLE}" "${CMKR_DIRECTORY_PREFIX}" CMKR_STARTSWITH_CACHE)
if(CMKR_STARTSWITH_BUILD)
if(DEFINED ENV{CMKR_CACHE})
message(AUTHOR_WARNING "[cmkr] Switching to cached cmkr: '${CMKR_CACHED_EXECUTABLE}'")
if(EXISTS "${CMKR_CACHED_EXECUTABLE}")
set(CMKR_EXECUTABLE "${CMKR_CACHED_EXECUTABLE}" CACHE FILEPATH "Full path to cmkr executable" FORCE)
else()
unset(CMKR_EXECUTABLE CACHE)
endif()
else()
message(AUTHOR_WARNING "[cmkr] Upgrading '${CMKR_EXECUTABLE}' to '${CMKR_CACHED_EXECUTABLE}'")
unset(CMKR_EXECUTABLE CACHE)
endif()
elseif(DEFINED ENV{CMKR_CACHE} AND CMKR_STARTSWITH_CACHE)
message(AUTHOR_WARNING "[cmkr] Upgrading cached '${CMKR_EXECUTABLE}' to '${CMKR_CACHED_EXECUTABLE}'")
unset(CMKR_EXECUTABLE CACHE)
endif()
endif()
if(CMKR_EXECUTABLE AND EXISTS "${CMKR_EXECUTABLE}")
message(VERBOSE "[cmkr] Found cmkr: '${CMKR_EXECUTABLE}'")
elseif(CMKR_EXECUTABLE AND NOT CMKR_EXECUTABLE STREQUAL CMKR_CACHED_EXECUTABLE)
message(FATAL_ERROR "[cmkr] '${CMKR_EXECUTABLE}' not found")
elseif(NOT CMKR_EXECUTABLE AND EXISTS "${CMKR_CACHED_EXECUTABLE}")
set(CMKR_EXECUTABLE "${CMKR_CACHED_EXECUTABLE}" CACHE FILEPATH "Full path to cmkr executable" FORCE)
message(STATUS "[cmkr] Found cached cmkr: '${CMKR_EXECUTABLE}'")
else()
set(CMKR_EXECUTABLE "${CMKR_CACHED_EXECUTABLE}" CACHE FILEPATH "Full path to cmkr executable" FORCE)
message(VERBOSE "[cmkr] Bootstrapping '${CMKR_EXECUTABLE}'")
message(STATUS "[cmkr] Fetching cmkr...")
if(EXISTS "${CMKR_DIRECTORY}")
cmkr_exec("${CMAKE_COMMAND}" -E rm -rf "${CMKR_DIRECTORY}")
endif()
find_package(Git QUIET REQUIRED)
cmkr_exec("${GIT_EXECUTABLE}"
clone
--config advice.detachedHead=false
--branch ${CMKR_TAG}
--depth 1
${CMKR_REPO}
"${CMKR_DIRECTORY}"
)
if(CMKR_COMMIT_HASH)
execute_process(
COMMAND "${GIT_EXECUTABLE}" checkout -q "${CMKR_COMMIT_HASH}"
RESULT_VARIABLE CMKR_EXEC_RESULT
WORKING_DIRECTORY "${CMKR_DIRECTORY}"
)
if(NOT CMKR_EXEC_RESULT EQUAL 0)
message(FATAL_ERROR "Tag '${CMKR_TAG}' hash is not '${CMKR_COMMIT_HASH}'")
endif()
endif()
message(STATUS "[cmkr] Building cmkr (using system compiler)...")
cmkr_exec("${CMAKE_COMMAND}"
--no-warn-unused-cli
"${CMKR_DIRECTORY}"
"-B${CMKR_DIRECTORY}/build"
"-DCMAKE_BUILD_TYPE=${CMKR_BUILD_TYPE}"
"-DCMAKE_UNITY_BUILD=ON"
"-DCMAKE_INSTALL_PREFIX=${CMKR_DIRECTORY}"
"-DCMKR_GENERATE_DOCUMENTATION=OFF"
)
cmkr_exec("${CMAKE_COMMAND}"
--build "${CMKR_DIRECTORY}/build"
--config "${CMKR_BUILD_TYPE}"
--parallel
)
cmkr_exec("${CMAKE_COMMAND}"
--install "${CMKR_DIRECTORY}/build"
--config "${CMKR_BUILD_TYPE}"
--prefix "${CMKR_DIRECTORY}"
--component cmkr
)
if(NOT EXISTS ${CMKR_EXECUTABLE})
message(FATAL_ERROR "[cmkr] Failed to bootstrap '${CMKR_EXECUTABLE}'")
endif()
cmkr_exec("${CMKR_EXECUTABLE}" version)
message(STATUS "[cmkr] Bootstrapped ${CMKR_EXECUTABLE}")
endif()
execute_process(COMMAND "${CMKR_EXECUTABLE}" version
RESULT_VARIABLE CMKR_EXEC_RESULT
)
if(NOT CMKR_EXEC_RESULT EQUAL 0)
message(FATAL_ERROR "[cmkr] Failed to get version, try clearing the cache and rebuilding")
endif()
# Use cmkr.cmake as a script
if(CMAKE_SCRIPT_MODE_FILE)
if(NOT EXISTS "${CMAKE_SOURCE_DIR}/cmake.toml")
execute_process(COMMAND "${CMKR_EXECUTABLE}" init
RESULT_VARIABLE CMKR_EXEC_RESULT
)
if(NOT CMKR_EXEC_RESULT EQUAL 0)
message(FATAL_ERROR "[cmkr] Failed to bootstrap cmkr project. Please report an issue: https://github.com/build-cpp/cmkr/issues/new")
else()
message(STATUS "[cmkr] Modify cmake.toml and then configure using: cmake -B build")
endif()
else()
execute_process(COMMAND "${CMKR_EXECUTABLE}" gen
RESULT_VARIABLE CMKR_EXEC_RESULT
)
if(NOT CMKR_EXEC_RESULT EQUAL 0)
message(FATAL_ERROR "[cmkr] Failed to generate project.")
else()
message(STATUS "[cmkr] Configure using: cmake -B build")
endif()
endif()
endif()
# This is the macro that contains black magic
macro(cmkr)
# When this macro is called from the generated file, fake some internal CMake variables
get_source_file_property(CMKR_CURRENT_LIST_FILE "${CMAKE_CURRENT_LIST_FILE}" CMKR_CURRENT_LIST_FILE)
if(CMKR_CURRENT_LIST_FILE)
set(CMAKE_CURRENT_LIST_FILE "${CMKR_CURRENT_LIST_FILE}")
get_filename_component(CMAKE_CURRENT_LIST_DIR "${CMAKE_CURRENT_LIST_FILE}" DIRECTORY)
endif()
# File-based include guard (include_guard is not documented to work)
get_source_file_property(CMKR_INCLUDE_GUARD "${CMAKE_CURRENT_LIST_FILE}" CMKR_INCLUDE_GUARD)
if(NOT CMKR_INCLUDE_GUARD)
set_source_files_properties("${CMAKE_CURRENT_LIST_FILE}" PROPERTIES CMKR_INCLUDE_GUARD TRUE)
file(SHA256 "${CMAKE_CURRENT_LIST_FILE}" CMKR_LIST_FILE_SHA256_PRE)
# Generate CMakeLists.txt
cmkr_exec("${CMKR_EXECUTABLE}" gen
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
)
file(SHA256 "${CMAKE_CURRENT_LIST_FILE}" CMKR_LIST_FILE_SHA256_POST)
# Delete the temporary file if it was left for some reason
set(CMKR_TEMP_FILE "${CMAKE_CURRENT_SOURCE_DIR}/CMakerLists.txt")
if(EXISTS "${CMKR_TEMP_FILE}")
file(REMOVE "${CMKR_TEMP_FILE}")
endif()
if(NOT CMKR_LIST_FILE_SHA256_PRE STREQUAL CMKR_LIST_FILE_SHA256_POST)
# Copy the now-generated CMakeLists.txt to CMakerLists.txt
# This is done because you cannot include() a file you are currently in
configure_file(CMakeLists.txt "${CMKR_TEMP_FILE}" COPYONLY)
# Add the macro required for the hack at the start of the cmkr macro
set_source_files_properties("${CMKR_TEMP_FILE}" PROPERTIES
CMKR_CURRENT_LIST_FILE "${CMAKE_CURRENT_LIST_FILE}"
)
# 'Execute' the newly-generated CMakeLists.txt
include("${CMKR_TEMP_FILE}")
# Delete the generated file
file(REMOVE "${CMKR_TEMP_FILE}")
# Do not execute the rest of the original CMakeLists.txt
return()
endif()
# Resume executing the unmodified CMakeLists.txt
endif()
endmacro()

BIN
cmake/cmkr.exe Normal file

Binary file not shown.

View File

@ -1,5 +1,5 @@
#include "TraceXrefBrowseDialog.h"
#include "ui_XrefBrowseDialog.h"
#include "ui_TraceXrefBrowseDialog.h"
#include "TraceFileReader.h"
#include "TraceFileDump.h"
#include "StringUtil.h"
@ -8,7 +8,7 @@
TraceXrefBrowseDialog::TraceXrefBrowseDialog(QWidget* parent) :
QDialog(parent),
ui(new Ui::XrefBrowseDialog)
ui(new Ui::TraceXrefBrowseDialog)
{
ui->setupUi(this);
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint | Qt::MSWindowsFixedSizeDialogHint);

View File

@ -8,7 +8,7 @@
namespace Ui
{
class XrefBrowseDialog;
class TraceXrefBrowseDialog;
}
class TraceXrefBrowseDialog : public QDialog, public ActionHelper<TraceXrefBrowseDialog>
@ -33,7 +33,7 @@ private slots:
void copyAllSlot();
private:
Ui::XrefBrowseDialog* ui; // This uses the same dialog UI as XrefBrowseDialog
Ui::TraceXrefBrowseDialog* ui;
void changeAddress(duint address);
void setupContextMenu();

View File

@ -0,0 +1,94 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>TraceXrefBrowseDialog</class>
<widget class="QDialog" name="TraceXrefBrowseDialog">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>328</width>
<height>426</height>
</rect>
</property>
<property name="windowTitle">
<string>Dialog</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QListWidget" name="listWidget">
<property name="font">
<font>
<family>Courier New</family>
</font>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="pushButton">
<property name="text">
<string>&amp;OK</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pushButton_2">
<property name="text">
<string>&amp;Cancel</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
<resources/>
<connections>
<connection>
<sender>pushButton</sender>
<signal>clicked()</signal>
<receiver>TraceXrefBrowseDialog</receiver>
<slot>accept()</slot>
<hints>
<hint type="sourcelabel">
<x>167</x>
<y>398</y>
</hint>
<hint type="destinationlabel">
<x>141</x>
<y>398</y>
</hint>
</hints>
</connection>
<connection>
<sender>pushButton_2</sender>
<signal>clicked()</signal>
<receiver>TraceXrefBrowseDialog</receiver>
<slot>reject()</slot>
<hints>
<hint type="sourcelabel">
<x>266</x>
<y>405</y>
</hint>
<hint type="destinationlabel">
<x>324</x>
<y>396</y>
</hint>
</hints>
</connection>
</connections>
</ui>

View File

@ -11,12 +11,6 @@ RtlGetLastNtStatus(
VOID
);
#ifdef _WIN64
#pragma comment(lib, "..\\dbg\\ntdll\\ntdll_x64.lib")
#else
#pragma comment(lib, "..\\dbg\\ntdll\\ntdll_x86.lib")
#endif // _WIN64
int WINAPI WinMain(
HINSTANCE hInstance,
HINSTANCE hPrevInstance,

View File

@ -1,7 +1,13 @@
#pragma once
#ifndef ZYCORE_STATIC_BUILD
#define ZYCORE_STATIC_BUILD
#endif // ZYCORE_STATIC_BUILD
#ifndef ZYDIS_STATIC_BUILD
#define ZYDIS_STATIC_BUILD
#endif // ZYDIS_STATIC_BUILD
#include "Zydis/Zydis.h"
#include <type_traits>
#include <functional>