1
0
Fork 0

Compare commits

...

616 Commits

Author SHA1 Message Date
Duncan Ogilvie 9c8ca1cae0 Allow passing absolute path to -cf
Closes #3865
2026-05-27 01:01:51 +02:00
Xander Steyn 9bb33a858e
Show hotkeys in toolbar tooltips (#3864)
* gui: show hotkeys in toolbar tooltips

* format code
2026-05-27 00:01:46 +02:00
Duncan Ogilvie eb413ad364
Merge pull request #3842 from x64dbg/feature/pageupdown-move-selection
Feature/pageupdown move selection
2026-05-26 13:04:39 +02:00
Duncan Ogilvie 086f733d70
Merge pull request #3860 from XanderSteyn/move-fpu-button
Move toggle FPU button into menu
2026-05-26 13:04:19 +02:00
Duncan Ogilvie 7492c7324e
Merge pull request #3863 from torusrxxx/torusrxxx-patch-1
Fix memory fault in trace reader when memory status change
2026-05-26 13:03:11 +02:00
Torusrxxx d2cd4a73bc
Fix memory fault in trace reader when memory status change 2026-05-26 10:16:37 +00:00
Xander Steyn 2fee04077c Fix #2621: Move toggle FPU button into menu 2026-05-21 00:35:49 +02:00
Duncan Ogilvie 46fed4403e Add IMAGE_FILE_LARGE_ADDRESS_AWARE to x32dbg 2026-05-17 23:26:21 +02:00
Duncan Ogilvie d8cf0c75a9
Merge pull request #3848 from ZehMatt/mod-rva-addr
Add module rva address display mode in CPU
2026-05-14 01:04:31 +02:00
Duncan Ogilvie 4ee0bd3658 Fix r8 modification (closes #3850) 2026-05-10 15:43:07 +02:00
ζeh Matt 7deedf24d8
Preserve the address mode when switching pages 2026-05-07 18:40:01 +03:00
ζeh Matt 4d9e042104
Add new address display mode to render module:$rva 2026-05-07 18:33:41 +03:00
Duncan Ogilvie 9ff929a3c8
Merge pull request #3844 from d2k2-git/dark-theme-color-fix
fix "Running" label font color for dark theme
2026-04-26 12:53:13 +02:00
d2k2-git 6f140bf25c fix "Running" label font color for dark theme 2026-04-26 12:34:49 +02:00
Duncan Ogilvie ff2f3da5e6 AbstractStdTable: collapse shift page selection 2026-04-24 17:52:20 +02:00
Duncan Ogilvie 6616cce5f2 TraceBrowser: fix shift page selection 2026-04-24 17:31:29 +02:00
Duncan Ogilvie 39de4d9660 GUI: page selection in table views 2026-04-24 17:10:31 +02:00
Duncan Ogilvie 6a79373bc5 GUI: move selection on PageUp/PageDown
Unconditionally move the disassembly and dump selection when paging the view, without adding a new setting.

Inspired by #3715.

Co-authored-by: tlou520 <212600710+tlou520@users.noreply.github.com>
2026-04-24 16:06:52 +02:00
Duncan Ogilvie 990cf3f9ad
Merge pull request #3841 from x64dbg/fix/cross-ci-windeployqt-overwrite
Fix/cross ci windeployqt overwrite
2026-04-24 15:44:44 +02:00
Duncan Ogilvie 9516f7c92f cross: deploy Qt once per output directory 2026-04-24 15:12:12 +02:00
Duncan Ogilvie e849e2e533 cross: force overwriting Qt deploy artifacts 2026-04-24 14:40:58 +02:00
Duncan Ogilvie 1a95cec061
Merge pull request #3837 from x64dbg/test-cmake
Make tests declarative
2026-04-24 01:03:45 +02:00
Duncan Ogilvie 21ddb12977
Merge pull request #3839 from 3rdit/feature/continued-elfbug
Added CPUStack (Linux)
2026-04-24 01:03:31 +02:00
3rdit 6f2aeabb78
Breakpoint race fix + CPUStack behavior fixes 2026-04-23 15:52:56 +01:00
3rdit dfcdcaea08
Made the colouring the same as Windows x64dbg 2026-04-23 15:06:32 +01:00
3rdit e098eb9b89
Fix codex review + fix file extension trim logic 2026-04-23 14:48:02 +01:00
3rdit 3e3e994f14
Ran formatter (3.6.9) 2026-04-23 14:22:11 +01:00
3rdit 9bfcc8b3a7
Ran formatter 2026-04-23 14:19:12 +01:00
3rdit e2b6d3e870
Return-to via QZydis::DisassembleBack + review fixes 2026-04-23 14:17:12 +01:00
3rdit 57653c158f
CPUStack clear on exit 2026-04-23 13:40:02 +01:00
3rdit 0a1f454d7d
Better right-click menu for the CPUStack 2026-04-23 13:15:47 +01:00
3rdit a41f18684e
real return-to detection with disasm-back 2026-04-22 17:43:19 +01:00
3rdit a7afd8e176
populate Comments column with (initial) module resolution 2026-04-22 15:27:05 +01:00
3rdit c9ce5b8f8c
Formatted 2026-04-22 12:26:33 +01:00
3rdit 3043594fb2
Add CPUStack modify action (wiring for WordEditDialog.cpp and ValidateExpressionThread.cpp for cross widgets library) 2026-04-22 12:24:11 +01:00
3rdit 0dbc0ad45e
Codex review (freeze-state edge cases) 2026-04-21 15:25:25 +01:00
3rdit 4f40f6e7ca
Fixed dead code 2026-04-21 14:06:55 +01:00
3rdit 03d515ddaa
Formatted 2026-04-21 13:57:56 +01:00
3rdit 69e2b94500
Refresh mem map on every stop event 2026-04-21 13:54:43 +01:00
3rdit 36970b4ce0
Fix CPUStack follow-disasm validation and slot shadowing 2026-04-21 13:21:09 +01:00
3rdit 44673cd63c
Reset CPUStack freeze 2026-04-21 13:12:00 +01:00
3rdit 692a5ceaee
Add CPUStack panel to Linux debugger CPU tab 2026-04-21 13:01:05 +01:00
3rdit 9956a2fc39
Prior Codex review (github.com/x64dbg/x64dbg/pull/3826) 2026-04-21 11:51:20 +01:00
Duncan Ogilvie 98dc763c5a Scope membp debug flag workaround 2026-04-20 21:06:50 +02:00
Duncan Ogilvie 9c2c21af20 Add headless.exe to release package 2026-04-20 20:59:51 +02:00
Duncan Ogilvie c0f65673b4 Fix release notes dialog 2026-04-20 20:48:04 +02:00
Duncan Ogilvie a63852c174 Fix declarative test CI 2026-04-20 20:40:24 +02:00
Duncan Ogilvie 9e4550a462 Fix missing extern C for DbgValToString 2026-04-20 17:44:47 +02:00
Duncan Ogilvie e7fb94d08a Make tests declarative 2026-04-20 16:05:02 +02:00
Duncan Ogilvie 6088fc5e94
Merge pull request #3835 from 0x1F9F1/optimize-patternfind
Optimized patternfind
2026-04-20 14:42:45 +02:00
Brick 77d17997d7 Optimized patternfind 2026-04-20 13:02:34 +01:00
Duncan Ogilvie a6d430b287
Merge pull request #3831 from x64dbg/setfpuvalue-crash
Fix scalar assignment to whole FPU/SIMD registers
2026-04-20 01:30:51 +02:00
Duncan Ogilvie 6f605462bb Completely rework valtostring into valsetscalar/valsetbuffer 2026-04-20 00:35:10 +02:00
Duncan Ogilvie c685199f19
Merge pull request #3826 from 3rdit/feature/elfbug-86-setup-and-tweaks
ElfBug - initial architecture detect (reject everything else for now)
2026-04-19 20:04:31 +02:00
Duncan Ogilvie d6ac633e37
Merge pull request #3828 from torusrxxx/patch000000e8
Use consistent phrase for trace coverage options
2026-04-19 20:03:17 +02:00
Duncan Ogilvie 7fafa11b91 Fix issue3803 regression test on x86 2026-04-18 12:52:55 +02:00
Duncan Ogilvie b90140a155 Fix scalar writes to whole FPU/SIMD registers 2026-04-18 10:10:08 +02:00
torusrxxx dbb6f2dabc
Use consistent phrase for trace coverage options and fix misaligned exception 2026-04-17 23:49:45 +08:00
3rdit a8133a59e0
Formatted 2026-04-16 19:58:38 +01:00
3rdit 3b0045a4bb
Initial x86_64 scaffolding with exit msg for unsupported arch 2026-04-16 19:50:29 +01:00
3rdit 659832321b
Fix stale step state, unguarded mProcess/mThread writes, and lost BPs on step-over failure 2026-04-16 19:16:27 +01:00
Duncan Ogilvie a0a37d7bc4
Merge pull request #3824 from 3rdit/feature/elfbug-tests-and-fixes
Feature/elfbug tests and fixes
2026-04-16 19:54:35 +02:00
3rdit 34fb2a0d31
Fix race between api reads and process/thread exit 2026-04-16 16:15:51 +01:00
Duncan Ogilvie 8592a6d4b6
Merge pull request #3825 from x64dbg/astyle-python
Upgrade to AStyle 3.6.9 and add python port of AStyleHelper
2026-04-16 16:29:48 +02:00
3rdit 4b627a31d7
Will the formatter be happy? 2026-04-16 15:25:54 +01:00
3rdit 130055bde1
Forward pending signal on step, guard API reads after exit, drop dead state 2026-04-16 15:15:42 +01:00
Duncan Ogilvie 5e5ef12c29 Upgrade to AStyle 3.6.9 and add python port of AStyleHelper 2026-04-16 16:01:40 +02:00
3rdit 9b09e83c0c
Formatter again 2026-04-16 02:23:18 +01:00
3rdit 7ec6c02cb5
Init leaked stale launch state and rejected cwd-relative paths (Codex review) 2026-04-16 02:19:49 +01:00
3rdit 0ed945af36
formatter ran 2026-04-16 02:08:06 +01:00
3rdit ce1cf27630
check PTRACE_SINGLESTEP return, add Pause-after-exit and Debugger-reuse tests 2026-04-16 01:55:59 +01:00
3rdit 78a84772e4
set PTRACE_O_EXITKILL and also cleanup 2026-04-16 01:39:33 +01:00
3rdit 717650d514
fix EINTR drop on child pipe read, publish active after memoryMap is populated 2026-04-16 01:32:29 +01:00
3rdit 44126f7709
atomic mMainPid, PTRACE_EVENT_CLONE fixes, delete Process move ctor 2026-04-16 01:21:57 +01:00
3rdit 164af2ee2e
Seperate cmake.toml for tests + small comments in ElfBug 2026-04-16 01:10:51 +01:00
3rdit 7495dada6b
Initial ElfBug unit testing and some ElfBug tweaks + accessibility fix 2026-04-15 14:01:23 +01:00
Duncan Ogilvie 06a884c1d4 Fix PatternLanguage.cpp after libpl changes 2026-04-15 00:58:17 +02:00
Duncan Ogilvie 1740108ccd Fix accessibility for new RegistersView 2026-04-15 00:16:13 +02:00
Duncan Ogilvie 01fb912331
Merge pull request #3823 from x64dbg/appimage
AppImage build for cross/debugger
2026-04-15 00:02:50 +02:00
Duncan Ogilvie 7cbe41aea4 Small cleanups and AppImage support for cross/debugger 2026-04-14 23:59:27 +02:00
Duncan Ogilvie eb48012820
Merge pull request #3821 from 3rdit/feature/initial-linux-x64dbg
add initial Linux debugger with ElfBug ptrace engine and cross widget support
2026-04-14 21:33:03 +02:00
Duncan Ogilvie 2827f8816b Add thread/register view to cross/minidump 2026-04-14 20:27:41 +02:00
Duncan Ogilvie 92e47bed1d Clean up #ifdef mess in RegistersView 2026-04-14 20:01:35 +02:00
Duncan Ogilvie 2ebda66ea0 Fix bug in trace view where registers were not diffed correctly 2026-04-14 15:39:35 +02:00
Duncan Ogilvie 00d8ef35f9 Always use RegistersCanvas to render the RegistersView
This unifies the code across platforms and is much cleaner
2026-04-14 15:24:06 +02:00
Duncan Ogilvie b7076f6950
Merge pull request #3822 from x64dbg/membp-coverage
Expand memory breakpoint regression coverage
2026-04-13 21:41:07 +02:00
Duncan Ogilvie e1833bc9f3 Expand memory breakpoint test coverage 2026-04-13 18:05:59 +02:00
3rdit d016bc7a5f
elfbug: pipe error reporting, cv [aise, signal forwarding 2026-04-13 15:10:24 +01:00
Duncan Ogilvie aa5c5b5366
Merge pull request #3820 from x64dbg/TitanEngine-cleanup
Further cleanup and test improvements
2026-04-13 15:04:51 +02:00
3rdit 96da258285
codex review addressed 2026-04-13 12:45:07 +01:00
3rdit 52757b70c9
refactor RegistersView scroll handling 2026-04-13 12:39:05 +01:00
3rdit bcf0907f13
make ElfBug a static library, fixed windows compile too 2026-04-13 11:32:42 +01:00
3rdit c1166c4c6e
cmkr integration 2026-04-13 11:20:33 +01:00
Duncan Ogilvie 3c23e02336 Fix compilation in debug mode 2026-04-13 12:12:27 +02:00
Duncan Ogilvie 37f01f86b8 Re-enable membp range-write test and test GleeBug 2026-04-13 12:12:26 +02:00
Duncan Ogilvie 17103dbdb2 Add [Engine].NoConsoleWindow setting 2026-04-13 12:12:26 +02:00
Duncan Ogilvie 9a1fe10a70 Move Fill out of TitanEngine 2026-04-13 12:12:25 +02:00
Duncan Ogilvie 0b240928b9 Move HideDebugger out of TitanEngine 2026-04-13 12:12:22 +02:00
3rdit eb28c690d8
extern c null ptr guards, thread-safe quirks, removed [[maybe_unused]], tried formatting again 2026-04-13 10:53:47 +01:00
Duncan Ogilvie db9aef716f Move PE parsing and file mapping out of TitanEngine 2026-04-13 11:45:37 +02:00
3rdit 71e63838fd
formatting fix (i hope) 2026-04-13 10:38:09 +01:00
3rdit 210b836600
add Linux debugger with ElfBug ptrace engine and cross widget support 2026-04-13 10:23:30 +01:00
Duncan Ogilvie 0145bed572 Update release script to include debug engines 2026-04-12 19:22:04 +02:00
Duncan Ogilvie 44353ca9c8
Merge pull request #3818 from x64dbg/engine-submodules
Add TitanEngine/GleeBug as submodules
2026-04-12 19:13:21 +02:00
Duncan Ogilvie 6c7cc74bc8 Bump github actions versions 2026-04-12 19:08:05 +02:00
Duncan Ogilvie 8ff96e93f9 Remove debug engine binaries from deps 2026-04-12 17:59:44 +02:00
Duncan Ogilvie 2b3d38a835 Fix compilation on Windows with clang++ 2026-04-12 17:48:33 +02:00
Duncan Ogilvie 37270f3dda Add TitanEngine and GleeBug as submodules 2026-04-12 17:48:29 +02:00
Duncan Ogilvie 5e11b0269f DBG: trim script labels before duplicate checks
Closes #3813
2026-04-11 16:42:23 +02:00
Duncan Ogilvie 4cbf05a0b0
Merge pull request #3799 from torusrxxx/patch000000e7
Use run trace to assist correct disassembly (experimental)
2026-04-11 16:40:43 +02:00
Duncan Ogilvie 411caec5b7 gui: validate run trace boundaries before using them 2026-04-11 16:25:27 +02:00
Duncan Ogilvie 16274f7b7f cross: avoid TraceRecord Unknown name collision 2026-04-11 16:16:43 +02:00
Duncan Ogilvie 4c1fa03c49
Merge pull request #3810 from rafaelrfreitas/fix-2965
Mem BP behavior fixes, extra test implementations
2026-04-11 16:12:20 +02:00
Rafael Ribassin Gonçalves Ferreira de Freitas 9f81784574 fix: deadlock between script and main threads during yield 2026-04-11 13:50:06 +01:00
Duncan Ogilvie c908e041ab
Merge pull request #3789 from bbugdigger/dump-view-cycle-hotkeys
Added cycling hotkeys for dump view modes
2026-04-10 23:54:03 +02:00
Marko Mladenovic 8968b79e72
Merge pull request #3790 from bbugdigger/multi-breakpoint-selection
Toggle software breakpoints across all selected instructions in the disassembly view
2026-04-10 23:53:48 +02:00
Duncan Ogilvie ae073d13fd
Merge pull request #3792 from bbugdigger/references-copy-address-hotkey
Added References tab copy address shortcut
2026-04-10 23:53:23 +02:00
OldGamesCracking b9e91bc403
Use more std::string in simplescript (#3814)
* Fixed Order of evaluation

* Missing 'lstrip'

* Prevent creating an empty line from preceeding whitespaces

* Format

* Format

* Use std::string instead of char

* Format

* Take raw buffer size into account (again)

* Use number of bytes not chars

* Better trimming

* Made LINEMAPENTRY use strings instead of char buffers

* Format

* Allow ";" as linecomment

* Reverted change
2026-04-10 23:51:51 +02:00
Rafael Ribassin Gonçalves Ferreira de Freitas ef01966d25 fix: range-heap test for x86
- Updated README.md in tests/membp
2026-03-23 20:04:17 +00:00
Rafael Ribassin Gonçalves Ferreira de Freitas de26be0682 fix: restored original bpm behaviour and added tests
- Fixed 'range-delete' test.
- Added 'range-heap' test to check that memory bps in the heap work.
- Disabled 'range-write' test.
- Reintegrated original 'bpm' behaviour.
- 'findMemoryBreakpoint' is more compact and maintainable.
2026-03-23 16:57:08 +00:00
Duncan Ogilvie 22882bff77 WIP: vibeslop 2026-03-23 11:49:33 +00:00
Duncan Ogilvie 9f7ec9f7b3 WIP: more tests 2026-03-23 11:48:21 +00:00
Duncan Ogilvie cf7bb5856b WIP: attempt to fix scripting engine suspend issues 2026-03-23 11:46:02 +00:00
Duncan Ogilvie 95309a4db6 Add tests for memory breakpoints 2026-03-23 11:45:52 +00:00
Rafael Ribassin Gonçalves Ferreira de Freitas 92c3720708 Fix #2965: Mem BP aligns to the beginning of a region instead of a page
- Updated the 'bpm' command to align the target address to the start
  of a memory page and adjust the size accordingly.
- Resolved an issue where memory breakpoints weren't being placed
  when the program is reset (MemFindBaseAddr not finding module).
- Implemented 'findMemoryBreakpoint' using an O(log n) map lookup to
  efficiently retrieve breakpoints from within a memory range,
  working for both 'bpm' and 'bpmrange' breakpoints.
- Fixed a bug where page-aligned or 'bpmrange' breakpoints
  would incorrectly report "Breakpoint not in list" during lookups.
2026-03-23 11:44:10 +00:00
Duncan Ogilvie b0731c6327
Merge pull request #3809 from PedroLlussa/Issue-#3467-can't-load-DLL-with-no-entrypoint
Fix #3467: can't load DLL with no entrypoint
2026-03-22 00:26:27 +01:00
Duncan Ogilvie 0f6f25cc60 Delete some tests that were already migrated 2026-03-22 00:24:26 +01:00
Duncan Ogilvie 0922b2e0ce Fix broken links in docs 2026-03-22 00:22:03 +01:00
Duncan Ogilvie 7cbbc5c48c Fix testing lifecycle issues 2026-03-21 18:53:20 +01:00
Duncan Ogilvie d681f1ba83
Merge pull request #3811 from x64dbg/test-framework
Test framework
2026-03-21 18:41:37 +01:00
Duncan Ogilvie f1f43ac192 Run tests in GitHub Actions 2026-03-21 18:34:43 +01:00
Duncan Ogilvie d960ab2d07 Fix flag name in Script::Flag::Get
Closes #3808
2026-03-21 18:34:41 +01:00
Duncan Ogilvie 99f4f0e8ce Add a few initial tests 2026-03-21 18:34:41 +01:00
Duncan Ogilvie c87c4fa82d Add test framework infrastructure 2026-03-21 18:34:37 +01:00
Duncan Ogilvie d242f523dd Initial test framework proposal 2026-03-21 15:53:56 +01:00
Duncan Ogilvie f0a8f403e8 Skip loading GUI plugins in headless mode 2026-03-21 15:53:56 +01:00
Duncan Ogilvie 1540b90e58 Gracefully handle headless console shutdown 2026-03-21 15:53:55 +01:00
Duncan Ogilvie b5d1735ea0 Gracefully handle headless mode console redirects 2026-03-21 15:53:55 +01:00
Duncan Ogilvie 62d1bb3f5d Minor clang-tidy cleanups 2026-03-21 15:53:54 +01:00
Duncan Ogilvie 4570584b6d Expose MODINFO::load factory for loading modules without global state 2026-03-21 15:53:54 +01:00
Duncan Ogilvie 60da1d99e5 Add BridgeIsHeadless export 2026-03-21 15:53:53 +01:00
Pedro Filipe Llussa Tavares a7b8a02336 Fix #3467: can't load DLL with no entrypoint
x64dbg tries to set a breakpoint on the entry point. However, DLL
files may not have an entry point defined, therefore we need to
check if it is defined before setting a breakpoint so that the file
can be properly loaded. This fix implements a guard that prevents
the breakpoint from being set if there is no entry point.
2026-03-19 21:04:53 +00:00
Duncan Ogilvie 9da1f50098
Merge pull request #3796 from ali-asly101/fix-patch-import-undo-bug
Fix patch import undo bug
2026-03-14 17:45:00 +01:00
Duncan Ogilvie 2a48580867 Hash dependencies to properly update them when updating deps 2026-03-14 17:32:05 +01:00
Duncan Ogilvie d27fe4807f Only skip symlinked deps when copying
During development you can symlink TitanEngine.dll and it won't get
overwritten by the deps deployment step.
2026-03-14 17:11:09 +01:00
Duncan Ogilvie c5d702aa90 Make windeployqt resilient against globally configured Qt environments 2026-03-14 16:35:09 +01:00
Duncan Ogilvie 007a5efaed Fix pre-commit hook (again) 2026-03-14 15:52:08 +01:00
torusrxxx 7cb02a1d93
Fix compilation of cross 2026-02-27 18:38:44 +08:00
Duncan Ogilvie 8fe1486f16 Update dbg settings on startup 2026-02-25 02:32:31 +01:00
Duncan Ogilvie 21bfec9268 Do not export DllMain 2026-02-25 02:32:30 +01:00
Duncan Ogilvie 4f0d091543
Merge pull request #3798 from d2k2-git/better-typing-timer
faster search list filtering
2026-02-21 14:31:13 +01:00
d2k2-git 2551e5f81b use setCellContent with userdata parameter 2026-02-15 01:31:00 +01:00
d2k2-git 39e80d521d 250ms for mTypingTimer 2026-02-15 00:22:51 +01:00
d2k2-git 39bf2e5ee3 change to 400 ms 2026-02-14 18:05:51 +01:00
d2k2-git ead42e2b56 remove intial vector size 2026-02-14 17:51:16 +01:00
d2k2-git 7c92f53fe3 250 ms between keypresses should be ok for the average user typing speed. 2026-02-14 14:03:36 +01:00
d2k2-git cdf5219af4 faster StdTableSearchList::filter. call setRowCount only once with final row count. 2026-02-14 13:57:51 +01:00
d2k2-git 5278512903 use more reasonable values for mTypingTimer 2026-02-14 13:07:59 +01:00
torusrxxx 0dba857fd6
Use run trace to assist correct disassembly (experimental) 2026-02-14 19:27:45 +08:00
Ali 0156fe7469 fix formatting 2026-02-13 22:25:01 +08:00
Ali 35da97cda3 "Fix patch import undo bug" 2026-02-13 20:50:39 +08:00
Ali dd4f196769 Fix patch import undo bug 2026-02-13 20:46:22 +08:00
Duncan Ogilvie c64f7784ab
Merge pull request #3791 from bbugdigger/callstack-highlight
add call stack highlight by module or symbol
2026-02-07 16:46:20 +01:00
bugdigger 8fa6c4f8f6 Added suitable colors for the dark theme 2026-02-05 07:22:32 +01:00
bugdigger c03d34e1b3 Add References tab copy address shortcut 2026-02-04 21:59:52 +01:00
bugdigger a2ea0a4348 add call stack highlight by module or symbol 2026-02-04 19:08:10 +01:00
bugdigger 1ffb6c08c6 Added cycling hotkeys for dump view modes 2026-02-04 12:56:25 +01:00
Duncan Ogilvie c831898485 Revert "Accessibility memory management fixes"
This reverts commit 6c3a5cf811.
2026-02-04 12:37:11 +01:00
Duncan Ogilvie b37131ba6c Fix warnings in clang 21.1.8 2026-02-03 00:24:22 +01:00
Duncan Ogilvie ff130fa599 Bump cmkr to 0.2.46 2026-02-02 15:58:00 +01:00
Duncan Ogilvie 6c3a5cf811 Accessibility memory management fixes 2026-02-01 14:51:50 +01:00
Duncan Ogilvie 92a8917849 Oops, all debug engines ended up being the same
Note that this was human error, zero LLMs were involved in the creation
of this bug (Claude fixed it while I was making a sandwich though)
2026-01-26 23:33:26 +01:00
Duncan Ogilvie 8719e57289
Merge pull request #3748 from torusrxxx/patch000000e5
Optimize expression evaluation for tracing performance
2026-01-25 20:30:34 +01:00
Duncan Ogilvie f8c4c63a83
Merge pull request #3774 from justanotheranonymoususer/patch-2
Ctrl+C, Shift+Insert in SearchListView.cpp
2026-01-25 20:28:02 +01:00
Duncan Ogilvie 1fe5ffde8c
Merge pull request #3766 from mobile46/patch-2
Fix Fatal GUI Exception when using Ctrl+A in search boxes
2026-01-25 20:27:48 +01:00
Duncan Ogilvie a8b1adc19a
Merge pull request #3784 from 3rdit/fix/gigabyte-files
Fixed 2GB+ files causing a crash
2026-01-25 20:27:11 +01:00
Duncan Ogilvie f15078118c Fix clang-cl compilation and various warnings 2026-01-25 20:26:05 +01:00
Duncan Ogilvie a8429bec38 Fix crash when parsing expression functions 2026-01-25 20:24:01 +01:00
Duncan Ogilvie b811ac0d51 Lazily populate cell arrays 2026-01-25 20:24:00 +01:00
Duncan Ogilvie bc5f0cdc29 Fix ViewCell role 2026-01-25 20:23:59 +01:00
Duncan Ogilvie cd0270b60e Fix a bug with reordered columns 2026-01-25 20:23:59 +01:00
Duncan Ogilvie 89365c3164 Fix additional spaces in AccessibleHexDump 2026-01-25 20:23:58 +01:00
Duncan Ogilvie aac4554549 Add a few missing accessibility names 2026-01-25 20:23:57 +01:00
Duncan Ogilvie 9e1eb88044 Add screenreader test code 2026-01-25 20:23:57 +01:00
Duncan Ogilvie bf25d35956 Add PDBs when running windeployqt 2026-01-25 20:23:56 +01:00
Duncan Ogilvie 9fc3f2ad53
Merge pull request #3761 from torusrxxx/patch000000e6
Implement accessibility in RegistersView, Disassembly and most other tables
2026-01-25 20:23:14 +01:00
3rdit fe4f2faa99
Fixed 2GB+ files causing a crash 2026-01-21 15:19:41 +00:00
Duncan Ogilvie ef068b4af2
Merge pull request #3780 from 3rdit/fix/detach-option
Add option to detach instead of terminate when attaching to new process
2026-01-20 20:54:49 +01:00
3rdit c84970b333
Prevent attaching to the same process already being debugged 2026-01-20 18:39:12 +00:00
3rdit c0ce2d7d2f
use quint32 instead of duint 2026-01-20 17:58:23 +00:00
3rdit 98da6c03d7
Added on-attach choice to terminate or detach/leave-running before attaching to new process 2026-01-20 17:44:51 +00:00
Erdit 332f810349
Merge branch 'x64dbg:development' into fix/detach-option 2026-01-20 17:03:02 +00:00
AzuLX 8e9e4b9ee1
Added dialog confirmation with remember this 2026-01-13 22:57:41 +00:00
AzuLX 444b7f9f0d
Added detach on exit setting 2026-01-13 22:50:50 +00:00
AzuLX e14d7dcbaa
Merge branch 'fix/detach-option' of https://github.com/3rdit/x64dbg into fix/detach-option 2026-01-13 22:33:32 +00:00
AzuLX 8fdfb68ebf
moved HistoryClear to cbDebugDetach 2026-01-13 22:33:02 +00:00
Duncan Ogilvie 583658fba8
Merge pull request #3781 from 3rdit/feature/expression-validation
Expression validation added to breakpoint dialog (red and green borders)
2026-01-13 22:21:48 +01:00
AzuLX 5b6fb3a76b
made green use standard #00DD00 2026-01-13 14:54:47 +00:00
AzuLX c570230060
Expression validation added to breakpoint dialog (red and green borders) 2026-01-13 13:35:56 +00:00
Erdit db2b45b04f
Merge branch 'x64dbg:development' into fix/detach-option 2026-01-13 13:16:45 +00:00
AzuLX d50f4c3ad6
Add option to detach instead of terminate when attaching to new process 2026-01-13 13:13:52 +00:00
Duncan Ogilvie 66860fef76
Merge pull request #3778 from 3rdit/chore/rtu-switch
"Run to user code" switched to "rtu" command
2026-01-11 23:40:28 +01:00
AzuLX e0a994a66c
switch back to better rtu 2026-01-11 18:24:17 +00:00
Duncan Ogilvie 02f5e6e0f4
Merge pull request #3777 from 3rdit/fix/weird-bug
Fix module loading when file path is stale or file is locked
2026-01-11 13:26:42 +01:00
AzuLX d2a0ca99d1
debug log re-added 2026-01-11 11:46:11 +00:00
AzuLX e6bfcc791d
simplify module loading, use kernel hFile first 2026-01-11 11:40:31 +00:00
AzuLX 676e78c82b
added minor logs + remove outdated comment 2026-01-10 22:07:50 +00:00
AzuLX 7d8709e892
fix info.size not being set in memory fallback path 2026-01-10 21:51:43 +00:00
AzuLX 73b6ce65a2
fix info.size not being set in memory fallback path 2026-01-10 21:15:34 +00:00
AzuLX 1d83805c5d
fixed module loading on locked file 2026-01-10 20:49:31 +00:00
AzuLX f33a09767e
format file ran 2026-01-10 19:27:07 +00:00
AzuLX cf8b7f70a7
add fallback chain in cbLoadDll for path resolution 2026-01-10 18:59:01 +00:00
justanotheranonymoususer 1f5c310733
Ctrl+C, Shift+Insert in SearchListView.cpp 2026-01-07 12:20:02 +02:00
Mobile46 fae79cf767
Fix Fatal GUI Exception when using Ctrl+A in search boxes 2026-01-07 11:57:22 +03:00
Duncan Ogilvie 773482db87
Merge pull request #3772 from 3rdit/fix/elevation-auto-execute
Prevent unintended execution after declining elevation
2026-01-04 18:01:18 +01:00
AzuLX 077d26eaec
clear init variables on elevation decline 2026-01-04 15:57:14 +00:00
Duncan Ogilvie 9fe3f5b9c4
Merge pull request #3767 from mobile46/patch-3
Fix font changes not applying and dark theme border visibility
2026-01-02 22:24:04 +01:00
Duncan Ogilvie 7d61a38dcc
Merge pull request #3768 from mobile46/patch-4
Fix Restart as Admin command line argument passing
2026-01-02 22:23:26 +01:00
Mobile46 02f55af8a8
Fix Restart as Admin command line argument passing 2025-12-25 01:56:50 +03:00
Mobile46 6ca277d3d4
Fix dark theme border visibility 2025-12-25 00:51:48 +03:00
Mobile46 d572b8020e
Fix font changes not applying 2025-12-25 00:51:28 +03:00
torusrxxx e68cdecad7
Set icon for Load Dump button in Trace Widget 2025-12-23 17:23:24 +08:00
torusrxxx 57db42ef03
Use different color for new values in trace view 2025-12-23 17:15:49 +08:00
torusrxxx 9df2a03be6
Add accessibility support for TraceBrowser 2025-12-23 16:26:13 +08:00
torusrxxx 9c953264c9
Add accessibility support for HexDump 2025-12-22 21:02:43 +08:00
torusrxxx 4c38fc2d2a
Announce logs and debug state changes 2025-12-22 11:26:39 +08:00
torusrxxx 41f1bee185
Fix various Copilot issues 2025-12-21 11:27:03 +08:00
torusrxxx 0310c20463
Fix x86 build 2025-12-20 18:06:46 +08:00
torusrxxx fa61862986
Disassembly accessibility support 2025-12-20 17:53:38 +08:00
torusrxxx 1dc5df6153
Fix column reordering and hiding 2025-12-20 16:37:17 +08:00
torusrxxx 65a13352a7
Add column title accessibility 2025-12-20 11:50:46 +08:00
torusrxxx 7f8cd6c3c1
AbstractStdTable accessibility support 2025-12-20 10:40:14 +08:00
torusrxxx 9e7937cb21
Reorganize AccessibleAbstractTableView 2025-12-19 21:29:28 +08:00
torusrxxx 25d57b00c9
AbstractTableView accessibility support 2025-12-19 18:23:30 +08:00
torusrxxx abb841c923
Fix childAt must return a child 2025-12-19 18:10:06 +08:00
torusrxxx df5f2ef1a6
Emit value change accessibility event from RegistersView 2025-12-19 16:01:49 +08:00
torusrxxx e1f68cc259
Return proper rect to Microsoft Narrator 2025-12-17 16:46:27 +08:00
torusrxxx 8a5a0c610e Fixing AccessibleRegistersView 2025-12-15 10:49:22 +08:00
torusrxxx a0f4fe8a4d RegistersView Accessibility 2025-12-15 10:49:21 +08:00
Duncan Ogilvie bc9c79d899
Merge pull request #3728 from torusrxxx/patch000000e4
Save graph image as PDF
2025-12-14 14:45:50 +01:00
Duncan Ogilvie 1e29743f82 Rename trace coverage options to be clearer 2025-12-14 14:30:35 +01:00
torusrxxx 088b088a86
Replace linear time ThreadGetId(hActiveThread) with constant time GetDebugData()->dwThreadId 2025-12-04 12:10:50 +08:00
torusrxxx 3b8c001d6e Finish cleaning up registers setting code 2025-12-04 10:55:11 +08:00
torusrxxx 2fe189dcd6 Clean up and optimize register evaluation 2025-12-04 10:55:11 +08:00
torusrxxx 9e6cc1082c Clean up register expression evaluation code 2025-12-04 10:55:11 +08:00
torusrxxx 5e8376380f Optimize constant evaluation for tracing performance 2025-12-04 10:55:11 +08:00
LingMo e3ffc0c440
Fix UI and crash issues in TraceFileReader when parsing trace files containing user-defined blocks. (#3752)
Fix UI and crash issues in TraceFileReader when parsing trace files containing user-defined blocks.
2025-12-02 12:40:27 +01:00
Duncan Ogilvie fdd75d6182 Improve graph cache invalidation and use better function entry heuristic
Closes #3751
2025-12-01 15:27:10 +01:00
Duncan Ogilvie 8b7a6d38b9 Fix stale taskbar preview thumbnails after closing child windows. 2025-12-01 03:03:44 +01:00
Duncan Ogilvie e11f5b7eaa Support closing the application via taskbar during QDialog::exec 2025-11-30 15:00:28 +01:00
Duncan Ogilvie 2a0e261490 Improve SimpleTraceDialog to look a bit more polished 2025-11-30 14:38:42 +01:00
Duncan Ogilvie bddcd04210 Update README with latest sponsor information 2025-11-26 14:17:34 +01:00
Duncan Ogilvie 2d75fdcaa3 Fix formatting 2025-11-23 15:37:20 +01:00
d2k2-git 4df07c4367
Extend SimpleErrorBox with optional hide config parameters (#3745)
* Extend SimpleErrorBox with optional hide config parameters

* format code

* fix missing semicolon for cross build

* fixes for SimpleErrorBox

* use char instead QString for doNotShowAgainSetting parameter
2025-11-23 15:36:30 +01:00
Duncan Ogilvie 3c828bcd3e Blind fix for #3744 (divide by zero) 2025-11-22 21:09:23 +01:00
Duncan Ogilvie 3840066e6c Add untranslated 'Copy value' action 2025-11-22 20:43:39 +01:00
Duncan Ogilvie ab9995c1ce
Merge pull request #3741 from x64dbg/format-check
Check formatting in GitHub Actions
2025-11-20 00:52:55 +01:00
Duncan Ogilvie 0fa21ab247 Check formatting in GitHub Actions 2025-11-20 00:46:38 +01:00
Duncan Ogilvie eb34cd82f5
Merge pull request #3740 from ZehMatt/reg-byte-edit
Add support to be able to edit the raw bytes of a register
2025-11-19 23:27:17 +01:00
ζeh Matt d63dcca594
Add support to be able to edit the raw bytes of a register 2025-11-20 00:20:54 +02:00
Duncan Ogilvie f113c00e25
Merge pull request #3737 from d2k2-git/check-buffer-first-on-MemRead
check Buffer first on MemRead
2025-11-18 14:36:49 +01:00
Duncan Ogilvie 56f0fbd3ed
Merge pull request #3738 from d2k2-git/ActionCopyDisassembly
add shortcut 'ActionCopyDisassembly'
2025-11-17 20:14:37 +01:00
d2k2-git 3706462d13 add shortcut 'ActionCopyDisassembly' 2025-11-17 19:27:32 +01:00
LingMo a598cef999
Add two plugin callback for trace(StartTrace and StopTrace) (#3736)
add callback about trace.
2025-11-17 18:37:33 +01:00
d2k2-git 70289dc646 check Buffer first on MemRead 2025-11-16 22:38:35 +01:00
Duncan Ogilvie d2bd33cdeb
Merge pull request #3701 from WindowsAPI/fix/resolve-ordinal-imports
Fix ordinal imports display by resolving to function names
2025-11-16 16:39:32 +01:00
Duncan Ogilvie 252413c1dd Simplify SymbolFromAddressExact a bit more 2025-11-16 16:38:59 +01:00
Duncan Ogilvie 489f2bc3c3 Allow user-defined blocks in trace and extend root JSON
Closes #3696
2025-11-16 16:00:29 +01:00
Duncan Ogilvie d317a51343
Merge pull request #3731 from x64dbg/claude/add-trace-step-filter-011CV6Bi9e9tmrwVKoXsotEJ
Add TraceSetStepFilter command for module filtering
2025-11-16 15:20:09 +01:00
Duncan Ogilvie 838b302672
Merge pull request #3692 from x64dbg/vibe-pattern-ux
Implement better UX for pattern finding
2025-11-16 15:19:52 +01:00
Claude 43857d4831
Add module filter UI to SimpleTraceDialog
Added a "Module Filter" group box with radio buttons (None/User/System)
to the Simple Trace Dialog. The selected filter is applied via the
TraceSetStepFilter command before starting the trace.

Changes:
- Added QGroupBox with three QRadioButtons to SimpleTraceDialog.ui
- Radio buttons: None (default), User, System
- Updated dialog height from 218 to 268 to accommodate new controls
- Added radio buttons to tab order
- Modified on_btnOk_clicked() to execute TraceSetStepFilter command
  with the selected filter type before starting the trace
- Uses user-friendly labels without "party" terminology

The module filter setting is applied along with other trace settings
(log, command, log file) before the actual trace command executes.
2025-11-13 21:55:47 +00:00
Claude 91a7ae98ad
Use IsArgumentsLessThan helper for better error message
This provides a user-friendly error message that explains at least 1
argument must be specified and that arguments are comma-separated.
2025-11-13 21:50:06 +00:00
Claude 25b7be77b7
Remove query functionality from TraceSetStepFilter command
The command now requires an argument (none/user/system) and no longer
displays the current filter when called without arguments.
2025-11-13 21:46:32 +00:00
Claude 07716bebab
Refactor step filter to use MODULEPARTY and rename to partyfilter
Changes:
- Removed StepFilterType enum and include from debugger.h
- Reused MODULEPARTY enum (mod_user=0, mod_system=1) with -1 for none
- Renamed all internal functions from stepfilter to partyfilter:
  - dbgsetstepfilter -> dbgsettracepartyfilter
  - dbggetstepfilter -> dbggettracepartyfilter
  - SetStepFilter -> SetPartyFilter
  - GetStepFilter -> GetPartyFilter
- Added validation to reject unsupported party values when starting trace
- Command name remains TraceSetStepFilter for user-facing API

This fixes the compilation error where debugger_tracing.h (a non-regular
header file only meant for debugger.cpp) was included in debugger.h.
2025-11-13 16:54:13 +00:00
Claude 92740e4dac
Fix compilation error: include debugger_tracing.h in debugger.h
The StepFilterType enum is defined in debugger_tracing.h, so we need to
include that header in debugger.h to use it in the function declarations.
2025-11-13 16:42:22 +00:00
Claude ca9175f180
Add TraceSetStepFilter command for module-filtered tracing
Implements a new step filter system that allows users to filter trace
steps by module type (none/user/system). This simplifies the UI and API
by providing a single configuration point instead of requiring separate
trace commands.

Changes:
- Added StepFilterType enum (STEP_FILTER_NONE, STEP_FILTER_USER, STEP_FILTER_SYSTEM)
- Added step filter state to TraceState structure
- Implemented StepOverUser and StepOverSystem functions
- Added TraceSetStepFilter command to set/query the filter
- Modified TraceIntoXXX commands to use StepIntoUser/StepIntoSystem based on filter
- Modified TraceOverXXX commands to use StepOverUser/StepOverSystem based on filter

The step functions already handle stopping at the appropriate module type,
so no extra checks are needed in the trace collection function.

Usage:
  TraceSetStepFilter none     - No filtering (default)
  TraceSetStepFilter user     - Stop only at user code
  TraceSetStepFilter system   - Stop only at system code
  TraceSetStepFilter          - Query current filter
2025-11-13 16:24:10 +00:00
Duncan Ogilvie 2582f42f09
Merge pull request #3729 from x64dbg/checkoutv5
Bump GitHub actions/xxx versions
2025-11-13 15:16:51 +01:00
Torusrxxx 6cd4c50f01 Bump GitHub actions/xxx versions 2025-11-13 15:09:32 +01:00
Duncan Ogilvie 31373bc3a4 Make SortFnHelper::operator< const to fix compilation on C++20 2025-11-13 15:06:01 +01:00
torusrxxx a77c6ce347
Save graph image as PDF 2025-11-12 23:54:38 +08:00
Duncan Ogilvie 77fa9df439
Merge pull request #3712 from d2k2-git/fix-column-handling-in-cpu-disassembly
Fix column handling in cpu disassembly
2025-11-03 17:10:41 +01:00
Duncan Ogilvie 8efd8ce13f
Merge pull request #3714 from ismaelvazquez182/fix-search-selections
Changed ctrl+a to select all items instead of selecting all characters of search filter.
2025-11-03 17:07:39 +01:00
Duncan Ogilvie 1846a153ce Clarify address title in CPUDump + add hex byte view for consistency 2025-11-03 16:39:03 +01:00
d2k2-git faddbfcfa5 make column struct protected 2025-11-01 13:14:24 +01:00
Ismael Vazquez 5a4407ec5e Changed ctrl+a to select all DLLs instead of search filter. 2025-10-31 23:06:05 -07:00
d2k2-git fee38954f7 make column enum public for usage in CPUDisassembly 2025-10-28 19:28:50 +01:00
d2k2-git 5d6a28efa8 Merge branch 'development' of https://github.com/d2k2-git/x64dbg into development 2025-10-28 18:27:35 +01:00
Duncan Ogilvie 96e8d54d80 Fix column sorting in BreakpointsView 2025-10-06 16:23:09 +02:00
d2k2-git 7008699610 Merge branch 'development' of https://github.com/d2k2-git/x64dbg into development 2025-09-30 19:01:49 +02:00
d2k2-git 14e72cfa10
Merge branch 'x64dbg:development' into development 2025-09-30 18:51:26 +02:00
Duncan Ogilvie 4020a5cee1 Fix compilation for cross with latest Qt6 2025-09-24 12:25:16 +02:00
Duncan Ogilvie 24ee7c70e3 Remove a few meaningless WM constants hiding real ones 2025-09-17 16:40:57 +02:00
Duncan Ogilvie 8717849a7b Allow specifying exception behavior if SetThreadName breakpoint is disabled 2025-09-17 16:40:15 +02:00
Duncan Ogilvie 2195b5feaf Do not duplicate thread handles unnecessarily 2025-09-17 16:39:45 +02:00
Duncan Ogilvie 0d57e8f652 Zero initialize TITAN_ENGINE_CONTEXT_t 2025-09-17 16:39:31 +02:00
Duncan Ogilvie 568f53b1b6 Never allow fdProcessInfo to be null
Partially addresses #3699
2025-09-17 16:38:49 +02:00
Duncan Ogilvie 30d64b8a8d Add more types in TitanEngine.h 2025-09-17 16:37:43 +02:00
WindowsAPI 55802e132c
simplify ordinal import resolution using IAT address lookup 2025-09-07 18:11:04 -07:00
WindowsAPI 0051b67dec
resolve ordinal imports to function names using PDB symbols 2025-09-07 15:17:54 -07:00
Duncan Ogilvie 134e7ebb26 Add type for GetDebugData 2025-08-29 00:09:29 +02:00
Duncan Ogilvie a4f753e71f Switch to enums in TitanEngine.h 2025-08-29 00:03:57 +02:00
Duncan Ogilvie e1e954b862 Start reducing TitanEngine.h 2025-08-28 17:56:05 +02:00
Torusrxxx caf2c41153
Update documentation building instructions 2025-08-26 10:22:43 +00:00
torusrxxx d237bfe69f
Update API and Qt licence documentation 2025-08-26 17:52:06 +08:00
Duncan Ogilvie 968532794f Implement better UX for pattern finding 2025-08-23 01:15:24 +02:00
Duncan Ogilvie 61215a2356 Always display most recent release notes in development builds 2025-08-21 17:51:07 +02:00
torusrxxx b85b2f92d9
Update API documentation 2025-08-21 18:28:48 +08:00
Duncan Ogilvie 85e0ff8579 Fix positional issue with release notes dialog on startup 2025-08-19 21:36:23 +02:00
Duncan Ogilvie d6294a8370
Merge pull request #3686 from x64dbg/release-notes
Release notes dialog
2025-08-19 20:51:04 +02:00
Duncan Ogilvie 099a17a16a Build x64dbg.chm in CI
Closes #3687
2025-08-19 20:18:51 +02:00
Duncan Ogilvie dc3e8299d4 Update GitHub Actions to set X64DBG_RELEASE and upload pluginsdk 2025-08-19 19:39:25 +02:00
Duncan Ogilvie 7e31351107 Add dark mode bug icon 2025-08-19 18:14:00 +02:00
Duncan Ogilvie 4803303d28 Fix cross build 2025-08-19 00:54:18 +02:00
Duncan Ogilvie 3dc0f662fb Add release notes in the update checker 2025-08-19 00:05:02 +02:00
Duncan Ogilvie 49c145e603 Fix compilation on Qt 5.12 2025-08-19 00:04:28 +02:00
Duncan Ogilvie 05632f429a Show release notes on first startup of a new version 2025-08-18 21:50:23 +02:00
Duncan Ogilvie 5c84c5230d Move ReleaseNotesDialog to x64dbg::widgets 2025-08-18 21:43:26 +02:00
Duncan Ogilvie 28178084c6 Resize images when ImageTextBrowser width changes 2025-08-18 18:08:06 +02:00
Duncan Ogilvie b9f4f834fa Refactor ReleaseNotesDialog to prepare for release 2025-08-18 16:23:57 +02:00
Duncan Ogilvie f99c7c294b Update debug engines to 2025.08.18
https://github.com/x64dbg/TitanEngine/releases/tag/2025.08.18
https://github.com/x64dbg/GleeBug/releases/tag/2025.08.18
2025-08-18 03:41:31 +02:00
Duncan Ogilvie dc3a12bb50 Add support for sanitizers and fix a crash 2025-08-18 03:04:54 +02:00
Duncan Ogilvie dced055689 Fix struct view refreshing and add error message when connection fails 2025-08-18 02:41:40 +02:00
Duncan Ogilvie 531088c8eb Simplify licenses sections of the docs to use links instead 2025-08-18 01:45:17 +02:00
Duncan Ogilvie 1b9b7664ec
Merge pull request #3224 from x64dbg/cross-platform
Add some cross platform example projects
2025-08-18 01:23:10 +02:00
Duncan Ogilvie 54ddde3de0 Switch to fetch-content for udmp-parser 2025-08-18 01:04:57 +02:00
Duncan Ogilvie 0b00197a4a Add missing 0xPrefixValues config 2025-08-18 00:09:28 +02:00
Duncan Ogilvie a1352559f0 Only use color hacks for TypeWidget in x64dbg 2025-08-17 21:08:13 +02:00
Duncan Ogilvie 06cc3703ad Use existing TypeWidget instead of a butchered StructWidget in hex_viewer 2025-08-17 21:08:13 +02:00
Duncan Ogilvie b711f19694 Remove redundant release.bat 2025-08-17 21:08:13 +02:00
Duncan Ogilvie c11e93f283 Fix more compiler warnings 2025-08-17 21:08:13 +02:00
Duncan Ogilvie cc983665bd Fix printf warnings on linux 2025-08-17 21:08:13 +02:00
Duncan Ogilvie c4e61a5030 Update linux-pe 2025-08-17 21:08:13 +02:00
Duncan Ogilvie 22bae7bfe3 Fix compilation error with qfloat16 2025-08-17 21:08:13 +02:00
Duncan Ogilvie d70428c1cf Use Qt6 for better coverage 2025-08-17 21:08:13 +02:00
Duncan Ogilvie 64bc74a434 Fix include in zydis_wrapper 2025-08-17 21:08:13 +02:00
Duncan Ogilvie 88b268de05 Remove struct_viewer and btparser from cross 2025-08-17 21:08:12 +02:00
Duncan Ogilvie a04b3cafa2 Fix cross platform install 2025-08-17 21:08:12 +02:00
Duncan Ogilvie 42d6a0fe68 Fix qt_executable to work with Qt6 2025-08-17 21:08:12 +02:00
Duncan Ogilvie 7ed54825a8 Fix release_notes compilation on Windows 2025-08-17 21:08:12 +02:00
Duncan Ogilvie 9af3f860a6 Add release_notes test application 2025-08-17 21:08:12 +02:00
Duncan Ogilvie 2c226c9147 Fix pattern language integration after bump 2025-08-17 21:08:12 +02:00
Duncan Ogilvie 4f996a7276 Add GitHub actions for cross platform build 2025-08-17 21:08:12 +02:00
Duncan Ogilvie 2dbe6c1600 Bump ImHex PatternLanguage for unity build 2025-08-17 21:08:12 +02:00
Duncan Ogilvie b79a172f3e Fix compilation on Windows 2025-08-17 21:08:12 +02:00
Duncan Ogilvie 5a7cbc4a7b Minor usability improvements for hex_viewer 2025-08-17 21:08:12 +02:00
Duncan Ogilvie 0d2259a311 Add selection underlining feature to HexDump 2025-08-17 21:08:12 +02:00
Duncan Ogilvie 6b2c8d1d26 Initial POC for pattern language working 2025-08-17 21:08:11 +02:00
Duncan Ogilvie b5f6df737d Fix formatting 2025-08-17 21:08:11 +02:00
Duncan Ogilvie a4c45cf48d Fix compilation on windows 2025-08-17 21:08:11 +02:00
Duncan Ogilvie 608a10535c WIP: add a bunch of TODO comments 2025-08-17 21:08:11 +02:00
Duncan Ogilvie f8cefad5c1 Dark theme for hex_viewer 2025-08-17 21:08:11 +02:00
Duncan Ogilvie 56a151c06d Initial work on hex_viewer 2025-08-17 21:08:11 +02:00
Duncan Ogilvie d9e0a2e3df Reuse an std::vector for the read buffer in the HexDump 2025-08-17 21:08:11 +02:00
Duncan Ogilvie b79b1fd0e9 Correctly round up row count in HexDump when appropriate 2025-08-17 21:08:11 +02:00
Duncan Ogilvie 566f0d07d5 Support displaying memory at base 0 in HexDump 2025-08-17 21:08:11 +02:00
Duncan Ogilvie 735d7d7450 Allow disabling underlining in the HexDump 2025-08-17 21:08:11 +02:00
Duncan Ogilvie 1ab2af295c Fix formatting 2025-08-17 21:08:11 +02:00
Duncan Ogilvie f28e7a3362 Fix compilation on Windows 2025-08-17 21:08:10 +02:00
Duncan Ogilvie 35ca7ec4e8 Initial work on StructWidget based on btparser 2025-08-17 21:08:10 +02:00
Duncan Ogilvie 1503c00bfc Add Intel One Mono embedded fonts 2025-08-17 21:08:10 +02:00
Duncan Ogilvie 24644ed642 Empty struct_viewer project 2025-08-17 21:08:10 +02:00
Duncan Ogilvie 351890978b Play around with debouncing slow events in the remote table 2025-08-17 21:08:10 +02:00
Duncan Ogilvie 31f1fb6877 Basic PE file support 2025-08-17 21:08:10 +02:00
Duncan Ogilvie a2af08bd33 Rename AbstractParser to FileParser 2025-08-17 21:08:10 +02:00
Duncan Ogilvie c3d608759b Add vendored linux-pe 2025-08-17 21:08:10 +02:00
Duncan Ogilvie 7038b31e22 Abstract minidump parser 2025-08-17 21:08:09 +02:00
Duncan Ogilvie a3fb148644 Improve lag on startup when REToolSync doesn't connect 2025-08-17 21:08:09 +02:00
Duncan Ogilvie 5d4486e9b0 Add a simple overlay for connection status 2025-08-17 21:08:09 +02:00
Duncan Ogilvie 950e4a7f07 Fix compilation on macos (Qt5) 2025-08-17 21:08:09 +02:00
Duncan Ogilvie 52ec21f647 Add the missing minidump cross platform example project 2025-08-17 21:08:09 +02:00
Duncan Ogilvie f4f93fbfb8 Add some cross platform example projects 2025-08-17 21:08:09 +02:00
Duncan Ogilvie 6cacef3336 Remove dbghelp/DeviceNameResolver/TitanEngine from pluginsdk
#3412
2025-08-17 21:05:07 +02:00
Duncan Ogilvie 9e6fc87773 Fix code formatting 2025-08-17 20:36:57 +02:00
Duncan Ogilvie c84549a8ad
Merge pull request #3668 from torusrxxx/patch000000fd
Upgrade _WIN32_WINNT to Windows 7
2025-08-17 18:02:49 +02:00
Duncan Ogilvie 49ef645cb1 Remove XP compatibility code behind _WIN32_WINNT 2025-08-17 18:01:29 +02:00
Duncan Ogilvie cca598427f
Merge pull request #3681 from dabeibao/development
Goto dialog: add completion for labels
2025-08-17 17:50:53 +02:00
Duncan Ogilvie c7d5592623
Merge pull request #3672 from torusrxxx/patch000000e2
Search for intermodular calls in trace
2025-08-17 17:50:25 +02:00
Duncan Ogilvie 4f0b68c69f
Merge pull request #3670 from torusrxxx/patch000000fe
Follow in stack in trace registers view; fix shortcuts in registers view
2025-08-17 17:50:02 +02:00
Duncan Ogilvie 19bca832b3
Merge pull request #3674 from x64dbg/unity-build
Unity build
2025-08-17 17:49:44 +02:00
Duncan Ogilvie ee8d5ff93c
Merge pull request #3679 from eldarkg/fix-patch-file
Patch file: fix wine usage
2025-08-17 17:49:27 +02:00
dabeibao 01daf5c5b8 Goto dialog: add completion for labels
The lables' completions have lower priority.
The decoration role is also set to "functions" because
SymAutoComplete can only return strings.
2025-08-10 18:14:17 +08:00
Eldar Khayrullin 7f866fde29 Patch file: fix wine usage 2025-08-09 17:24:11 +03:00
Duncan Ogilvie f73d41feba Enable CMAKE_UNITY_BUILD in GitHub Actions 2025-08-05 23:42:44 +02:00
Duncan Ogilvie a1abde511e Prepare for unity builds 2025-08-05 23:09:44 +02:00
torusrxxx ecfc40fa58
Search for intermodular calls in trace 2025-08-04 10:42:01 +08:00
Eldar Khayrullin dc3b0a6540
Msvc wine build x64 architecture (#3669)
* COMPILE-linux: clarified the issues description

* qt-wine: delete deprecated workaround

* COMPILE-linux: restyle

* COMPILE-linux: add the instruction for build x64 architecture

* readme: add reference to linux compile

* Revert "readme: add reference to linux compile"

This reverts commit 56dbeb1f448ae11d1f79c5c99cc9dfb1b9b84cb1.
2025-08-03 15:08:25 +02:00
Duncan Ogilvie 79539ee416 Allow using VirtualQueryEx in MemIsCodePage and enable it everywhere
This fixes unnecessary popups when setting breakpoints in a region that
has been partially set to be executable.
2025-07-29 23:40:01 +02:00
torusrxxx badf2becf4
Follow in stack in trace registers view; fix shortcuts in registers view 2025-07-27 21:30:48 +08:00
Duncan Ogilvie e225968c4f Properly synchronize breakpoint commands and script state 2025-07-27 01:50:04 +02:00
torusrxxx bb300b6d30
Use thread local translation buffer for Windows Vista 2025-07-26 22:38:55 +08:00
torusrxxx dc96bc102b
Fix compiling for _WIN32_WINNT 0x0502 2025-07-26 16:22:19 +08:00
torusrxxx 232049df62
Upgrade _WIN32_WINNT to Windows 7, clean up GetProcAddress calls 2025-07-26 12:27:19 +08:00
ghadv0 c0d887dba5
Intermodular calls: add column for module name (#3664)
* Intermodular calls: add column for the module name (of the module containing the call instruction)
2025-07-26 00:43:49 +02:00
Duncan Ogilvie 926a2187e8
Merge pull request #3665 from torusrxxx/patch000000fb
Support adjusting font size via ctrl+wheel in RegistersView
2025-07-26 00:43:02 +02:00
Duncan Ogilvie fc97d55786
Merge pull request #3666 from torusrxxx/patch000000fc
Export table to tab-separated values
2025-07-26 00:42:48 +02:00
Duncan Ogilvie 754b4666b5 Greatly improve script state handling 2025-07-26 00:40:02 +02:00
Duncan Ogilvie 84668ac18d JobQueue.await now recursively calls job function when called on worker thread 2025-07-26 00:36:25 +02:00
Duncan Ogilvie 3a5f352fa9 Make breakpoint silent if breakpoint command execution fails 2025-07-26 00:34:07 +02:00
Duncan Ogilvie 9ce254418c Fix bug where disabling and reenabling GUI updates didn't update the GUI properly 2025-07-26 00:32:43 +02:00
Duncan Ogilvie 3522af5d80 Misc improvements 2025-07-26 00:29:55 +02:00
Duncan Ogilvie 89033cb6ec Show struct widget in DisplayTypeDialog 2025-07-26 00:28:56 +02:00
Duncan Ogilvie 4c0c3cd3dc Add clang-tidy configuration 2025-07-26 00:28:40 +02:00
torusrxxx ff890cfd84
Export table to tab-separated values 2025-07-25 23:11:07 +08:00
torusrxxx a185f6d548
Support adjusting font size via ctrl+wheel in RegistersView 2025-07-25 20:23:15 +08:00
Duncan Ogilvie 6cf7f60fff Do not produce an import library for exe target
Closes #3663
2025-07-24 23:33:30 +02:00
Duncan Ogilvie e9e3596e1d
Merge pull request #3660 from eldarkg/msvc-wine
msvc-wine: Fix: LINK : fatal error LNK1158: cannot run 'rc.exe'
2025-07-24 00:39:03 +02:00
Eldar Khayrullin 4fe2c45349 Restyle readme 2025-07-23 22:20:48 +03:00
Eldar Khayrullin bbec21fde3 msvc-wine: Fix: LINK : fatal error LNK1158: cannot run 'rc.exe' 2025-07-23 22:01:45 +03:00
Duncan Ogilvie 145c6a484a Fix headless initialization and thread model 2025-07-22 19:14:02 +02:00
Duncan Ogilvie 575d823d76
Merge pull request #3516 from peace-maker/cmdline_argparse
Use library for command line parsing
2025-07-22 19:09:30 +02:00
Duncan Ogilvie 8e070b7677 Add documentation for scriptexec/scriptrun/scriptcmd 2025-07-22 16:15:52 +02:00
Duncan Ogilvie bffce5143e Use scriptcmd and scriptexec for command line handling 2025-07-22 15:32:53 +02:00
Duncan Ogilvie 59b458852a Refactor scripting system to use JobQueue and allow better synchronization 2025-07-22 15:31:44 +02:00
Duncan Ogilvie e91ad3971f Add global atomic bIsDebugging flag to correctly track the debugger state
This potentially fixes a lot of race conditions when trying to wait for startup
2025-07-22 15:10:47 +02:00
Duncan Ogilvie 2368bfe8de Add super simple JobQueue implementation 2025-07-22 15:08:33 +02:00
Duncan Ogilvie a1ad4c00bb Rename MESSAGE_STACK to MESSAGE_QUEUE to reflect reality 2025-07-22 15:07:56 +02:00
Duncan Ogilvie 731ccba006 Add SharedSectionLocker/ExclusiveSectionLocker aliases for readability 2025-07-22 15:05:52 +02:00
Duncan Ogilvie ab32791e06 Fix CRT loading error in Debug 2025-07-22 15:05:08 +02:00
Duncan Ogilvie 4f406b274e GuiProcessEvents only processes events on the GUI thread 2025-07-22 15:04:41 +02:00
Duncan Ogilvie 68e80e6b3c
Merge pull request #3657 from eldarkg/msvc-wine
MSVC build under linux wine
2025-07-22 13:53:07 +02:00
Eldar Khayrullin cd850f6c2c Add more info to readme 2025-07-21 22:03:09 +03:00
Eldar Khayrullin e434db152f Move COMPILE-linux.md to docs 2025-07-21 20:08:12 +03:00
Duncan Ogilvie 64108f0b10 Improve launcher debuggee path handling 2025-07-21 18:52:18 +02:00
d2k2-git cb3f626933 Merge branch 'development' of https://github.com/d2k2-git/x64dbg into development 2025-07-21 18:45:28 +02:00
d2k2-git f0dfb54262
Merge branch 'x64dbg:development' into development 2025-07-21 18:39:59 +02:00
Peace-Maker 078ea3fcc1 Switch dbg command line parsing to args library 2025-07-21 15:44:53 +02:00
Duncan Ogilvie 6c94327505 Fix mnemonic brief column
Closes #3510
Closes #3509
2025-07-21 13:56:02 +02:00
Duncan Ogilvie b7407e075d
Merge pull request #3632 from kalhotky/fix/autocomment-precedence
Fix autocomment precedence
2025-07-21 13:33:12 +02:00
Duncan Ogilvie eda7c3296b
Merge pull request #3627 from d2k2-git/use-GUI_MAX_DISASSEMBLY_SIZE
align char buffer sizes with defined limit in GuiGetDisassembly
2025-07-21 13:31:31 +02:00
d2k2-git 074edbeb81 align char buffer sizes with defined limit in GuiGetDisassembly 2025-07-21 13:30:56 +02:00
Duncan Ogilvie 9a93383cb9 Automatically cancel previous workflow runs on the same branch 2025-07-21 13:29:07 +02:00
Duncan Ogilvie 7ebb9c7c66
Merge pull request #3641 from x64dbg/cursor/refactor-qzydis-instance-in-bridge-class-806d
Refactor QZydis instance in Bridge class
2025-07-21 13:24:09 +02:00
Duncan Ogilvie 840d9d2e93
Merge pull request #3638 from adityaxa/fix-trace-coverage-shortcut-label
Fix incorrect "None" label for disabled trace coverage in shortcuts
2025-07-21 13:23:18 +02:00
Duncan Ogilvie a5c3f8ab48
Merge pull request #3640 from kalhotky/feature/disasm-value-notation
Disasm value notation
2025-07-21 13:23:08 +02:00
Duncan Ogilvie 71e669822a
Merge pull request #3631 from kalhotky/fix/bp-fastresume-text
Fix fastresume hiding other summary text
2025-07-21 13:21:39 +02:00
Duncan Ogilvie 73a15c3112
Merge pull request #3630 from kalhotky/fix/symbolic-name-help
Fix symbolic name help URL encoding
2025-07-21 13:21:22 +02:00
Duncan Ogilvie d868da4c53
Merge pull request #3629 from kalhotky/fix/bp-addr
Fix deleting breakpoint at module base address
2025-07-21 13:21:10 +02:00
Duncan Ogilvie 4aa51f20e9
Merge pull request #3625 from d2k2-git/faster-disasmgetstringatwrapper
Faster disasmgetstringatwrapper
2025-07-21 13:20:27 +02:00
Duncan Ogilvie bd315bb656
Merge pull request #3562 from torusrxxx/patch000000f8
Update resources translations
2025-07-21 13:19:39 +02:00
Duncan Ogilvie fe16e2f1ac Add back -DX64DBG, closes #3634 2025-07-21 01:13:15 +02:00
Eldar Khayrullin 1097920f8d Merge branch 'development' into msvc-wine 2025-07-20 23:54:21 +03:00
Eldar Khayrullin 8f97124495 Add support to build under linux wine 2025-07-20 23:51:22 +03:00
Duncan Ogilvie 529f36dd14
Merge pull request #3628 from OldGamesCracking/development
Fixed pattern search
2025-07-19 22:56:39 +02:00
d2k2-git cf44e3446c Merge branch 'development' of https://github.com/d2k2-git/x64dbg into development 2025-07-11 20:57:37 +02:00
Cursor Agent ad8cc1f4e8 Improve disassembler configuration and lifecycle management
Co-authored-by: mr.exodia.tpodt <mr.exodia.tpodt@gmail.com>
2025-07-11 18:25:18 +00:00
kalhotky 56195a3a66 Update MASM notation and refactor code. 2025-07-11 20:12:17 +02:00
kalhotky 195e6ab3f3 Change size policy of combobox. 2025-07-11 19:34:37 +02:00
kalhotky 0eed5b590e Refactor value styles to value notations. 2025-07-11 19:10:53 +02:00
kalhotky 51924190ff Fix autocomment precedence in disassembly view. 2025-07-10 23:27:45 +02:00
OGC 6a5dfa7bbe Edge Case added 2025-07-10 21:39:10 +02:00
adityaxa a08ffbe39f Fix incorrect "None" label for disabled trace coverage in shortcuts
Removes the misleading "DebugTraceRecordNone" shortcut entry that incorrectly
displayed "None" for disabled trace coverage state in the shortcuts dialog.

Closes #3635
2025-07-10 19:57:39 +01:00
kalhotky 6cace9a982 Revert "Fix autocomment precedence."
This reverts commit e3f67f9888.
2025-07-10 12:42:00 +02:00
kalhotky e3f67f9888 Fix autocomment precedence. 2025-07-08 23:17:23 +02:00
kalhotky 7c83a4c9b3 Fix fastresume hiding log and cmd text. 2025-07-08 21:20:15 +02:00
kalhotky dbadb32bea Fix symbolic name help URL encoding. 2025-07-08 00:43:59 +02:00
kalhotky 73613d17fe Fix deleting breakpoint at module base address. 2025-07-07 21:16:47 +02:00
Dennis P. 156b0ebe6a Fixed pattern search 2025-07-07 20:54:57 +02:00
d2k2-git 3cf0821495
Merge branch 'x64dbg:development' into faster-disasmgetstringatwrapper 2025-07-06 12:49:40 +02:00
d2k2-git dc5c48446e execute disasmispossiblestring conditionally 2025-07-06 12:49:11 +02:00
Duncan Ogilvie 98291b35b7 Unbreak x32dbg after last commit 2025-07-06 12:31:16 +02:00
Duncan Ogilvie c589e7db3b Another attempt to fix msvcp140 loading
#3624
2025-07-06 12:20:34 +02:00
Duncan Ogilvie ad5e2d2ee2
Improve CONTRIBUTING guide
Thanks to @d2k2-git for helping out!
2025-07-05 20:03:14 +02:00
Duncan Ogilvie bec9333351 Improve developer experience when forking 2025-07-05 19:03:41 +02:00
Duncan Ogilvie bcdb5c5837
Merge pull request #3622 from x64dbg/revert-3588-fix-addr-cbInstrFindAllMem
Revert "Fixed inverted logic"
2025-07-04 21:22:30 +02:00
Duncan Ogilvie e5cb193849
Revert "Fixed inverted logic" 2025-07-04 21:03:46 +02:00
Duncan Ogilvie 736b2be377
Merge pull request #3617 from kalhotky/development
Display style values refactor and MASM style
2025-07-04 18:44:52 +02:00
Duncan Ogilvie 0fb8c3d263
Merge pull request #3620 from kalhotky/fix/hide-pointer-sizes
Fix ambiguous operand size when hiding pointer sizes
2025-07-04 18:44:21 +02:00
Duncan Ogilvie 9fb30cc7b4 Fix bug with string formatting 2025-07-04 18:34:15 +02:00
Duncan Ogilvie 7646a36dc9 Exclude unnecessary OpenGL libraries from snapshot 2025-07-04 17:58:27 +02:00
Duncan Ogilvie e9492e70d0 Fix AVX-512 crash on 32-bit 2025-07-04 17:29:33 +02:00
Duncan Ogilvie d0eecd084e Fix snapshot timestamp format 2025-07-04 02:06:29 +02:00
Duncan Ogilvie 699342d1b7 Move https://github.com/x64dbg/docs into this repo 2025-07-04 01:32:42 +02:00
kalhotky 2ea1f5b2a7 Format code. 2025-07-04 01:04:10 +02:00
kalhotky f711458ff9 Format code. 2025-07-04 00:46:57 +02:00
kalhotky 9b57a49627 Match coding style, add comment. 2025-07-04 00:41:42 +02:00
kalhotky 8e71dad881 Fix ambiguous operand size when hiding pointer sizes. 2025-07-04 00:38:48 +02:00
kalhotky 2b10f47749 Fix uninitialized variables. 2025-07-03 15:50:22 +02:00
kalhotky 2cd2476fbc Fix .ui line endings. 2025-07-03 15:49:58 +02:00
kalhotky 7065d6a7a0 Add display MASM style values. 2025-07-03 15:49:58 +02:00
Duncan Ogilvie 03aebe8a50 Always load VC runtime from application directory
#3616
2025-07-03 11:01:11 +02:00
Duncan Ogilvie 5cf93e0c3a InitializeSignatureCheck now loads msvcp140.dll 2025-07-02 01:23:06 +02:00
Duncan Ogilvie 9683bb38d0
Merge pull request #3588 from OldGamesCracking/fix-addr-cbInstrFindAllMem
Fixed inverted logic
2025-06-30 17:03:37 +02:00
Duncan Ogilvie fe8e5a013e
Merge pull request #3607 from eldarkg/wine-msg-bp
Fix Handles->Message Breakpoint: wnd proc or handle is unavailable (wine)
2025-06-30 17:02:58 +02:00
Duncan Ogilvie 65a087982b
Merge pull request #3610 from oxqnd/fix/label-whitespace-bug
Fix: Trim trailing whitespace in script labels #3589
2025-06-30 17:02:32 +02:00
Duncan Ogilvie 23f0ece561 Upload snapshot ZIP files as artifacts directly 2025-06-30 03:19:25 +02:00
Duncan Ogilvie abe77409b5 Update dependencies 2025-06-30 02:29:09 +02:00
Duncan Ogilvie a5cf563777 Match snapshot format to previous releases 2025-06-30 02:19:06 +02:00
Duncan Ogilvie 32f42753fd Get rid of Qt5Network dependency 2025-06-30 02:18:23 +02:00
oxqnd 34705e27be Fix: Handle trailing whitespace in script labels 2025-06-29 18:43:16 +09:00
Duncan Ogilvie 2aa48159b8 Print string values of character arrays 2025-06-26 21:22:17 +02:00
Eldar Khayrullin 58e7bf67bd Fix messages breakpoints: wnd proc or handle is unavailable (wine) 2025-06-26 22:10:35 +03:00
Duncan Ogilvie d88a62893a Improve pretty printing in NodeVisitor 2025-06-26 20:33:16 +02:00
Duncan Ogilvie 2e3af1c9c9 Hide __anonymous types 2025-06-26 17:29:24 +02:00
Duncan Ogilvie 52e3121583 Add GuiTypeListUpdated for better UX 2025-06-26 17:12:08 +02:00
Duncan Ogilvie 4df4c2ec87 Make type visiting expansion depth configurable 2025-06-26 17:12:08 +02:00
Duncan Ogilvie 5db5a106a0 Change StructWidget to inherit from TypeWidget 2025-06-26 17:12:00 +02:00
Duncan Ogilvie 1eae9f72ea Implement DisplayTypeDialog for better UX 2025-06-26 14:55:41 +02:00
Duncan Ogilvie 655708309a Add selectionChanged signal to SearchListView 2025-06-26 12:51:19 +02:00
Duncan Ogilvie b2e6e501ba Add back missing /DELAYLOAD options
#3412
2025-06-25 19:18:25 +02:00
Duncan Ogilvie 9b7733598b Add test for #3599 2025-06-25 19:04:33 +02:00
Duncan Ogilvie 15b3035ffe Update breakpoint dialog tooltip match reality 2025-06-25 19:04:32 +02:00
Duncan Ogilvie 27bba69ea6 Add a few string expression functions 2025-06-25 19:04:32 +02:00
Duncan Ogilvie 8fe261cb82 Prefix commands with $ to format the command itself 2025-06-25 16:56:39 +02:00
Duncan Ogilvie b1a14260f9 Static MSVC runtime for launcher and loaddll 2025-06-25 14:55:16 +02:00
Duncan Ogilvie df110dc06f Remove Visual Studio projects 2025-06-21 14:33:21 +02:00
Duncan Ogilvie 118d270d81 Performance improvements for StructWidget 2025-06-20 00:53:30 +02:00
Duncan Ogilvie 1e9bae2021 Fix a bug with GotoDialog::setInitialExpression not working twice in a row 2025-06-20 00:11:18 +02:00
Duncan Ogilvie d01fcbdd34 Mark padding as bitfield 2025-06-19 19:13:20 +02:00
Duncan Ogilvie 2223a7f10b Update AStyleHelper to only format changed files 2025-06-19 14:09:15 +02:00
Duncan Ogilvie 13b63bb2d4
Merge pull request #3597 from notpidgey/struct-view-update
Added Type Reload Functionality in Struct View
2025-06-19 14:09:07 +02:00
Duncan Ogilvie ba881ee3e8 Reorder the menu to be more natural 2025-06-19 14:07:09 +02:00
Duncan Ogilvie e125c96f05 Default to an empty name when display type 2025-06-19 13:46:31 +02:00
Duncan Ogilvie 78ed057754 Restore Refresh functionality and replace 'change address' with 'reload type' 2025-06-19 13:09:58 +02:00
Duncan Ogilvie fef5f2f2cd Simplify ActionHelpers and allow creating actions with descriptions 2025-06-19 13:09:15 +02:00
Duncan Ogilvie 2f6637f9cc Fix backwards compatibility 2025-06-19 11:48:28 +02:00
Pidgey 8197c96ce6
Updated code to fit PR review 2025-06-19 02:01:41 -04:00
Pidgey cf64258e9b
Added stable typename lookup API for enum members
LookupTypeById will cause nullptr if the types are reloaded but keep the same name. As a result, it will not be able to retrieve the enum members for the current enum name.
2025-06-18 02:05:13 -04:00
Pidgey 33db0de838
Fixed incorrect initialization of typeName field 2025-06-18 02:03:59 -04:00
Pidgey b75fdcd4a8
Moved reload into refresh function 2025-06-17 19:59:55 -04:00
Pidgey a719a0f4b6
Added struct refresh 2025-06-17 19:42:40 -04:00
Duncan Ogilvie 972d296b5c
Add IRC link to README 2025-06-16 21:35:01 +02:00
Duncan Ogilvie 82c5725862
Merge pull request #3578 from torusrxxx/patch000000f9
Copy graph image
2025-06-16 21:33:49 +02:00
Duncan Ogilvie 167c8becfe
Merge pull request #3585 from torusrxxx/patch000000fa
Draw jump lines under register label; Focus on window in handles view
2025-06-16 21:33:24 +02:00
Pidgey ab38798693
wip type refreshing 2025-06-15 17:13:21 -04:00
Duncan Ogilvie f3862f4641
Merge pull request #3595 from notpidgey/callconv-args
Added Copy Menu for Call Conv Arguments
2025-06-14 21:42:57 +02:00
Pidgey d6cd31e1d3
Added copy menu for arguments 2025-06-13 19:41:24 -04:00
Duncan Ogilvie ff1b2b21b9 Fix error handling in ParseTypes 2025-06-09 23:53:24 +02:00
Duncan Ogilvie e5ea90143f
Merge pull request #3593 from WindowsAPI/fix/types-missing-cstdint
Fix missing stdint types when building with vs2022 v120_xp toolset
2025-06-09 11:42:41 +02:00
WindowsAPI f920310a93
Fix missing <cstdint> include in types.h for uint*_t support
When trying to build from a clean env using vs2022 with vs13 platform toolset (v120_xp) results in missing type errors (e.g., uint32_t not defined). Adding <cstdint> resolves the issue.
2025-06-08 21:35:08 -07:00
Duncan Ogilvie 2d54cc46ec Move "Display type" to CommonActions and add to registers/stack 2025-06-08 22:03:38 +02:00
Duncan Ogilvie fd153e701f Small UX improvements in struct widget 2025-06-08 21:15:06 +02:00
Duncan Ogilvie c5abf7dfc2 Allow configuring default max pointer depth in DisplayType 2025-06-08 21:15:06 +02:00
Duncan Ogilvie f751f5bc18 Improved error reporting in DisplayType command 2025-06-08 21:15:06 +02:00
Duncan Ogilvie 6a874665de Fix errors with simple header parsing 2025-06-08 21:15:06 +02:00
Duncan Ogilvie b4da6eda3c Improve plugin loading error messages 2025-06-08 21:15:06 +02:00
Duncan Ogilvie c183595c1b
Update badges 2025-05-29 11:30:01 +02:00
OldGamesCracking af7b4043a7
Fixed inverted logic 2025-05-28 00:19:23 +02:00
torusrxxx 72f159fa88
Focus on window in handles view 2025-05-26 21:36:14 +08:00
torusrxxx acd8903e0b
Draw jump lines under register label 2025-05-26 21:01:54 +08:00
Duncan Ogilvie 2819790e13 Fix structure packing in TitanEngine.h
Closes #3563
2025-05-24 18:31:47 +02:00
torusrxxx 09c802bec5
Copy graph image 2025-05-05 20:04:49 +08:00
Duncan Ogilvie 9f1e78710f
Merge pull request #3552 from notpidgey/struct-view-update
Updated Type Database Handling
2025-04-14 19:55:37 +02:00
torusrxxx 1976cdb01a
Update resources translations 2025-04-14 22:10:53 +08:00
Pidgey d519cd0e5b
Bitfield display fix 2025-04-04 20:35:25 -04:00
Duncan Ogilvie 822a86a483 Little too much renaming there 2025-04-05 01:28:43 +02:00
Duncan Ogilvie a5a25cc4a4 Automatically download submodules when necessary 2025-04-05 00:13:24 +02:00
Duncan Ogilvie c2615db58e Rename and document a few more things in TypeManager 2025-04-05 00:11:00 +02:00
Pidgey fc751c8d80
Fixed unsigned int16s showing up as signed 2025-04-04 01:17:10 -04:00
Duncan Ogilvie 5d7a71a2ca Some small cleanups 2025-04-03 01:19:40 +02:00
Pidgey 02991d0cf6
fixed typo 2025-04-02 17:16:01 -04:00
Pidgey dcd4c069b1
added type lookup by id 2025-04-02 17:15:24 -04:00
Duncan Ogilvie 762b44d60d fix deps 2025-04-02 22:31:02 +02:00
Pidgey 90dec0a319
some gui stuff 2025-04-02 16:10:40 -04:00
snow 7dfa4a736f
visit type wip 2025-04-02 02:22:10 -04:00
snow ec267b96c6
added enum type resolution 2025-04-02 02:22:10 -04:00
snow 93ae8b1560
cleaned type size logic 2025-04-02 02:22:10 -04:00
snow 58cf1f8f5a
memory read callback fix 2025-04-02 02:22:10 -04:00
Pidgey d36c3b0dfa
moved enum display memory logic 2025-04-02 02:22:10 -04:00
Pidgey 51b9e0ec08
added clearing of enums 2025-04-02 02:22:10 -04:00
Pidgey 0288ff97fe
wip 2025-04-02 02:22:10 -04:00
snow fb97407043
hide anon fields/type names 2025-04-02 02:22:10 -04:00
snow 5d6fe5e503
added bitsize/size loading 2025-04-02 02:22:09 -04:00
snow 6963ca7589
fixed array visit member and display 2025-04-02 02:22:09 -04:00
snow 3934a9ff96
added isbitfield field 2025-04-02 02:21:55 -04:00
snow 792b5fbaff
Added void and typedef types 2025-04-02 02:21:55 -04:00
snow 2c79b99644
wip 2025-04-02 02:21:54 -04:00
snow 024b25a912
fixed padding 2025-04-02 02:21:54 -04:00
snow 16bf06d929
Schizo commit 2025-04-02 02:21:54 -04:00
Pidgey 60f9388938
Set default display type to assigned type 2025-04-02 02:21:54 -04:00
Pidgey 69df47aab7
Bounds check on struct parent display 2025-04-02 02:21:54 -04:00
Pidgey e40652fc5a
Recursive struct search for typedef types 2025-04-02 02:21:54 -04:00
Duncan Ogilvie 2df98d8074 Add some more state for the headless mode 2025-03-30 19:02:59 +02:00
Duncan Ogilvie 2a08360c67 Fix compilation with clang-cl 2025-03-30 17:50:01 +02:00
Duncan Ogilvie 1bde29d9df Add headless mode POC
Currently useless, but after #3516 is merged this will be used for automated testing

https://github.com/x64dbg/x64dbg_headless
2025-03-30 16:22:41 +02:00
Duncan Ogilvie 53637c610b Make a rebuild copy the dependencies again 2025-03-30 14:15:11 +02:00
Duncan Ogilvie 310935b749
Merge pull request #3532 from G3ph4z/issue_1640
New x96dbg configuration dialog
2025-03-30 13:55:15 +02:00
Duncan Ogilvie 79e5e7ffcd
Merge pull request #3521 from whindsaks/patch-1
Show launcher on first launch after installing
2025-03-30 13:52:05 +02:00
Duncan Ogilvie 31993c2d58
Merge pull request #3537 from G3ph4z/issue_2670
Always update the Example text's background color
2025-03-30 13:51:48 +02:00
Duncan Ogilvie d659dc9a24
Merge pull request #3546 from x64dbg/torusrxxx-patch-1-1
Fix wrong icon for ActionTreatSelectionAsXXX
2025-03-30 13:51:40 +02:00
Duncan Ogilvie a7e64fc72c
Merge pull request #3539 from x64dbg/mingw
Fix compilation on MinGW (clang)
2025-03-30 13:51:22 +02:00
Duncan Ogilvie 3caa50e4f2
Merge pull request #3536 from torusrxxx/AVX512
Add support for AVX512
2025-03-30 13:49:38 +02:00
Duncan Ogilvie 84a23f161f Bump TitanEngine_x64 2025-03-30 13:38:04 +02:00
torusrxxx 54d8dd4c25
Fix keyboard navigation in RegistersView 2025-03-27 17:41:45 +08:00
torusrxxx 0a6d8c5496
Limit vector length to 256 bits on computers not supporting AVX-512 2025-03-27 17:09:24 +08:00
torusrxxx c71327443d
Add support for editing AVX512 registers 2025-03-27 00:28:44 +08:00
torusrxxx 298cf102be Allow highlighting opmask registers 2025-03-26 22:32:59 +08:00
torusrxxx 8e52767d46
Pop up error when double clicking on AVX-512 registers when not supported 2025-03-26 21:21:41 +08:00
torusrxxx cbc4896d43
Reorganize REGDUMP to minimize padding, add winerrorname format function 2025-03-26 20:35:09 +08:00
torusrxxx 30fda8b41c
Add support for opmask registers in RegistersView 2025-03-26 17:04:22 +08:00
torusrxxx fd172927fe
Add AVX512 support for RegistersView 2025-03-26 00:46:02 +08:00
torusrxxx ae8504f372
Add AVX512 support for EncodeMap 2025-03-25 22:28:56 +08:00
Torusrxxx 1956402b30
Fix wrong icon for ActionTreatSelectionAsXXX 2025-03-24 11:37:25 +00:00
torusrxxx 9eaa5f4553
Add AVX512 support for CPUInfoBox 2025-03-24 13:02:20 +08:00
torusrxxx 62421ffd16 Begin migrating x64dbg.dll to use new AVX512 register context 2025-03-24 12:38:10 +08:00
torusrxxx 2192d19bed Allow kmovq to GPR, add kmovd command (easier for 32-bit) 2025-03-24 12:38:10 +08:00
torusrxxx 8eb501713b Allow using k0 register 2025-03-24 12:38:10 +08:00
torusrxxx ca93f483fc Add support for AVX512 2025-03-24 12:38:10 +08:00
Duncan Ogilvie c2204b8431
Merge pull request #3544 from torusrxxx/patch000000f7
Add dump support for half float
2025-03-23 21:13:46 +01:00
torusrxxx f2ee27b732
Add dump support for half float 2025-03-21 15:55:10 +08:00
Duncan Ogilvie 66ddb4198e
Merge pull request #3541 from x64dbg/torusrxxx-patch-2
Fix buffer overflow
2025-03-20 01:51:09 +01:00
Torusrxxx 5b2f5c4031
Update stringformat.cpp 2025-03-19 16:22:49 +00:00
Torusrxxx 04703952d6
Fix buffer overflow 2025-03-19 16:18:20 +00:00
Duncan Ogilvie d1670eef81 Fix spelling mistake 2025-03-17 02:55:28 +01:00
Duncan Ogilvie 4d2d0bd410 Cross-compilation example toolchain 2025-03-17 02:48:22 +01:00
Duncan Ogilvie 9b301b3c8d Fix compilation on MinGW (clang) 2025-03-17 02:32:14 +01:00
Duncan Ogilvie b57b134b35 Ignore clangd cache 2025-03-17 02:25:57 +01:00
Duncan Ogilvie 8adaab5db5
Merge pull request #3538 from x64dbg/vs2022-github-actions
Build with GitHub Actions
2025-03-17 02:07:45 +01:00
Duncan Ogilvie e8ffba6dcc Build with GitHub Actions 2025-03-17 01:32:11 +01:00
Duncan Ogilvie 53d1123e83 Split ModuleStdTable into header and sources to fix Q_OBJECT error 2025-03-16 23:14:28 +01:00
Duncan Ogilvie 2cfccf8d5e Fix translation errors 2025-03-16 18:03:09 +01:00
G3ph4z c113b20c4d fix: Always update the example text bg color 2025-03-15 20:17:30 +01:00
G3ph4z 0939434287 reformat: DlgConfigurations checkbox text 2025-03-03 23:42:54 +01:00
G3ph4z 1218421857 fix: DlgConfigurations size 2025-03-03 23:16:03 +01:00
G3ph4z 1c9d49af8c fix: Code format 2025-03-02 20:29:25 +01:00
G3ph4z 0c4d84d0b2 feat: New configuration dialog
It should solve the following issues: #1640 #3138
2025-03-02 20:27:04 +01:00
Whindmar Saksit a3a96b71e4
Show launcher on first launch after installing
This avoids having to re-start x96dbg on first run.
2025-02-14 15:13:21 +01:00
1282 changed files with 70918 additions and 33017 deletions

148
.clang-tidy Normal file
View File

@ -0,0 +1,148 @@
---
Checks: '
-*,
bugprone-argument-comment,
bugprone-assert-side-effect,
bugprone-bad-signal-to-kill-thread,
bugprone-branch-clone,
bugprone-copy-constructor-init,
bugprone-dangling-handle,
bugprone-dynamic-static-initializers,
bugprone-fold-init-type,
bugprone-forward-declaration-namespace,
bugprone-forwarding-reference-overload,
bugprone-inaccurate-erase,
bugprone-incorrect-roundings,
bugprone-integer-division,
bugprone-lambda-function-name,
bugprone-macro-parentheses,
bugprone-macro-repeated-side-effects,
bugprone-misplaced-operator-in-strlen-in-alloc,
bugprone-misplaced-pointer-arithmetic-in-alloc,
bugprone-misplaced-widening-cast,
bugprone-move-forwarding-reference,
bugprone-multiple-statement-macro,
bugprone-no-escape,
bugprone-parent-virtual-call,
bugprone-posix-return,
bugprone-reserved-identifier,
bugprone-sizeof-container,
bugprone-sizeof-expression,
bugprone-spuriously-wake-up-functions,
bugprone-string-constructor,
bugprone-string-integer-assignment,
bugprone-string-literal-with-embedded-nul,
bugprone-suspicious-enum-usage,
bugprone-suspicious-include,
bugprone-suspicious-memset-usage,
bugprone-suspicious-missing-comma,
bugprone-suspicious-semicolon,
bugprone-suspicious-string-compare,
bugprone-suspicious-memory-comparison,
bugprone-suspicious-realloc-usage,
bugprone-swapped-arguments,
bugprone-terminating-continue,
bugprone-throw-keyword-missing,
bugprone-too-small-loop-variable,
bugprone-undefined-memory-manipulation,
bugprone-undelegated-constructor,
bugprone-unhandled-self-assignment,
bugprone-unused-raii,
bugprone-unused-return-value,
bugprone-use-after-move,
bugprone-virtual-near-miss,
cert-dcl21-cpp,
cert-dcl58-cpp,
cert-err34-c,
cert-err52-cpp,
cert-err60-cpp,
cert-flp30-c,
cert-msc50-cpp,
cert-msc51-cpp,
cert-str34-c,
cppcoreguidelines-interfaces-global-init,
cppcoreguidelines-narrowing-conversions,
cppcoreguidelines-pro-type-member-init,
cppcoreguidelines-pro-type-static-cast-downcast,
cppcoreguidelines-slicing,
google-default-arguments,
google-explicit-constructor,
google-runtime-operator,
hicpp-exception-baseclass,
hicpp-multiway-paths-covered,
misc-misplaced-const,
misc-new-delete-overloads,
misc-no-recursion,
misc-non-copyable-objects,
misc-throw-by-value-catch-by-reference,
misc-unconventional-assign-operator,
misc-uniqueptr-reset-release,
modernize-avoid-bind,
modernize-concat-nested-namespaces,
modernize-deprecated-headers,
modernize-deprecated-ios-base-aliases,
modernize-loop-convert,
modernize-make-shared,
modernize-make-unique,
modernize-pass-by-value,
modernize-raw-string-literal,
modernize-redundant-void-arg,
modernize-replace-auto-ptr,
modernize-replace-disallow-copy-and-assign-macro,
modernize-replace-random-shuffle,
modernize-return-braced-init-list,
modernize-shrink-to-fit,
modernize-unary-static-assert,
modernize-use-auto,
modernize-use-bool-literals,
modernize-use-emplace,
modernize-use-equals-default,
modernize-use-equals-delete,
modernize-use-nodiscard,
modernize-use-noexcept,
modernize-use-nullptr,
modernize-use-override,
modernize-use-transparent-functors,
modernize-use-uncaught-exceptions,
mpi-buffer-deref,
mpi-type-mismatch,
openmp-use-default-none,
performance-faster-string-find,
performance-for-range-copy,
performance-implicit-conversion-in-loop,
performance-inefficient-algorithm,
performance-inefficient-string-concatenation,
performance-inefficient-vector-operation,
performance-move-const-arg,
performance-move-constructor-init,
performance-no-automatic-move,
performance-noexcept-move-constructor,
performance-trivially-destructible,
performance-type-promotion-in-math-fn,
performance-unnecessary-copy-initialization,
performance-unnecessary-value-param,
portability-simd-intrinsics,
readability-avoid-const-params-in-decls,
readability-const-return-type,
readability-container-size-empty,
readability-convert-member-functions-to-static,
readability-delete-null-pointer,
readability-deleted-default,
readability-inconsistent-declaration-parameter-name,
readability-make-member-function-const,
readability-misleading-indentation,
readability-misplaced-array-index,
readability-non-const-parameter,
readability-redundant-control-flow,
readability-redundant-declaration,
readability-redundant-function-ptr-dereference,
readability-redundant-smartptr-get,
readability-redundant-string-cstr,
readability-redundant-string-init,
readability-simplify-subscript-expr,
readability-static-accessed-through-instance,
readability-static-definition-in-anonymous-namespace,
readability-string-compare,
readability-uniqueptr-delete-release,
readability-use-anyofallof
'

View File

@ -7,19 +7,18 @@ Welcome to x64dbg! This document is relevant for you if you want to contribute t
This is a list of things you can do to help us out (in no particular order). Each item will be expanded upon later in the document.
- [Compile x64dbg](https://github.com/x64dbg/x64dbg/wiki/Compiling-the-whole-project) and add new features ([good first issues](https://easy.x64dbg.com) are a good place to start).
- [Report bugs](https://report.x64dbg.com) at the issue tracker.
- Add feature requests to the [issue tracker](https://issues.x64dbg.com).
- Add report bugs of feature requests to the [issue tracker](https://issues.x64dbg.com).
- [Write a blogpost](https://x64dbg.com/blog/2016/07/09/Looking-for-writers.html) for the [official blog](https://blog.x64dbg.com).
- [Contact us](https://x64dbg.com/#contact) and talk about x64dbg.
- [Contact us](https://x64dbg.com/#contact) and chat about x64dbg.
- Send a [donation](https://donate.x64dbg.com) to support the project.
- [Translate](https://translate.x64dbg.com) x64dbg (contact us if your language isn't listed).
- Help us improve the [documentation](https://github.com/x64dbg/docs/issues).
- [Translate](https://translate.x64dbg.com) x64dbg (reach out if your language is not listed).
- Help us improve the [documentation](https://help.x64dbg.com).
### Compile x64dbg
There is a guide to [compiling the whole project](https://github.com/x64dbg/x64dbg/wiki/Compiling-the-whole-project) available. This might seem difficult at first, but if you install the correct versions of the *Prerequisites* it will be a breeze.
There is a guide to [compiling the whole project](https://github.com/x64dbg/x64dbg/wiki/Compiling-the-whole-project) available. We recently spent a lot of effort on making this as seamless as possible, but if you have any difficulties, reach out on Discord (`#development` channel)!
Compiling x64dbg is very useful to us (even if you don't add any code). Your experience can improve this guide and help new contributors.
[![](https://dcbadge.limes.pink/api/server/PRfRYbt)](https://discord.x64dbg.com)
#### Getting started with development
@ -30,22 +29,38 @@ As with any open source project, documentation is lacking and the code can seem
- [User interface design principles](https://x64dbg.com/blog/2016/08/08/user-interface-design-principles.html) blog post. It explains some of the design philosophy.
- [Control flow graph](https://x64dbg.com/blog/2016/07/27/Control-flow-graph.html) blog post. The post links to the relevant code sections.
- Blog post about the [plugin SDK](https://x64dbg.com/blog/2016/07/30/x64dbg-plugin-sdk.html). Writing an x64dbg plugin can also help you understand the code structure.
- Check out the [DeepWiki page](https://deepwiki.com/x64dbg/x64dbg) and ask Devin where to start.
This is by no means an exhaustive list and we are still working on lowering the barrier for new contributors. The feedback of new contributors is vital to reaching this goal.
#### Sending a pull request
Here is a little guide on how to do a clean pull request for people who don't yet know how to use git. We recommend using [Git Extensions](https://gitextensions.github.io), but any git interface is fine.
Here is a little guide on how to do a clean pull request for people who don't yet know how to use git:
1. First we need to [fork](https://help.github.com/articles/fork-a-repo/) the actual x64dbg repo on our github account.
2. When the fork is finished, clone the repo (`git clone https://github.com/myname/x64dbg.git`).
3. When pushing new features/bug/whatever to a github project the best practice is to create branches. The command `git checkout -b my-branch-name` will automatically create a branch and check it out.
4. Make all the changes you want and when finishing it, use `git add myfiles` to add it to the repo.
5. Commit your change. `git commit -m 'a message about what you changed'`. The change are applied to your local git repo.
6. Push it to your `origin`. The `origin` is your repo which is hosted on github. `git push --set-upstream origin your-branch-name`.
7. Sync with the `upstream` repo, the real x64dbg repo. `git remote add upstream https://github.com/x64dbg/x64dbg.git`, using `git remote -v` will show which origin/upstream are setup in the local repo.
8. Sync your fork with the `upstream`, `git fetch upstream`. Now checkout your local `development` branch again `git checkout development` and merge the upstream `git merge upstream/development`.
9. Time to create the pull request! Using the github ui, go to your account/repo, select the branch you already pushed, and click `Pull request`. Review your pull request and send it.
1. First we need to [fork](https://github.com/x64dbg/x64dbg/fork) the upstream x64dbg repo on our GitHub account.
2. When the fork is finished, clone the repo:
```sh
git clone --recursive https://github.com/<yourusername>/x64dbg.git
```
3. Create a [feature branch](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-branches) to isolate your changes:
```sh
git checkout -B my-feature
```
4. Make all the changes you want and when finished, add the files to the [staging area](https://git-scm.com/about/staging-area):
```sh
git add .
```
5. Create a [commit](https://docs.github.com/en/pull-requests/committing-changes-to-your-project/creating-and-editing-commits/about-commits) in your local git repository from the changes in your staging area:
```sh
git commit -m "Added a cool feature"
```
6. Push the changes to your fork:
```sh
git push --set-upstream origin my-feature
```
7. Time to create the pull request! Navigate to your forked repository in the browser and click the green `Pull request` button.
For a more in-depth tutorial, you can look at GitHub's official [contributing to a project](https://docs.github.com/en/get-started/exploring-projects-on-github/contributing-to-a-project) guide.
Happy PRs!
@ -67,11 +82,15 @@ We understand that it can be disappointing to not get your feature implemented,
### Write a blogpost
The x64dbg blog is open to all contributors (foreign and domestic). We encourage anyone who has an interesting encounter with the x64dbg code base, or a use case to share it with the community. For a guideline on how/what to contribute see the [blog post](https://x64dbg.com/blog/2016/07/09/Looking-for-writers.html) about contributing to the blog. Don't worry about contributing complex posts, we welcome ALL experience levels to add content to the blog!
The x64dbg blog is open to all contributors (foreign and domestic). We encourage anyone who has an interesting encounter with the x64dbg code base, or a use case to share it with the community. For a guideline on how/what to contribute see the [blog post](https://x64dbg.com/blog/2016/07/09/Looking-for-writers.html) about contributing to the blog. Don't worry about contributing complex posts, we welcome ALL experience levels to add content to the blog!
### Contact us
There are several ways to reach out to the community of x64dbg developers, contributors and users. Chat channels consist of a [Telegram](https://telegram.me/x64dbg), [Gitter](https://gitter.x64dbg.com/) and [IRC](https://webchat.freenode.net/?channels=x64dbg) channel. Most questions regarding contributing, developing and using x64dbg can be answered here. To ensure channel cohesion a bot will sync messages across all three channels. (when it is not down ;))
There are several ways to reach out to the community of x64dbg developers, contributors and users:
[![Discord](https://img.shields.io/badge/chat-on%20Discord-green.svg)](https://discord.x64dbg.com) [![Slack](https://img.shields.io/badge/chat-on%20Slack-red.svg)](https://slack.x64dbg.com) [![Gitter](https://img.shields.io/badge/chat-on%20Gitter-lightseagreen.svg)](https://gitter.im/x64dbg/x64dbg) [![Matrix](https://img.shields.io/badge/chat-on%20Matrix-yellowgreen.svg)](https://riot.im/app/#/room/#x64dbg:matrix.org) [![IRC](https://img.shields.io/badge/chat-on%20IRC-purple.svg)](https://web.libera.chat/#x64dbg)
Discord is the main communication channel, but the other platforms are synchronized with the `#general` channel.
### Translate

Binary file not shown.

Binary file not shown.

View File

@ -12,10 +12,10 @@
<value>*.c;*.h;*.cpp;*.hpp</value>
</setting>
<setting name="Options" serializeAs="String">
<value>style=allman, convert-tabs, align-pointer=type, align-reference=middle, indent=spaces, indent-namespaces, indent-col1-comments, pad-oper, unpad-paren, keep-one-line-blocks, close-templates</value>
<value>style=allman, convert-tabs, align-pointer=type, align-reference=middle, indent=spaces, indent-namespaces, indent-col1-comments, unpad-paren, keep-one-line-blocks, close-templates</value>
</setting>
<setting name="Ignore" serializeAs="String">
<value />
<value>src/cross/vendor;src/gui/Src/ThirdPartyLibs/md4c</value>
</setting>
<setting name="License" serializeAs="String">
<value />

429
.github/format/AStyleHelper.py vendored Normal file
View File

@ -0,0 +1,429 @@
#!/usr/bin/env -S uv run --script
# /// script
# requires-python = ">=3.10"
# dependencies = [
# "astyle==3.6.9",
# ]
# ///
from __future__ import annotations
import importlib.metadata
import re
import shutil
import subprocess
import sys
import sysconfig
from pathlib import Path
PATTERNS = ("*.c", "*.h", "*.cpp", "*.hpp")
OPTIONS = (
"style=allman, convert-tabs, align-pointer=type, align-reference=middle, "
"indent=spaces, indent-namespaces, indent-col1-comments, "
"unpad-paren, keep-one-line-blocks, close-templates"
)
IGNORE_PATTERNS = (
r"src/cross/vendor",
r"src/gui/Src/ThirdPartyLibs/md4c",
)
LICENSE_TEXT = ""
EXIT_OK = 0
EXIT_CHANGES = 1
EXIT_ERROR = 2
def stderr(message: str) -> None:
print(message, file=sys.stderr)
def usage() -> int:
stderr(
"Usage: AStyleHelper.py [Silent|Check] [filter_epoch]\n"
"\n"
"Formats the git repository containing the current working directory.\n"
"If the current working directory is not inside a git repository, it formats that directory.\n"
"\n"
"Modes:\n"
" <no mode> Format files and print each file as it is processed.\n"
" Silent Format files without progress output.\n"
" Check Check formatting without modifying files.\n"
"\n"
"Examples:\n"
" uv run --script .github/format/AStyleHelper.py\n"
" uv run --script .github/format/AStyleHelper.py Silent\n"
" uv run --script .github/format/AStyleHelper.py Check\n"
)
return EXIT_ERROR
def parse_filter_epoch(args: list[str]) -> tuple[int, int]:
if not args:
return 0, EXIT_OK
try:
return int(args[0]), EXIT_OK
except ValueError:
stderr(f"Invalid epoch time provided: {args[0]}")
return 0, EXIT_ERROR
def option_flags() -> list[str]:
return [f"--{option.strip()}" for option in OPTIONS.split(",") if option.strip()]
def find_astyle_executable() -> Path:
candidate_names = ("astyle.exe", "AStyle.exe", "astyle", "AStyle")
try:
dist = importlib.metadata.distribution("astyle")
preferred = []
fallback = []
for file in dist.files or []:
path = Path(file)
if path.name not in candidate_names:
continue
located = Path(dist.locate_file(file))
if not located.is_file():
continue
if "data" in path.parts:
preferred.append(located)
else:
fallback.append(located)
if preferred:
return preferred[0]
if fallback:
return fallback[0]
except importlib.metadata.PackageNotFoundError:
pass
candidate_dirs = []
scripts_dir = sysconfig.get_path("scripts")
if scripts_dir:
candidate_dirs.append(Path(scripts_dir))
candidate_dirs.append(Path(sys.executable).resolve().parent)
for directory in candidate_dirs:
for name in candidate_names:
candidate = directory / name
if candidate.is_file():
return candidate
for name in candidate_names:
resolved = shutil.which(name)
if resolved:
return Path(resolved)
raise FileNotFoundError(
"Could not locate the 'astyle' executable from the astyle wheel."
)
def get_git_root(start_dir: Path) -> Path:
try:
result = subprocess.run(
["git", "rev-parse", "--show-toplevel"],
cwd=start_dir,
capture_output=True,
text=True,
encoding="utf-8",
errors="replace",
check=False,
)
if result.returncode == 0:
git_root = result.stdout.strip()
if git_root:
return Path(git_root).resolve()
except OSError:
pass
return start_dir.resolve()
def filter_git_ignored(root: Path, files: list[Path]) -> list[Path]:
if not files:
return files
try:
relative_paths = [file.as_posix() for file in files]
result = subprocess.run(
["git", "check-ignore", "--no-index", "--stdin"],
cwd=root,
input="\n".join(relative_paths) + "\n",
capture_output=True,
text=True,
encoding="utf-8",
errors="replace",
check=False,
)
if result.returncode not in (0, 1):
return files
ignored = {
line.strip().replace("\\", "/")
for line in result.stdout.splitlines()
if line.strip()
}
return [file for file in files if file.as_posix() not in ignored]
except OSError:
return files
def git_ls_files(root: Path) -> list[Path]:
try:
result = subprocess.run(
[
"git",
"ls-files",
"--cached",
"--others",
"--exclude-standard",
"--",
*PATTERNS,
],
cwd=root,
capture_output=True,
text=True,
encoding="utf-8",
errors="replace",
check=False,
)
if result.returncode == 0:
seen: set[str] = set()
files: list[Path] = []
for line in result.stdout.splitlines():
line = line.strip()
if not line or line in seen:
continue
seen.add(line)
files.append(Path(line))
return filter_git_ignored(root, files)
except OSError:
pass
seen: set[str] = set()
files: list[Path] = []
for pattern in PATTERNS:
for path in root.rglob(pattern):
if not path.is_file():
continue
relative = path.relative_to(root)
key = relative.as_posix()
if key in seen:
continue
seen.add(key)
files.append(relative)
files.sort(key=lambda path: path.as_posix())
return files
def should_ignore(path: Path) -> bool:
normalized = path.as_posix()
return any(re.search(pattern, normalized) for pattern in IGNORE_PATTERNS)
def should_process(root: Path, relative_path: Path, filter_epoch: int) -> bool:
if should_ignore(relative_path):
return False
if filter_epoch <= 0:
return True
try:
return int((root / relative_path).stat().st_mtime) >= filter_epoch
except OSError:
return False
def read_utf8(path: Path) -> str | None:
try:
return path.read_bytes().decode("utf-8")
except (OSError, UnicodeDecodeError):
return None
def normalize_output(text: str) -> str:
text = text.replace("\r\n", "\n").replace("\r", "\n")
text = text.replace("\n", "\r\n")
text = text.strip("\uFEFF\u200B")
if LICENSE_TEXT and not text.startswith(LICENSE_TEXT):
text = LICENSE_TEXT + text
return text
def chunk_paths(paths: list[Path], max_command_chars: int = 24000) -> list[list[Path]]:
chunks: list[list[Path]] = []
current: list[Path] = []
current_chars = 0
for path in paths:
path_chars = len(str(path)) + 3
if current and current_chars + path_chars > max_command_chars:
chunks.append(current)
current = []
current_chars = 0
current.append(path)
current_chars += path_chars
if current:
chunks.append(current)
return chunks
def run_astyle(astyle_exe: Path, file_paths: list[Path], dry_run: bool) -> subprocess.CompletedProcess[str]:
command = [
str(astyle_exe),
*option_flags(),
"--options=none",
"--project=none",
"--formatted",
]
if dry_run:
command.append("--dry-run")
else:
command.append("--suffix=none")
command.extend(str(file_path) for file_path in file_paths)
return subprocess.run(
command,
capture_output=True,
text=True,
encoding="utf-8",
errors="replace",
check=False,
)
def parse_changed_paths(output: str, root: Path) -> list[str]:
changed_files: list[str] = []
root_resolved = root.resolve()
for line in output.splitlines():
line = line.strip()
if not line or not line.startswith("Formatted"):
continue
path_text = line[len("Formatted"):].strip()
try:
relative = Path(path_text).resolve().relative_to(root_resolved).as_posix()
except (OSError, ValueError):
relative = path_text.replace("\\", "/")
changed_files.append(relative)
return changed_files
def format_directory(root: Path, write_changes: bool, filter_epoch: int, show_progress: bool = False) -> tuple[list[str], list[str]]:
changed_files: set[str] = set()
errors: list[str] = []
astyle_exe = find_astyle_executable()
file_records: list[tuple[Path, str]] = []
for relative_path in git_ls_files(root):
if not should_process(root, relative_path, filter_epoch):
continue
original_text = read_utf8(root / relative_path)
if original_text is None:
continue
file_records.append((relative_path, original_text))
if show_progress:
for relative_path, _ in file_records:
print(relative_path.as_posix(), flush=True)
absolute_paths = [root / relative_path for relative_path, _ in file_records]
for batch in chunk_paths(absolute_paths):
result = run_astyle(astyle_exe, batch, dry_run=not write_changes)
if result.returncode != 0:
batch_set = {path.resolve() for path in batch}
for relative_path, _ in file_records:
if (root / relative_path).resolve() in batch_set:
errors.append(f"Cannot format {relative_path.as_posix()}")
continue
changed_files.update(parse_changed_paths(result.stdout, root))
for relative_path, original_text in file_records:
display_path = relative_path.as_posix()
if write_changes:
formatted_text = read_utf8(root / relative_path)
if formatted_text is None:
errors.append(f"Cannot format {display_path}")
continue
normalized_text = normalize_output(formatted_text)
if formatted_text != normalized_text:
try:
(root / relative_path).write_bytes(normalized_text.encode("utf-8"))
except OSError:
errors.append(f"Cannot format {display_path}")
continue
if original_text != normalized_text:
changed_files.add(display_path)
elif original_text != normalize_output(original_text):
changed_files.add(display_path)
return sorted(changed_files), errors
def run_format(root: Path, filter_epoch: int, show_progress: bool) -> int:
changed_files, errors = format_directory(
root,
write_changes=True,
filter_epoch=filter_epoch,
show_progress=show_progress,
)
for error in errors:
stderr(error)
if errors and not changed_files:
return EXIT_ERROR
return EXIT_CHANGES if changed_files else EXIT_OK
def run_silent(root: Path, filter_epoch: int) -> int:
return run_format(root, filter_epoch, show_progress=False)
def run_check(root: Path, filter_epoch: int) -> int:
changed_files, errors = format_directory(root, write_changes=False, filter_epoch=filter_epoch)
for error in errors:
stderr(error)
if changed_files:
stderr("Nonconforming files:")
for path in changed_files:
stderr(path)
return EXIT_CHANGES
if errors:
return EXIT_ERROR
print("Formatting fully conforming!")
return EXIT_OK
def main(argv: list[str]) -> int:
root = get_git_root(Path.cwd())
if not argv:
try:
return run_format(root, 0, show_progress=True)
except FileNotFoundError as exc:
stderr(str(exc))
return EXIT_ERROR
except OSError as exc:
stderr(str(exc))
return EXIT_ERROR
filter_epoch, status = parse_filter_epoch(argv[1:])
if status != EXIT_OK:
return status
command = argv[0].lower()
try:
if command == "silent":
return run_silent(root, filter_epoch)
if command == "check":
return run_check(root, filter_epoch)
stderr(f"Invalid argument: {argv[0]}")
return usage()
except FileNotFoundError as exc:
stderr(str(exc))
return EXIT_ERROR
except OSError as exc:
stderr(str(exc))
return EXIT_ERROR
if __name__ == "__main__":
raise SystemExit(main(sys.argv[1:]))

View File

@ -1,5 +1,36 @@
# Hooks
# Formatter
This contains two binaries `AStyleHelper.exe` and `AStyle.dll` to format any code before you commit.
The main formatter integration for this repository is still the bundled Windows tool:
If you are unsure about the integrity of the files, don't hesitate to contact me (mrexodia). The source code is available [here](https://github.com/mrexodia/AStyleHelper). The version of `AStyle.dll` is compiled from `AStyle_2.06_windows.zip` which came from [Sourceforge](https://sourceforge.net/projects/astyle/files/astyle/astyle%202.06/AStyle_2.06_windows.zip/download).
- `AStyleHelper.exe` from https://github.com/mrexodia/AStyleHelper
- `AStyle.dll` from (`astyle-3.6.9\build\vs2022\AStyle Dll 2022.sln`)
These are used by the existing Windows workflows and helper scripts.
For Linux users, there is also a Python port at `.github/format/AStyleHelper.py`.
It uses [`uv` script metadata](https://docs.astral.sh/uv/guides/scripts/#declaring-script-dependencies) and the [`astyle` wheel](https://github.com/Freed-Wu/astyle-wheel).
## Windows usage
```bat
format.bat
```
Or directly:
```bat
.github\format\AStyleHelper.exe Silent
.github\format\AStyleHelper.exe Check
```
## Linux usage
```bash
uv run --script .github/format/AStyleHelper.py
uv run --script .github/format/AStyleHelper.py Silent
uv run --script .github/format/AStyleHelper.py Check
```
Running the script without `Silent` or `Check` formats the tree and prints each file as it is processed, so users get progress output.
The Python script keeps the old `Silent` / `Check` CLI so it can act as a compatible alternative on non-Windows systems. It formats the git repository containing the current working directory (falling back to the current directory if not in git), and skips files matched by git ignore rules via `git check-ignore --no-index`.

View File

@ -1,7 +1,20 @@
@echo off
git config core.autocrlf false
set PRE_COMMIT_HOOK=%~dp0..\..\.git\hooks\pre-commit
REM Get the git directory path (works for worktrees too)
for /f "delims=" %%i in ('git rev-parse --git-dir') do set GIT_DIR=%%i
REM Replace forward slashes with backslashes
set GIT_DIR=%GIT_DIR:/=\%
set PRE_COMMIT_HOOK=%GIT_DIR%\hooks\pre-commit
REM Create the hooks directory if it doesn't exist
if not exist "%GIT_DIR%\hooks" (
mkdir "%GIT_DIR%\hooks"
)
if not exist "%PRE_COMMIT_HOOK%" (
echo Installing pre-commit hook...
copy %~dp0pre-commit %PRE_COMMIT_HOOK%
)
copy "%~dp0pre-commit" "%PRE_COMMIT_HOOK%"
)

View File

@ -1,33 +1,48 @@
#!/bin/sh
#
# Simple script to auto-format every source file before committing.
#
#check if the formatter is present
if [ ! -f ./.github/format/AStyleHelper.exe ]; then
echo "AStyleHelper not found!"
exit 0
fi
#format the code
"./.github/format/AStyleHelper.exe" Silent
#exit when nothing needs to be done
if [ $? == 0 ]; then
exit 0
fi
#stage the formatted files (when staged in this commit)
gitFiles=$(git diff-index --name-only --cached HEAD)
if [[ -n "${gitFiles}" ]]; then
for fname in $gitFiles; do
git add --all -- "${fname}"
done
fi
#cancel commit if the changes were undone by the formatting
gitFiles=$(git diff-index --name-only --cached HEAD)
if [ -z "$gitFiles" ]; then
"./.github/AStyleHelper.exe" "After formatting, no files were staged..."
exit 1
fi
#!/bin/sh
#
# Simple script to auto-format every source file before committing.
#
# Check if the formatter is present
if [ ! -f .github/format/AStyleHelper.exe ]; then
echo "AStyleHelper not found!"
exit 0
fi
# Get stamp file epoch (default to 0)
STAMP_EPOCH=$(date -u -r .git/AStyleHelper.stamp +%s 2>/dev/null)
STAMP_EPOCH=${STAMP_EPOCH:-0}
# If the HEAD is newer than the stamp (we switched branches), set stamp to 0
if [ $(date -u -r .git/HEAD +%s 2>/dev/null) -gt $STAMP_EPOCH ]; then
echo "AStyleHelper: branch switched, performing full formatting"
STAMP_EPOCH=0
fi
# Format the code
".github/format/AStyleHelper.exe" Silent $STAMP_EPOCH
FORMAT_STATUS=$?
# Touch the stamp file to indicate when the last formatting was done
touch .git/AStyleHelper.stamp
# Exit when nothing needs to be done
if [ $FORMAT_STATUS -eq 0 ]; then
echo "AStyleHelper: no formatting needed"
exit 0
fi
# Stage the formatted files (when staged in this commit)
GIT_FILES=$(git diff-index --name-only --cached HEAD)
if [[ -n "$GIT_FILES" ]]; then
for GIT_FILE in $GIT_FILES; do
git add --all -- "$GIT_FILE"
done
fi
# Cancel commit if the changes were undone by the formatting
GIT_FILES=$(git diff-index --name-only --cached HEAD)
if [ -z "$GIT_FILES" ]; then
".github/format/AStyleHelper.exe" "After formatting, no files were staged..."
exit 1
fi

169
.github/workflows/build.yml vendored Normal file
View File

@ -0,0 +1,169 @@
name: Build
on: [push, pull_request]
# Automatically cancel previous runs of this workflow on the same branch
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
cmake:
# Skip building pull requests from the same repository
if: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository }}
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
arch: [x64, x86]
steps:
- name: Checkout
uses: actions/checkout@v6
with:
submodules: recursive
fetch-depth: 1
- name: Visual Studio Development Environment
uses: TheMrMilchmann/setup-msvc-dev@79dac248aac9d0059f86eae9d8b5bfab4e95e97c # v4.0.0
with:
arch: ${{ matrix.arch }}
- name: Build
run: |
cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_UNITY_BUILD=ON -DCMAKE_UNITY_BUILD_BATCH_SIZE=6 -DX64DBG_RELEASE=${{ startsWith(github.ref, 'refs/tags/') && 'ON' || 'OFF' }}
cmake --build build
- name: Upload Build Artifacts
uses: actions/upload-artifact@v7
with:
name: build-${{ matrix.arch }}
path: bin
if-no-files-found: error
include-hidden-files: true
retention-days: 1
docs:
# Skip building pull requests from the same repository
if: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository }}
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v6
with:
fetch-depth: 1
- name: Build Documentation
run: |
docs\makechm.bat
- name: Upload Documentation
uses: actions/upload-artifact@v7
with:
name: docs
path: docs/x64dbg.chm
if-no-files-found: error
include-hidden-files: true
retention-days: 1
test:
needs: cmake
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
arch: [x64, x86]
engine: [TitanEngine, GleeBug]
steps:
- name: Checkout
uses: actions/checkout@v6
with:
fetch-depth: 1
- name: Download Build Artifacts
uses: actions/download-artifact@v8
with:
name: build-${{ matrix.arch }}
path: bin
- name: Run Tests
shell: pwsh
run: |
py src/tests/run.py --arch ${{ matrix.arch }} --engine ${{ matrix.engine }} --artifacts-dir "test-artifacts/${{ matrix.arch }}-${{ matrix.engine }}"
- name: Upload Test Artifacts
if: failure()
uses: actions/upload-artifact@v7
with:
name: test-artifacts-${{ matrix.arch }}-${{ matrix.engine }}
path: test-artifacts/${{ matrix.arch }}-${{ matrix.engine }}
if-no-files-found: warn
include-hidden-files: true
retention-days: 7
package:
needs: [cmake, docs]
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v6
with:
fetch-depth: 1
- name: Download x64 Artifacts
uses: actions/download-artifact@v8
with:
name: build-x64
path: bin
- name: Download x86 Artifacts
uses: actions/download-artifact@v8
with:
name: build-x86
path: bin
- name: Download Documentation
uses: actions/download-artifact@v8
with:
name: docs
path: docs
- name: Prepare Release
run: |
curl.exe -L https://github.com/x64dbg/translations/releases/download/translations/qm.zip -o bin\qm.zip
7z x bin\qm.zip -obin
cmake -P .\cmake\release.cmake
$timestamp = Get-Date (Get-Date).ToUniversalTime() -Format "yyyy-MM-dd_HH-mm"
echo "timestamp=$timestamp" >> $env:GITHUB_ENV
- name: Upload Snapshot
uses: actions/upload-artifact@v7
with:
name: snapshot_${{ env.timestamp }}
path: |
release/pluginsdk
release/release
release/commithash.txt
if-no-files-found: error
include-hidden-files: true
compression-level: 9
- name: Upload Symbols
uses: actions/upload-artifact@v7
with:
name: symbols-snapshot_${{ env.timestamp }}
path: |
release/pdb
release/commithash.txt
if-no-files-found: error
include-hidden-files: true
compression-level: 9
- name: Upload Plugin SDK
uses: actions/upload-artifact@v7
with:
name: x64dbg-pluginsdk
path: |
release/pluginsdk
if-no-files-found: error
include-hidden-files: true
compression-level: 9

68
.github/workflows/cross.yml vendored Normal file
View File

@ -0,0 +1,68 @@
name: Cross
on: [push, pull_request]
# Automatically cancel previous runs of this workflow on the same branch
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
cmake:
# Skip building pull requests from the same repository
if: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository }}
strategy:
fail-fast: false
matrix:
platform: [windows-latest, ubuntu-latest]
runs-on: ${{ matrix.platform }}
steps:
- name: Checkout
uses: actions/checkout@v6
with:
submodules: recursive
fetch-depth: 1
- name: Visual Studio Development Environment
if: ${{ matrix.platform == 'windows-latest' }}
uses: TheMrMilchmann/setup-msvc-dev@79dac248aac9d0059f86eae9d8b5bfab4e95e97c # v4.0.0
with:
arch: x64
- name: Install Qt
uses: jurplel/install-qt-action@48d3ad6db93f3627c8ee7a0454bc6f3744f7e730 # v4.3.1
with:
cache: true
modules: qtwebsockets
- name: Build
run: |
cd src/cross
cmake -B build -G Ninja -DCMAKE_UNITY_BUILD=ON
cmake --build build
appimage:
# Skip building pull requests from the same repository
if: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository }}
runs-on: ubuntu-latest
container:
image: ghcr.io/x64dbg/x64dbg/qt5-appimage
steps:
- name: Checkout
uses: actions/checkout@v6
with:
submodules: recursive
fetch-depth: 1
- name: Build AppImage
run: |
src/cross/debugger/build-appimage.sh
- name: Upload AppImage
uses: actions/upload-artifact@v7
with:
name: x64dbg-appimage
path: src/cross/build-linux/x64dbg.AppImage
if-no-files-found: error
include-hidden-files: true
retention-days: 1

41
.github/workflows/format.yml vendored Normal file
View File

@ -0,0 +1,41 @@
name: Format
on:
push:
pull_request:
jobs:
format:
# Skip checking pull requests from the same repository
if: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository }}
runs-on: windows-latest
defaults:
run:
shell: bash
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Run Formatter
run: .github/format/AStyleHelper.exe Silent || true
- name: Check for Changes
id: check_changes
run: |
git diff --exit-code
continue-on-error: true
- name: Report Failure
if: steps.check_changes.outcome == 'failure'
run: |
echo "::error::Code is not formatted correctly! Please run 'format.bat' locally and commit the changes."
git diff --color
git diff > format.patch
exit 1
- name: Upload Patch
if: failure()
uses: actions/upload-artifact@v7
with:
name: format-patch
path: format.patch

12
.gitignore vendored
View File

@ -4,6 +4,9 @@
/bin/*.dll
/bin/*.ini
/bin/*.chm
/bin/*.zip
/bin/release-notes.md
!/bin/themes/
/src/**/x64/
/src/**/Win32/
/src/gui_build/
@ -25,7 +28,16 @@ cmake-build*/
*.pro.user*
*.orig
*.pdb
*.ilk
.DS_Store
Makefile
Makefile.*
CMakeLists.txt.user
/.cache
CMakeUserPresets.json
# Python
__pycache__/
*.pyc
*.egg-info/

20
.gitmodules vendored
View File

@ -1,7 +1,13 @@
[submodule "src/dbg/btparser"]
path = src/dbg/btparser
url = ../btparser
[submodule "deps"]
path = deps
url = ../deps
shallow = true
[submodule "src/dbg/btparser"]
path = src/dbg/btparser
url = ../../x64dbg/btparser
[submodule "deps"]
path = deps
url = ../../x64dbg/deps
shallow = true
[submodule "src/third_party/TitanEngine"]
path = src/third_party/TitanEngine
url = ../../x64dbg/TitanEngine
[submodule "src/third_party/GleeBug"]
path = src/third_party/GleeBug
url = ../../x64dbg/GleeBug

385
CMakeLists.txt generated
View File

@ -7,6 +7,9 @@ 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()
# Enable support for MSVC_RUNTIME_LIBRARY
cmake_policy(SET CMP0091 NEW)
set(CMKR_ROOT_PROJECT OFF)
if(CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR)
set(CMKR_ROOT_PROJECT ON)
@ -22,11 +25,25 @@ if(CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR)
# Create a configure-time dependency on cmake.toml to improve IDE support
set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS cmake.toml)
if(NOT DEFINED CMAKE_MSVC_RUNTIME_LIBRARY)
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>DLL")
endif()
endif()
# Options
option(X64DBG_BUILD_IN_TREE "" ON)
option(X64DBG_RELEASE "" OFF)
# Variables
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
include("cmake/VSToolchain.cmake")
project(x64dbg
LANGUAGES
C
CXX
DESCRIPTION
"An open-source x64/x32 debugger for windows."
)
@ -37,36 +54,48 @@ include("cmake/VSFlags.cmake")
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"
)
# Subdirectory: src/zydis_wrapper
set(CMKR_CMAKE_FOLDER ${CMAKE_FOLDER})
if(CMAKE_FOLDER)
set(CMAKE_FOLDER "${CMAKE_FOLDER}/src/zydis_wrapper")
else()
set(CMAKE_FOLDER "src/zydis_wrapper")
endif()
add_subdirectory("src/zydis_wrapper")
set(CMAKE_FOLDER ${CMKR_CMAKE_FOLDER})
add_library(zydis_wrapper STATIC)
# Subdirectory: src/gui/Src/ThirdPartyLibs/md4c
set(CMKR_CMAKE_FOLDER ${CMAKE_FOLDER})
if(CMAKE_FOLDER)
set(CMAKE_FOLDER "${CMAKE_FOLDER}/src/gui/Src/ThirdPartyLibs/md4c")
else()
set(CMAKE_FOLDER "src/gui/Src/ThirdPartyLibs/md4c")
endif()
add_subdirectory("src/gui/Src/ThirdPartyLibs/md4c")
set(CMAKE_FOLDER ${CMKR_CMAKE_FOLDER})
target_sources(zydis_wrapper PRIVATE ${zydis_wrapper_SOURCES})
source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} FILES ${zydis_wrapper_SOURCES})
# Subdirectory: src/third_party
set(CMKR_CMAKE_FOLDER ${CMAKE_FOLDER})
if(CMAKE_FOLDER)
set(CMAKE_FOLDER "${CMAKE_FOLDER}/src/third_party")
else()
set(CMAKE_FOLDER "src/third_party")
endif()
add_subdirectory("src/third_party")
set(CMAKE_FOLDER ${CMKR_CMAKE_FOLDER})
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"
)
# Subdirectory: src/tests
set(CMKR_CMAKE_FOLDER ${CMAKE_FOLDER})
if(CMAKE_FOLDER)
set(CMAKE_FOLDER "${CMAKE_FOLDER}/src/tests")
else()
set(CMAKE_FOLDER "src/tests")
endif()
add_subdirectory("src/tests")
set(CMAKE_FOLDER ${CMKR_CMAKE_FOLDER})
# Target: bridge
set(bridge_SOURCES
@ -79,6 +108,7 @@ set(bridge_SOURCES
"src/bridge/bridgemain.cpp"
"src/bridge/bridgemain.h"
"src/bridge/bridgemain_checker.c"
"src/bridge/startupargs.h"
)
add_library(bridge SHARED)
@ -107,13 +137,11 @@ 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"
)
@ -123,6 +151,12 @@ add_library(btparser STATIC)
target_sources(btparser PRIVATE ${btparser_SOURCES})
source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} FILES ${btparser_SOURCES})
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR CMAKE_C_COMPILER_ID MATCHES "Clang") # clang-any
target_compile_options(btparser PUBLIC
-Wno-self-assign-field
)
endif()
target_include_directories(btparser PUBLIC
"src/dbg/btparser"
)
@ -209,6 +243,7 @@ set(dbg_SOURCES
"src/dbg/analysis/xrefsanalysis.h"
"src/dbg/animate.cpp"
"src/dbg/animate.h"
"src/dbg/args.h"
"src/dbg/argument.cpp"
"src/dbg/argument.h"
"src/dbg/assemble.cpp"
@ -311,6 +346,7 @@ set(dbg_SOURCES
"src/dbg/jansson/jansson_x64dbg.h"
"src/dbg/jit.cpp"
"src/dbg/jit.h"
"src/dbg/jobqueue.h"
"src/dbg/label.cpp"
"src/dbg/label.h"
"src/dbg/loop.cpp"
@ -365,6 +401,8 @@ set(dbg_SOURCES
"src/dbg/taskthread.h"
"src/dbg/tcpconnections.cpp"
"src/dbg/tcpconnections.h"
"src/dbg/testing.cpp"
"src/dbg/testing.h"
"src/dbg/thread.cpp"
"src/dbg/thread.h"
"src/dbg/threading.cpp"
@ -372,6 +410,8 @@ set(dbg_SOURCES
"src/dbg/types.cpp"
"src/dbg/types.h"
"src/dbg/typesparser.cpp"
"src/dbg/typevisitor.cpp"
"src/dbg/typevisitor.h"
"src/dbg/value.cpp"
"src/dbg/value.h"
"src/dbg/variable.cpp"
@ -391,6 +431,7 @@ source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} FILES ${dbg_SOURCES})
target_compile_definitions(dbg PRIVATE
BUILD_DBG
NOMINMAX
)
target_include_directories(dbg PRIVATE
@ -399,6 +440,24 @@ target_include_directories(dbg PRIVATE
"src/dbg/commands"
)
if(MSVC) # msvc
target_link_libraries(dbg PUBLIC
Delayimp
)
endif()
if(NOT TARGET zydis_wrapper)
message(FATAL_ERROR "Target \"zydis_wrapper\" referenced by \"dbg\" does not exist!")
endif()
if(NOT TARGET bridge)
message(FATAL_ERROR "Target \"bridge\" referenced by \"dbg\" does not exist!")
endif()
if(NOT TARGET btparser)
message(FATAL_ERROR "Target \"btparser\" referenced by \"dbg\" does not exist!")
endif()
target_link_libraries(dbg PRIVATE
zydis_wrapper
bridge
@ -407,6 +466,7 @@ target_link_libraries(dbg PRIVATE
Shlwapi
Ws2_32
Wininet
Iphlpapi
)
if(CMAKE_SIZEOF_VOID_P EQUAL 4) # x86
@ -435,6 +495,12 @@ if(CMAKE_SIZEOF_VOID_P EQUAL 8) # x64
)
endif()
if(MSVC) # msvc
target_link_options(dbg PUBLIC
"/DELAYLOAD:TitanEngine.dll"
)
endif()
if(CMAKE_SIZEOF_VOID_P EQUAL 4) # x86
set_target_properties(dbg PROPERTIES
OUTPUT_NAME
@ -452,6 +518,24 @@ endif()
# Target: gui
set(gui_SOURCES
cmake.toml
"src/gui/Src/Accessible/Accessible.cpp"
"src/gui/Src/Accessible/Accessible.h"
"src/gui/Src/Accessible/AccessibleAbstractTableView.cpp"
"src/gui/Src/Accessible/AccessibleAbstractTableView.h"
"src/gui/Src/Accessible/AccessibleAbstractTableViewCell.cpp"
"src/gui/Src/Accessible/AccessibleAbstractTableViewCell.h"
"src/gui/Src/Accessible/AccessibleAbstractTableViewCellTitle.cpp"
"src/gui/Src/Accessible/AccessibleAbstractTableViewCellTitle.h"
"src/gui/Src/Accessible/AccessibleDisassembly.cpp"
"src/gui/Src/Accessible/AccessibleDisassembly.h"
"src/gui/Src/Accessible/AccessibleHexDump.cpp"
"src/gui/Src/Accessible/AccessibleHexDump.h"
"src/gui/Src/Accessible/AccessibleRegistersView.cpp"
"src/gui/Src/Accessible/AccessibleRegistersView.h"
"src/gui/Src/Accessible/AccessibleStdTable.cpp"
"src/gui/Src/Accessible/AccessibleStdTable.h"
"src/gui/Src/Accessible/AccessibleTraceBrowser.cpp"
"src/gui/Src/Accessible/AccessibleTraceBrowser.h"
"src/gui/Src/BasicView/AbstractSearchList.h"
"src/gui/Src/BasicView/AbstractStdTable.cpp"
"src/gui/Src/BasicView/AbstractStdTable.h"
@ -560,6 +644,9 @@ set(gui_SOURCES
"src/gui/Src/Gui/DisassemblerGraphView.h"
"src/gui/Src/Gui/DisassemblyPopup.cpp"
"src/gui/Src/Gui/DisassemblyPopup.h"
"src/gui/Src/Gui/DisplayTypeDialog.cpp"
"src/gui/Src/Gui/DisplayTypeDialog.h"
"src/gui/Src/Gui/DisplayTypeDialog.ui"
"src/gui/Src/Gui/EditBreakpointDialog.cpp"
"src/gui/Src/Gui/EditBreakpointDialog.h"
"src/gui/Src/Gui/EditBreakpointDialog.ui"
@ -584,6 +671,8 @@ set(gui_SOURCES
"src/gui/Src/Gui/HexLineEdit.cpp"
"src/gui/Src/Gui/HexLineEdit.h"
"src/gui/Src/Gui/HexLineEdit.ui"
"src/gui/Src/Gui/ImageTextBrowser.cpp"
"src/gui/Src/Gui/ImageTextBrowser.h"
"src/gui/Src/Gui/LineEditDialog.cpp"
"src/gui/Src/Gui/LineEditDialog.h"
"src/gui/Src/Gui/LineEditDialog.ui"
@ -620,6 +709,9 @@ set(gui_SOURCES
"src/gui/Src/Gui/ReferenceManager.h"
"src/gui/Src/Gui/RegistersView.cpp"
"src/gui/Src/Gui/RegistersView.h"
"src/gui/Src/Gui/ReleaseNotesDialog.cpp"
"src/gui/Src/Gui/ReleaseNotesDialog.h"
"src/gui/Src/Gui/ReleaseNotesDialog.ui"
"src/gui/Src/Gui/RichTextItemDelegate.cpp"
"src/gui/Src/Gui/RichTextItemDelegate.h"
"src/gui/Src/Gui/SEHChainView.cpp"
@ -644,7 +736,6 @@ set(gui_SOURCES
"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"
@ -659,6 +750,8 @@ set(gui_SOURCES
"src/gui/Src/Gui/ThreadView.h"
"src/gui/Src/Gui/TimeWastedCounter.cpp"
"src/gui/Src/Gui/TimeWastedCounter.h"
"src/gui/Src/Gui/TypeWidget.cpp"
"src/gui/Src/Gui/TypeWidget.h"
"src/gui/Src/Gui/VirtualModDialog.cpp"
"src/gui/Src/Gui/VirtualModDialog.h"
"src/gui/Src/Gui/VirtualModDialog.ui"
@ -685,6 +778,9 @@ set(gui_SOURCES
"src/gui/Src/QHexEdit/XByteArray.cpp"
"src/gui/Src/QHexEdit/XByteArray.h"
"src/gui/Src/ThirdPartyLibs/ldconvert/ldconvert.h"
"src/gui/Src/ThirdPartyLibs/md4c/md4c-entity.h"
"src/gui/Src/ThirdPartyLibs/md4c/md4c-html.h"
"src/gui/Src/ThirdPartyLibs/md4c/md4c.h"
"src/gui/Src/Tracer/TraceBrowser.cpp"
"src/gui/Src/Tracer/TraceBrowser.h"
"src/gui/Src/Tracer/TraceDump.cpp"
@ -760,9 +856,16 @@ add_library(gui SHARED)
target_sources(gui PRIVATE ${gui_SOURCES})
source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} FILES ${gui_SOURCES})
if(X64DBG_RELEASE) # X64DBG_RELEASE
target_compile_definitions(gui PUBLIC
X64DBG_RELEASE
)
endif()
target_compile_definitions(gui PRIVATE
BUILD_LIB
NOMINMAX
X64DBG
)
target_include_directories(gui PRIVATE
@ -778,13 +881,27 @@ target_include_directories(gui PRIVATE
"src/gui/Src/ThirdPartyLibs/ldconvert"
)
if(NOT TARGET zydis_wrapper)
message(FATAL_ERROR "Target \"zydis_wrapper\" referenced by \"gui\" does not exist!")
endif()
if(NOT TARGET bridge)
message(FATAL_ERROR "Target \"bridge\" referenced by \"gui\" does not exist!")
endif()
if(NOT TARGET md4c-html)
message(FATAL_ERROR "Target \"md4c-html\" referenced by \"gui\" does not exist!")
endif()
target_link_libraries(gui PRIVATE
Qt5::Widgets
Qt5::Network
Qt5::WinExtras
zydis_wrapper
bridge
md4c-html
winmm
wininet
dwmapi
)
if(CMAKE_SIZEOF_VOID_P EQUAL 4) # x86
@ -825,6 +942,113 @@ set_target_properties(gui PROPERTIES
set(CMKR_TARGET gui)
include("cmake/deps.cmake")
# 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_utf8.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})
if(NOT TARGET bridge)
message(FATAL_ERROR "Target \"bridge\" referenced by \"exe\" does not exist!")
endif()
target_link_libraries(exe PRIVATE
bridge
Wintrust
)
if(MSVC) # msvc
target_link_libraries(exe PRIVATE
Delayimp
)
endif()
if(MSVC) # msvc
target_link_options(exe PRIVATE
"/DELAYLOAD:user32.dll"
"/DELAYLOAD:wintrust.dll"
"/DELAYLOAD:$<TARGET_FILE_NAME:bridge>"
"/NOIMPLIB"
"/NOEXP"
"/LARGEADDRESSAWARE"
)
endif()
if(CMAKE_SIZEOF_VOID_P EQUAL 4) # x86
add_dependencies(exe
launcher
)
endif()
add_dependencies(exe
dbg
gui
loaddll
deps
)
set_target_properties(exe PROPERTIES
MSVC_RUNTIME_LIBRARY
"MultiThreaded$<$<CONFIG:Debug>:Debug>"
WIN32_EXECUTABLE
ON
)
if(CMAKE_SIZEOF_VOID_P EQUAL 4) # x86
set_target_properties(exe PROPERTIES
OUTPUT_NAME
x32dbg
ARCHIVE_OUTPUT_NAME
x32dbg_exe
PDB_NAME
x32dbg_exe
)
endif()
if(CMAKE_SIZEOF_VOID_P EQUAL 8) # x64
set_target_properties(exe PROPERTIES
OUTPUT_NAME
x64dbg
ARCHIVE_OUTPUT_NAME
x64dbg_exe
PDB_NAME
x64dbg_exe
)
endif()
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: loaddll
set(loaddll_SOURCES
cmake.toml
@ -848,7 +1072,21 @@ if(CMAKE_SIZEOF_VOID_P EQUAL 8) # x64
)
endif()
if(MSVC) # msvc
target_link_libraries(loaddll PRIVATE
Delayimp
)
endif()
if(MSVC) # msvc
target_link_options(loaddll PRIVATE
"/DELAYLOAD:user32.dll"
)
endif()
set_target_properties(loaddll PROPERTIES
MSVC_RUNTIME_LIBRARY
"MultiThreaded$<$<CONFIG:Debug>:Debug>"
WIN32_EXECUTABLE
ON
)
@ -858,91 +1096,51 @@ if(NOT CMKR_VS_STARTUP_PROJECT)
set_property(DIRECTORY ${PROJECT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT loaddll)
endif()
# Target: exe
set(exe_SOURCES
# Target: headless
set(headless_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"
"src/headless/headless.cpp"
"src/headless/signaturecheck.cpp"
"src/headless/stringutils.cpp"
"src/headless/stringutils.h"
"src/headless/tostring.h"
)
if(CMAKE_SIZEOF_VOID_P EQUAL 4) # x86
list(APPEND exe_SOURCES
"src/exe/icon32.rc"
)
add_executable(headless)
target_sources(headless PRIVATE ${headless_SOURCES})
source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} FILES ${headless_SOURCES})
if(NOT TARGET bridge)
message(FATAL_ERROR "Target \"bridge\" referenced by \"headless\" does not exist!")
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
target_link_libraries(headless PRIVATE
bridge
Wintrust
)
if(MSVC) # msvc
target_link_options(exe PRIVATE
"/DEF:${CMAKE_SOURCE_DIR}/src/exe/signaturecheck.def"
"/INCREMENTAL:NO"
target_link_options(headless PRIVATE
"/LARGEADDRESSAWARE"
)
endif()
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
add_dependencies(headless
exe
)
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)
set_property(DIRECTORY ${PROJECT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT headless)
endif()
set(CMKR_TARGET exe)
# Make the executable the main target
add_dependencies(exe dbg gui deps)
# 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/exe/strings_utf8.rc"
"src/launcher/x64dbg_launcher.cpp"
)
@ -957,12 +1155,21 @@ if(CMAKE_SIZEOF_VOID_P EQUAL 4) # x86
)
set_target_properties(launcher PROPERTIES
MSVC_RUNTIME_LIBRARY
"MultiThreaded$<$<CONFIG:Debug>:Debug>"
OUTPUT_NAME
x96dbg
WIN32_EXECUTABLE
ON
)
if(X64DBG_BUILD_IN_TREE) # X64DBG_BUILD_IN_TREE
set_target_properties(launcher PROPERTIES
RUNTIME_OUTPUT_DIRECTORY
"${PROJECT_SOURCE_DIR}/bin"
)
endif()
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)

50
CMakeSettings.json Normal file
View File

@ -0,0 +1,50 @@
{
"configurations": [
{
"name": "x64-Release",
"generator": "Ninja",
"configurationType": "RelWithDebInfo",
"buildRoot": "${projectDir}\\out\\build\\${name}",
"installRoot": "${projectDir}\\out\\install\\${name}",
"cmakeCommandArgs": "",
"buildCommandArgs": "",
"ctestCommandArgs": "",
"inheritEnvironments": [ "msvc_x64_x64" ]
},
{
"name": "x86-Release",
"generator": "Ninja",
"configurationType": "RelWithDebInfo",
"buildRoot": "${projectDir}\\out\\build\\${name}",
"installRoot": "${projectDir}\\out\\install\\${name}",
"cmakeCommandArgs": "",
"buildCommandArgs": "",
"ctestCommandArgs": "",
"inheritEnvironments": [ "msvc_x86" ],
"variables": []
},
{
"name": "x64-Debug",
"generator": "Ninja",
"configurationType": "Debug",
"inheritEnvironments": [ "msvc_x64_x64" ],
"buildRoot": "${projectDir}\\out\\build\\${name}",
"installRoot": "${projectDir}\\out\\install\\${name}",
"cmakeCommandArgs": "",
"buildCommandArgs": "",
"ctestCommandArgs": ""
},
{
"name": "x86-Debug",
"generator": "Ninja",
"configurationType": "Debug",
"buildRoot": "${projectDir}\\out\\build\\${name}",
"installRoot": "${projectDir}\\out\\install\\${name}",
"cmakeCommandArgs": "",
"buildCommandArgs": "",
"ctestCommandArgs": "",
"inheritEnvironments": [ "msvc_x86" ],
"variables": []
}
]
}

View File

@ -2,9 +2,9 @@
<img width="100" src="https://github.com/x64dbg/x64dbg/raw/development/src/bug_black.png"/>
[![Build status](https://ci.appveyor.com/api/projects/status/h1j489qa1mx67e0h?svg=true)](https://ci.appveyor.com/project/mrexodia/x64dbg) [![Crowdin](https://d322cqt584bo4o.cloudfront.net/x64dbg/localized.svg)](https://translate.x64dbg.com) [![Download x64dbg](https://img.shields.io/sourceforge/dm/x64dbg.svg)](https://sourceforge.net/projects/x64dbg/files/latest/download)
[![Crowdin](https://d322cqt584bo4o.cloudfront.net/x64dbg/localized.svg)](https://translate.x64dbg.com) [![Download x64dbg](https://img.shields.io/sourceforge/dm/x64dbg.svg)](https://sourceforge.net/projects/x64dbg/files/latest/download) [![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/x64dbg/x64dbg)
[![Discord](https://img.shields.io/badge/chat-on%20Discord-green.svg)](https://invite.gg/x64dbg) [![Telegram](https://img.shields.io/badge/chat-%20on%20Telegram-blue.svg)](https://telegram.me/x64dbg) [![Gitter](https://img.shields.io/badge/chat-on%20Gitter-lightseagreen.svg)](https://gitter.im/x64dbg/x64dbg) [![Matrix](https://img.shields.io/badge/chat-on%20Matrix-yellowgreen.svg)](https://riot.im/app/#/room/#x64dbg:matrix.org)
[![Discord](https://img.shields.io/badge/chat-on%20Discord-green.svg)](https://discord.x64dbg.com) [![Slack](https://img.shields.io/badge/chat-on%20Slack-red.svg)](https://slack.x64dbg.com) [![Gitter](https://img.shields.io/badge/chat-on%20Gitter-lightseagreen.svg)](https://gitter.im/x64dbg/x64dbg) [![Matrix](https://img.shields.io/badge/chat-on%20Matrix-yellowgreen.svg)](https://riot.im/app/#/room/#x64dbg:matrix.org) [![IRC](https://img.shields.io/badge/chat-on%20IRC-purple.svg)](https://web.libera.chat/#x64dbg)
An open-source binary debugger for Windows, aimed at malware analysis and reverse engineering of executables you do not have the source code for. There are many features available and a comprehensive [plugin system](https://plugins.x64dbg.com) to add your own. You can find more information on the [blog](https://x64dbg.com/blog)!
@ -19,7 +19,7 @@ An open-source binary debugger for Windows, aimed at malware analysis and revers
## Installation & Usage
1. Download a snapshot from [GitHub](https://github.com/x64dbg/x64dbg/releases), [SourceForge](https://sourceforge.net/projects/x64dbg/files/snapshots) or [OSDN](https://osdn.net/projects/x64dbg) and extract it in a location your user has write access to.
1. Download a snapshot from [GitHub](https://github.com/x64dbg/x64dbg/releases) or [SourceForge](https://sourceforge.net/projects/x64dbg/files/snapshots) and extract it in a location your user has write access to.
2. _Optionally_ use `x96dbg.exe` to register a shell extension and add shortcuts to your desktop.
3. You can now run `x32\x32dbg.exe` if you want to debug a 32-bit executable or `x64\x64dbg.exe` to debug a 64-bit executable! If you are unsure you can always run `x96dbg.exe` and choose your architecture there.
@ -27,12 +27,20 @@ You can also [compile](https://github.com/x64dbg/x64dbg/wiki/Compiling-the-whole
## Sponsors
[![](.github/sponsors/malcore.png)](https://sponsors.x64dbg.com/malcore)
<div align="center" markdown="1">
<a href="https://sponsors.x64dbg.com/warp" target="_blank">
<img alt="Warp sponsorship" width="400" src="https://raw.githubusercontent.com/warpdotdev/brand-assets/main/Github/Sponsor/Warp-Github-LG-02.png">
</a>
[**Warp, built for coding with multiple AI agents**](https://sponsors.x64dbg.com/warp)
<br>
[![](.github/sponsors/telekom.svg)](https://sponsors.x64dbg.com/telekom)
</div>
## Contributing
This is a community effort and we accept pull requests! See the [CONTRIBUTING](.github/CONTRIBUTING.md) document for more information. If you have any questions you can always [contact us](https://x64dbg.com/#contact) or open an [issue](https://github.com/x64dbg/x64dbg/issues). You can take a look at the [good first issues](https://easy.x64dbg.com/) to get started.
@ -93,3 +101,66 @@ You can find an exhaustive list of GitHub contributors [here](https://github.com
- [JustMagic](https://github.com/JustasMasiulis)
Without the help of many people and other open-source projects, it would not have been possible to make x64dbg what it is today, thank you!
## Historical Donors
Before fully transitioning to [GitHub Sponsors](https://github.com/sponsors/mrexodia), this project received donations through BountySource. The original donation terms included an optional website link for donors who requested one at the time of donation. Links marked below reflect those requests. BountySource has since been shut down, so these records are reconstructed by hand. If you donated during this period and your username/amount is missing or incorrect, please reach out.
|Username|Amount|Date||Username|Amount|Date|
|-|-|-|-|-|-|-|
|sghctoma|$50|2015-04-19||dfrunza|$20|2017-01-30|
|overflow|$50|2015-04-25||ham3di|$100|2017-02-01|
|jl2id|$15|2015-04-29||johnny5|$5|2017-02-19|
|cypherpunk|$50|2015-05-02||David-Reguera-Garcia-Dreg|$90|2017-02-26|
|Aciid|$50|2015-05-05||[Alexandro Sanchez Bach](https://phi.nz)|-|2017-03-02|
|PI32|$15|2015-05-09||(unknown)|$6|2017-03-11|
|darkvapeur|$8|2015-05-21||fred26|$50|2017-04-08|
|fearless|$5|2015-05-24||gatesbillou|$20|2017-04-15|
|0x90|$10|2015-05-31||David-Reguera-Garcia-Dreg|$10|2017-04-24|
|acidflash|$50|2015-06-03||Adir|$20|2017-05-03|
|VackerSimon|$10|2015-06-14||ferbeb|$10|2017-05-17|
|Artic|$10|2015-06-29||(unknown)|$16|2017-06-04|
|[crystalidea](https://www.crystalidea.com/uninstall-tool)|$24|2015-07-10||androsa|$20|2017-06-11|
|jl2id|$10|2015-08-13||robersor|$25|2017-07-05|
|[PELock](https://pelock.com)|$115|2015-08-26||DDSTrainers|$10|2017-07-15|
|[tslater2006](https://github.com/tslater2006)|$20|2015-09-04||blaquee|$20|2017-08-27|
|Exidous|$20|2015-09-04||SmilingWolf|$15|2017-09-26|
|lupier|$40|2015-09-08||Alexander H.|$150|2017-10-11|
|Stef|$10|2015-09-15||gatesbillou|$25|2017-10-14|
|[d3v1l401](https://d3vsite.org)|$5|2015-10-06||t4rmo|$5|2017-10-18|
|Artur|$20|2015-10-24||joelcornu|$5|2017-10-27|
|RoBa|$100|2015-11-18||Adir|$35|2017-11-02|
|mr.tuna7331|-|2015-12-15||(unknown)|$10|2017-11-11|
|lupier|$90|2016-01-12||xdeng|$10|2018-01-04|
|fvrmatteo|$10|2016-01-21||v-p-b|$50|2018-03-21|
|willi.neu9|$10|2016-01-30||EmptyBrain|$50|2018-03-30|
|rithien|$100|2016-02-19||[mentebinaria](https://www.mentebinaria.com.br/)|$19|2018-04-12|
|ey|$20|2016-02-26||Mauro Bollini|$50|2018-06-07|
|clockwork|$10|2016-03-06||gatesbillou|$15|2018-06-17|
|codespy|$5|2016-03-23||Kirbiflint|$3|2018-06-22|
|test|$100|2016-03-28||Chisato Rokumiya|$20|2018-09-20|
|RomanGol|$10|2016-03-28||pengchang|$100|2018-10-24|
|fearless|$10|2016-04-24||younsunmin|$5|2018-11-18|
|Jack|$5|2016-05-17||EmptyBrain|$50|2018-12-27|
|willi.neu9|$30|2016-05-26||Yim|$10|2019-01-13|
|gatesbillou|$20|2016-06-02||[OALabs](https://www.youtube.com/c/OALabs)|-|2019-01-27|
|AGI|$155|2016-06-16||Lixinist|$10|2019-04-15|
|lupier|$100|2016-06-24||bloodmc|$50|2019-04-29|
|0x90|$50|2016-07-19||(unknown)|$20|2019-05-24|
|tr4nc3|$15|2016-07-31||masacate|$10|2019-07-10|
|MikeGuidry|$2500|2016-07-31||User Manuals|$5|2020-01-20|
|Alexander H.|$150|2016-09-09||Jim Conyngham|$50|2020-03-23|
|darkvapeur|$10|2016-10-04||Danya|$5|2020-06-08|
|h907308901|$5|2016-10-06||RooT|$160|2020-07-22|
|Adir|$20|2016-10-24||jadakiss9018|$2|2020-09-11|
|NicoG|$100|2016-10-27||samsonpianofingers|$15|2020-09-14|
|Angie|$150|2016-11-03||tpericin|$1337|2020-10-09|
|hulucc|$20|2016-12-02||nikkej|$100|2020-10-22|
|napcode|$10|2016-12-05||kha1ifaa|$10|2021-01-04|
|TechLord|-|2016-12-26||rikaardhosein|$20|2021-09-08|
|ayylmao5|$5|2017-01-01||Lukas21|$50|2021-09-15|
|affelwafro|$10|2017-01-03||Flavio Nardiello|$30|2021-12-01|
|FS|$40|2017-01-15||stevemk14ebr|$1000|2021-12-03|
|EmptyBrain|$50|2017-01-27||[ethical.blue](https://ethical.blue)|$19|2022-05-14|
_To all our early supporters: thank you for believing in this project before it became what it is today!_

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

@ -6,10 +6,6 @@ ShortcutEdit[error="true"] {
color: #EF5350;
}
QTabWidget::pane {
border: 0px;
}
QTabBar::tear {
width: 0px;
border: none;
@ -323,7 +319,7 @@ QAbstractItemView QLineEdit {
}
QGroupBox {
border: 1px solid #212121;
border: 1px solid #515151;
border-radius: 2px;
margin-top: 20px;
}
@ -469,19 +465,11 @@ QTextEdit {
QPlainTextEdit {
background-color: #313131;
;
color: #e0e0e0;
border-radius: 2px;
border: 1px solid #212121;
}
QHeaderView::section {
background-color: #2a2b2f;
color: #e0e0e0;
padding: 5px;
border: 1px solid #212121;
}
QSizeGrip {
image: url(./rc/sizegrip.png);
width: 12px;
@ -958,10 +946,6 @@ QToolButton:pressed {
border: 1px solid #414141;
}
QHeaderView {
border-radius: 0px;
}
QListView::item:pressed,
QTreeView::item:pressed {
background: #414141;
@ -978,6 +962,7 @@ QHeaderView {
background-color: #212121;
margin: 0px;
padding: 0px;
border-radius: 0px;
}
QHeaderView::section {
@ -1019,10 +1004,6 @@ QHeaderView::up-arrow {
image: url(./rc/up_arrow.png);
}
QStatusBar::item {
border: none;
}
QSplitter::handle {
background-color: #515151;
}
@ -1070,7 +1051,7 @@ DebugStatusLabel[state="paused"] {
}
DebugStatusLabel[state="running"] {
color: #000000;
color: #f0f0f0;
/*background-color: #c0c0c0;*/
}
@ -1099,15 +1080,6 @@ ShortcutEdit[error="true"] {
color: #dd0000;
}
QTabWidget::pane {
border: 0px;
}
QTabBar::tear {
width: 0px;
border: none;
}
/* e.g. "Exception filters" list, "Patch file" modules list, "Set page memory rights" table, "Select font" list, etc */
QTableView, QListView {
selection-color: #c8c8c8;

View File

@ -237,6 +237,8 @@ SymbolLoadingTextColor=#E1EA76
SymbolUnloadedTextColor=#A0A0A0
ThreadCurrentBackgroundColor=#C24000
ThreadCurrentColor=#FFFFFF
CallStackHighlightBackgroundColor=#5C4A00
CallStackHighlightColor=#FFFFFF
WatchTriggeredBackgroundColor=#XXXXXX
WatchTriggeredColor=#EF5350
LinkColor=#89A2F6

View File

@ -153,7 +153,6 @@
0x00FE WM_INPUT_DEVICE_CHANGE
0x00FF WM_INPUT
0x0100 WM_KEYDOWN
0x0100 WM_KEYFIRST
0x0101 WM_KEYUP
0x0102 WM_CHAR
0x0103 WM_DEADCHAR
@ -284,7 +283,6 @@
0x01B1 LB_MULTIPLEADDSTRING
0x01B2 LB_GETLISTBOXINFO
0x01E1 MN_GETHMENU
0x0200 WM_MOUSEFIRST
0x0200 WM_MOUSEMOVE
0x0201 WM_LBUTTONDOWN
0x0202 WM_LBUTTONUP
@ -295,7 +293,6 @@
0x0207 WM_MBUTTONDOWN
0x0208 WM_MBUTTONUP
0x0209 WM_MBUTTONDBLCLK
0x0209 WM_MOUSELAST
0x020A WM_MOUSEWHEEL
0x020B WM_XBUTTONDOWN
0x020C WM_XBUTTONUP

View File

@ -1,83 +0,0 @@
@echo off
echo Saving PATH
if "%OLDPATH%"=="" set OLDPATH=%PATH%
cd %~dp0
if /i "%1"=="x32" call setenv.bat x32&set type=Configuration=Release;Platform=Win32&goto build
if /i "%1"=="x64" call setenv.bat x64&set type=Configuration=Release;Platform=x64&goto build
if /i "%1"=="coverity" goto coverity
if /i "%1"=="sonarqube" goto sonarqube
goto usage
:build
echo Building DBG...
if "%MAXCORES%"=="" (
msbuild.exe x64dbg.sln /m /verbosity:minimal /t:Rebuild /p:%type%
) else (
set CL=/MP%MAXCORES%
msbuild.exe x64dbg.sln /m:1 /verbosity:minimal /t:Rebuild /p:%type%
)
if not %ERRORLEVEL%==0 exit
echo Building GUI...
rmdir /S /Q src\gui_build
cd src\gui
qmake x64dbg.pro CONFIG+=release
if not %ERRORLEVEL%==0 exit
if "%MAXCORES%"=="" (
jom
) else (
jom /J %MAXCORES%
)
if not %ERRORLEVEL%==0 exit
cd ..\..
goto :restorepath
:coverity
if "%2"=="" (
echo "Usage: build.bat coverity x32/x64"
goto usage
)
call setenv.bat coverity
echo Building with Coverity
cov-configure --msvc
cov-build --dir cov-int --instrument build.bat %2
goto :restorepath
:sonarqube
if "%2"=="" (
echo "Usage: build.bat sonarqube x32/x64"
goto usage
)
echo Building with SonarQube
build-wrapper --out-dir bw-output build.bat %2
if not defined APPVEYOR_PULL_REQUEST_NUMBER (
sonar-scanner -Dsonar.projectKey=x64dbg -Dsonar.sources=. -Dsonar.cfamily.build-wrapper-output=bw-output -Dsonar.host.url=https://sonarcloud.io -Dsonar.organization=mrexodia-github -Dsonar.login=%SONARQUBE_TOKEN% -Dsonar.exclusions=src/dbg/btparser/**,src/gui_build/**,src/zydis_wrapper/zydis/**
) else (
sonar-scanner -Dsonar.projectKey=x64dbg -Dsonar.sources=. -Dsonar.cfamily.build-wrapper-output=bw-output -Dsonar.host.url=https://sonarcloud.io -Dsonar.organization=mrexodia-github -Dsonar.login=%SONARQUBE_TOKEN% -Dsonar.exclusions=src/dbg/btparser/**,src/gui_build/**,src/zydis_wrapper/zydis/** -Dsonar.analysis.mode=preview -Dsonar.github.pullRequest=%APPVEYOR_PULL_REQUEST_NUMBER% -Dsonar.github.repository=x64dbg/x64dbg -Dsonar.github.oauth=%GITHUB_TOKEN%
)
goto :restorepath
:usage
echo "Usage: build.bat x32/x64/coverity"
echo.
echo Examples:
echo build.bat x32 : builds 32-bit release build
echo build.bat x64 : builds 64-bit release build
echo build.bat coverity x32 : builds 32-bit coverity build
echo build.bat coverity x64 : builds 64-bit coverity build
goto :restorepath
:restorepath
echo Resetting PATH
set PATH=%OLDPATH%
set OLDPATH=

View File

@ -1,86 +0,0 @@
@echo off
echo Cleaning base directory...
del /Q *.sdf
del /Q *.layout
del /Q /A H *.suo
rmdir /S /Q ipch
rmdir /S /Q release
rmdir /S /Q build
rmdir /S /Q cov-int
echo Cleaning BRIDGE...
cd src\bridge
call :delfiles
echo Cleaning DBG...
cd src\dbg
call :delfiles
echo Cleaning EXE...
cd src\exe
call :delfiles
echo Cleaning LAUNCHER...
cd src\launcher
call :delfiles
echo Cleaning GUI SRC...
rmdir /S /Q src\gui_build
echo Cleaning GUI...
cd src/gui
rmdir /S /Q build
del /Q Makefile*
del /Q *.pdb
cd ..\..
echo Cleaning bin\
del /Q bin\*.pdb
del /Q bin\*.exp
del /Q bin\*.a
del /Q bin\*.lib
del /Q bin\*.def
del /Q bin\x96dbg.exe
echo Cleaning bin\x32...
rmdir /S /Q bin\x32\db
del /Q bin\x32\*.pdb
del /Q bin\x32\*.exp
del /Q bin\x32\*.a
del /Q bin\x32\*.lib
del /Q bin\x32\*.def
del /Q bin\x32\x32dbg.exe
del /Q bin\x32\x32dbg.dll
del /Q bin\x32\x32gui.dll
del /Q bin\x32\x32bridge.dll
echo Cleaning bin\x64...
rmdir /S /Q bin\x64\db
del /Q bin\x64\*.pdb
del /Q bin\x64\*.exp
del /Q bin\x64\*.a
del /Q bin\x64\*.lib
del /Q bin\x64\*.def
del /Q bin\x64\x64dbg.exe
del /Q bin\x64\x64dbg.dll
del /Q bin\x64\x64gui.dll
del /Q bin\x64\x64bridge.dll
echo Cleaning help...
cd help
del /Q *.chm
rmdir /S /Q output
echo Done!
exit 0
:delfiles
rmdir /S /Q obj
rmdir /S /Q Win32
rmdir /S /Q x64
del /Q *.bmarks
del /Q *.layout
del /Q *.depend
del /Q *.pdb
cd ..\..

View File

@ -2,9 +2,17 @@
version = "3.15"
cmkr-include = "cmake/cmkr.cmake"
[options]
X64DBG_BUILD_IN_TREE = true
X64DBG_RELEASE = false
[variables]
CMAKE_MODULE_PATH = "${CMAKE_SOURCE_DIR}/cmake"
[project]
name = "x64dbg"
description = "An open-source x64/x32 debugger for windows."
msvc-runtime = "dynamic"
include-before = [
"cmake/VSToolchain.cmake"
]
@ -17,26 +25,12 @@ x86 = "CMAKE_SIZEOF_VOID_P EQUAL 4"
x64 = "CMAKE_SIZEOF_VOID_P EQUAL 8"
[find-package]
Qt5 = { components = ["Widgets", "Network", "WinExtras"] }
Qt5 = { components = ["Widgets", "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",
]
[subdir."src/zydis_wrapper"]
[subdir."src/gui/Src/ThirdPartyLibs/md4c"]
[subdir."src/third_party"]
[subdir."src/tests"]
[target.bridge]
type = "shared"
@ -57,8 +51,6 @@ x64.OUTPUT_NAME = "x64bridge"
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",
@ -69,6 +61,7 @@ sources = [
include-directories = [
"src/dbg/btparser",
]
clang-any.compile-options = ["-Wno-self-assign-field"]
[target.dbg]
type = "shared"
@ -91,13 +84,14 @@ sources = [
"src/dbg/XEDParse/*.h",
]
private-link-libraries = [
"zydis_wrapper",
"bridge",
"btparser",
"::zydis_wrapper",
"::bridge",
"::btparser",
"Psapi",
"Shlwapi",
"Ws2_32",
"Wininet",
"Iphlpapi",
]
x86.private-link-libraries = [
"src/dbg/dbghelp/dbghelp_x86.lib",
@ -121,12 +115,19 @@ x64.private-link-libraries = [
]
private-compile-definitions = [
"BUILD_DBG",
"NOMINMAX",
]
private-include-directories = [
"src/dbg",
"src/dbg/analysis",
"src/dbg/commands",
]
msvc.link-options = [
"/DELAYLOAD:TitanEngine.dll",
]
msvc.link-libraries = [
"Delayimp",
]
[target.dbg.properties]
x86.OUTPUT_NAME = "x32dbg"
@ -142,11 +143,13 @@ sources = [
]
private-link-libraries = [
"Qt5::Widgets",
"Qt5::Network",
"Qt5::WinExtras",
"zydis_wrapper",
"bridge",
"::zydis_wrapper",
"::bridge",
"::md4c-html",
"winmm",
"wininet",
"dwmapi"
]
x86.private-link-libraries = [
"src/gui/Src/ThirdPartyLibs/ldconvert/ldconvert_x86.lib",
@ -169,7 +172,9 @@ private-include-directories = [
private-compile-definitions = [
"BUILD_LIB",
"NOMINMAX",
"X64DBG",
]
X64DBG_RELEASE.compile-definitions = ["X64DBG_RELEASE"]
include-after = ["cmake/deps.cmake"]
[target.gui.properties]
@ -179,8 +184,49 @@ AUTOMOC = true
AUTORCC = true
AUTOUIC = true
[target.exe]
type = "executable"
msvc-runtime = "static"
sources = [
"src/exe/*.cpp",
"src/exe/*.h",
"src/exe/manifest.xml",
"src/exe/resource.rc",
"src/exe/strings_utf8.rc",
]
x86.sources = ["src/exe/icon32.rc"]
x64.sources = ["src/exe/icon64.rc"]
link-libraries = [
"::bridge",
"Wintrust",
]
msvc.link-options = [
"/DELAYLOAD:user32.dll",
"/DELAYLOAD:wintrust.dll",
"/DELAYLOAD:$<TARGET_FILE_NAME:bridge>",
"/NOIMPLIB",
"/NOEXP",
"/LARGEADDRESSAWARE",
]
msvc.link-libraries = [
"Delayimp",
]
# Make the executable build everything
dependencies = ["dbg", "gui", "loaddll", "deps"]
x86.dependencies = ["launcher"]
[target.exe.properties]
x86.OUTPUT_NAME = "x32dbg"
x64.OUTPUT_NAME = "x64dbg"
x86.ARCHIVE_OUTPUT_NAME = "x32dbg_exe"
x64.ARCHIVE_OUTPUT_NAME = "x64dbg_exe"
x86.PDB_NAME = "x32dbg_exe"
x64.PDB_NAME = "x64dbg_exe"
WIN32_EXECUTABLE = "ON"
[target.loaddll]
type = "executable"
msvc-runtime = "static"
sources = [
"src/loaddll/loaddll.cpp",
]
@ -190,49 +236,39 @@ x86.link-libraries = [
x64.link-libraries = [
"src/dbg/ntdll/ntdll_x64.lib",
]
msvc.link-options = [
"/DELAYLOAD:user32.dll",
]
msvc.link-libraries = [
"Delayimp",
]
[target.loaddll.properties]
WIN32_EXECUTABLE = "ON"
[target.exe]
[target.headless]
type = "executable"
sources = [
"src/exe/*.cpp",
"src/exe/*.h",
"src/exe/manifest.xml",
"src/exe/resource.rc",
"src/exe/strings.rc",
"src/headless/*.cpp",
"src/headless/*.h",
]
x86.sources = ["src/exe/icon32.rc"]
x64.sources = ["src/exe/icon64.rc"]
link-libraries = [
"bridge",
"Wintrust",
"::bridge",
]
msvc.link-options = [
"/DEF:${CMAKE_SOURCE_DIR}/src/exe/signaturecheck.def",
"/INCREMENTAL:NO",
"/LARGEADDRESSAWARE",
]
cmake-after = """
# Make the executable the main target
add_dependencies(exe dbg gui deps)
"""
[target.exe.properties]
x86.OUTPUT_NAME = "x32dbg"
x64.OUTPUT_NAME = "x64dbg"
x86.PDB_NAME = "x32dbg_exe"
x64.PDB_NAME = "x64dbg_exe"
WIN32_EXECUTABLE = "ON"
dependencies = ["exe"]
[target.launcher]
type = "executable"
condition = "x86"
msvc-runtime = "static"
sources = [
"src/launcher/*.cpp",
"src/exe/icon.rc",
"src/exe/resource.rc",
"src/exe/strings.rc",
"src/exe/strings_utf8.rc",
]
link-libraries = [
"Shlwapi",
@ -241,4 +277,5 @@ link-libraries = [
[target.launcher.properties]
OUTPUT_NAME = "x96dbg"
WIN32_EXECUTABLE = "ON"
WIN32_EXECUTABLE = "ON"
X64DBG_BUILD_IN_TREE.RUNTIME_OUTPUT_DIRECTORY = "${PROJECT_SOURCE_DIR}/bin"

56
cmake/FindQt5.cmake Normal file
View File

@ -0,0 +1,56 @@
# Documentation: https://cmake.org/cmake/help/latest/manual/cmake-developer.7.html#find-modules
if(Qt5_FOUND)
return()
endif()
find_package(Qt5 COMPONENTS ${Qt5_FIND_COMPONENTS} QUIET CONFIG)
if(Qt5_FOUND)
if(NOT Qt5_FIND_QUIETLY)
message(STATUS "Qt5 found: ${Qt5_DIR}")
endif()
return()
endif()
if(Qt5_FIND_REQUIRED AND WIN32 AND (MSVC OR CMAKE_CXX_SIMULATE_ID STREQUAL "MSVC"))
message(STATUS "Downloading Qt5...")
# Fix warnings about DOWNLOAD_EXTRACT_TIMESTAMP
if(POLICY CMP0135)
cmake_policy(SET CMP0135 NEW)
endif()
include(FetchContent)
set(FETCHCONTENT_QUIET OFF)
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
FetchContent_Declare(Qt5
URL "https://github.com/x64dbg/deps/releases/download/2025.07.02/qt5.12.12-msvc2017_64.7z"
URL_HASH SHA256=770490bf09514982c8192ebde9a1fac8821108ba42b021f167bac54e85ada48a
)
else()
FetchContent_Declare(Qt5
URL "https://github.com/x64dbg/deps/releases/download/2025.07.02/qt5.12.12-msvc2017.7z"
URL_HASH SHA256=3ff2a58e5ed772be475643cd7bb2df3e5499d7169d794ddf1ed5df5c5e862cb6
)
endif()
FetchContent_MakeAvailable(Qt5)
unset(FETCHCONTENT_QUIET)
set(Qt5_ROOT ${qt5_SOURCE_DIR})
find_package(Qt5 COMPONENTS ${Qt5_FIND_COMPONENTS} QUIET CONFIG)
endif()
if(Qt5_FOUND)
if(NOT Qt5_FIND_QUIETLY)
message(STATUS "Qt5 found: ${Qt5_DIR}")
endif()
return()
endif()
set(Qt5_FOUND FALSE)
if(Qt5_FIND_REQUIRED)
string(JOIN ", " _qt5_required_components ${Qt5_FIND_COMPONENTS})
message(FATAL_ERROR
"Qt5 not found. Required components: ${_qt5_required_components}. "
"For MSVC builds, Qt can be auto-downloaded. For other toolchains, install a compatible Qt SDK and set Qt5_DIR or CMAKE_PREFIX_PATH so CMake can find it."
)
endif()

View File

@ -1,3 +1,48 @@
option(ENABLE_SANITIZERS "Enable sanitizers" OFF)
if(ENABLE_SANITIZERS)
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
if(CMAKE_CXX_COMPILER_FRONTEND_VARIANT MATCHES "^MSVC$")
# NOTE: There is bug in Clang-CL that makes address sanitizers not work for all projects.
# The main issue is the 'world' project, which has WINDOWS_EXPORT_ALL_SYMBOLS.
# This issue will likely be fixed in a later version of Clang-CL, but for now you should
# configure with -DCMAKE_C_COMPILER=clang.exe -DCMAKE_CXX_COMPILER=clang++.exe to enable
# UB sanitizers.
message(WARNING "Enabling Clang-CL sanitizers (Clang works better)...")
add_compile_options(-fsanitize=address,undefined)
# Reference: https://devblogs.microsoft.com/cppblog/addresssanitizer-asan-for-windows-with-msvc/
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
set(ASAN_LIB_SUFFIX "x86_64")
else()
set(ASAN_LIB_SUFFIX "i386")
endif()
set(ASAN_LINKER_FLAGS "/wholearchive:clang_rt.asan-${ASAN_LIB_SUFFIX}.lib /wholearchive:clang_rt.asan_cxx-${ASAN_LIB_SUFFIX}.lib")
else()
message(STATUS "Enabling Clang sanitizers...")
add_compile_options(-fsanitize=address,undefined -fno-omit-frame-pointer)
set(ASAN_LINKER_FLAGS "-fsanitize=address,undefined")
endif()
# NOTE: Only set linker flags for executables and shared libraries
# the add_link_options command would add flags to static libraries as well
# which causes issues with symbols being defined in multiple places.
set(CMAKE_EXE_LINKER_FLAGS "${ASAN_LINKER_FLAGS}")
set(CMAKE_SHARED_LINKER_FLAGS "${ASAN_LINKER_FLAGS}")
if(WIN32)
# NOTE: The sanitizer library only supports the static release runtime
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded")
endif()
elseif(MSVC)
# Reference: https://learn.microsoft.com/en-us/cpp/build/reference/fsanitize
message(WARNING "Enabling MSVC sanitizers (Clang has better support)...")
add_compile_options(/fsanitize=address)
add_link_options(/INCREMENTAL:NO)
else()
message (FATAL_ERROR "Unsupported compiler for sanitizers: ${CMAKE_CXX_COMPILER_ID}")
endif()
endif()
# 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
@ -7,10 +52,17 @@ if (CMAKE_GENERATOR MATCHES "Visual Studio")
add_compile_options(/MP)
endif()
# TODO: support other toolchains
if(MSVC)
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 "")
# Generate PDB files for release builds
add_link_options($<$<CONFIG:Release,MinSizeRel>:/DEBUG:FULL>)
# Disable incremental linking
add_link_options(
$<$<CONFIG:Release,MinSizeRel,RelWithDebInfo>:/INCREMENTAL:NO>
$<$<CONFIG:Release,MinSizeRel,RelWithDebInfo>:/OPT:REF>
$<$<CONFIG:Release,MinSizeRel,RelWithDebInfo>:/OPT:ICF>
)
# Enable big objects (unity build)
add_compile_options(/bigobj)
endif()
# Make the project look nicer in IDEs
@ -20,3 +72,24 @@ set_property(GLOBAL PROPERTY AUTOMOC_SOURCE_GROUP "Generated Files")
set_property(GLOBAL PROPERTY AUTOMOC_TARGETS_FOLDER "CMakePredefinedTargets")
set_property(GLOBAL PROPERTY AUTORCC_SOURCE_GROUP "Generated Files")
set_property(GLOBAL PROPERTY AUTORCC_TARGETS_FOLDER "CMakePredefinedTargets")
# Build to the right output directory
if(X64DBG_BUILD_IN_TREE)
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
set(OUTPUT_DIRECTORY "${PROJECT_SOURCE_DIR}/bin/x64$<$<CONFIG:Debug>:d>")
else()
set(OUTPUT_DIRECTORY "${PROJECT_SOURCE_DIR}/bin/x32$<$<CONFIG:Debug>:d>")
endif()
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${OUTPUT_DIRECTORY})
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${OUTPUT_DIRECTORY})
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${OUTPUT_DIRECTORY})
endif()
# Workaround for RC files to be treated as UTF-8 with llvm-rc
if(CMAKE_RC_COMPILER MATCHES "[\\\\/]llvm-rc(.exe)?$")
message(STATUS "Detected llvm-rc, applying UTF-8 workaround")
# https://github.com/llvm/llvm-project/issues/63426#issuecomment-2769972658
# https://stackoverflow.com/a/38346103/1806760
set(CMAKE_RC_COMPILE_OBJECT "<CMAKE_RC_COMPILER> /C 65001 /fo<OBJECT> <SOURCE>")
endif()

7
cmake/cmkr.cmake vendored
View File

@ -1,8 +1,11 @@
include_guard()
# Initialize submodule if necessary
include(${CMAKE_CURRENT_LIST_DIR}/init-submodules.cmake)
# 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.44" CACHE STRING "cmkr git tag (this needs to be available forever)" FORCE)
set(CMKR_TAG "v0.2.46" 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
@ -12,7 +15,7 @@ if(CMAKE_SCRIPT_MODE_FILE)
file(MAKE_DIRECTORY "${CMAKE_BINARY_DIR}")
endif()
# Signed executable from this release: https://github.com/build-cpp/cmkr/releases/tag/v0.2.44
# Signed executable from this release: https://github.com/build-cpp/cmkr/releases/tag/v0.2.46
# To build cmkr from source: cmake -B build -DCMKR_EXECUTABLE=
if(WIN32)
set(CMKR_EXECUTABLE_DEFAULT "${CMAKE_CURRENT_LIST_DIR}/cmkr.exe")

Binary file not shown.

View File

@ -1,77 +1,154 @@
if(CMAKE_SCRIPT_MODE_FILE)
set(GUI_DLL ${CMAKE_ARGV3})
set(DEPS_DIR ${CMAKE_ARGV4})
set(WINDEPLOYQT ${CMAKE_ARGV5})
get_filename_component(GUI_DIR ${GUI_DLL} DIRECTORY)
# Check if we already copied the dependencies
if(EXISTS "${GUI_DIR}/.deps_copied")
return()
endif()
message(STATUS "Copying dependencies from ${DEPS_DIR} to ${GUI_DIR}")
execute_process(COMMAND ${WINDEPLOYQT} --no-compiler-runtime --force ${GUI_DLL})
function(copy_dep relfile)
if(EXISTS ${relfile})
message(STATUS "Skipping ${relfile}")
return()
endif()
message(STATUS "Copying ${relfile}")
get_filename_component(reldir ${relfile} DIRECTORY)
get_filename_component(relfile ${relfile} NAME)
file(COPY ${DEPS_DIR}/${relfile} DESTINATION ${GUI_DIR}/${reldir})
endfunction()
file(GLOB DEPS RELATIVE ${DEPS_DIR} "${DEPS_DIR}/*.dll")
foreach(DEP ${DEPS})
if(NOT DEP MATCHES "^(Qt5|msvc)")
copy_dep(${DEP})
endif()
endforeach()
copy_dep(GleeBug/TitanEngine.dll)
copy_dep(StaticEngine/TitanEngine.dll)
file(TOUCH "${GUI_DIR}/.deps_copied")
return()
endif()
if(NOT WIN32)
message(STATUS "copy_dependencies is only supported on Windows")
return()
endif()
if(NOT TARGET Qt5::windeployqt AND Qt5_FOUND AND TARGET Qt5::qmake)
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(NOT EXISTS ${imported_location})
message(FATAL_ERROR "Qt5 tool not found: ${imported_location}")
endif()
add_executable(Qt5::windeployqt IMPORTED)
set_target_properties(Qt5::windeployqt PROPERTIES
IMPORTED_LOCATION ${imported_location}
)
endif()
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
set(DEPS_DIR ${CMAKE_SOURCE_DIR}/deps/x64)
else()
set(DEPS_DIR ${CMAKE_SOURCE_DIR}/deps/x32)
endif()
add_custom_target(deps
COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_LIST_DIR}/deps.cmake $<TARGET_FILE:gui> ${DEPS_DIR} $<TARGET_FILE:Qt5::windeployqt>
)
if(CMAKE_SCRIPT_MODE_FILE)
set(GUI_DLL "${CMAKE_ARGV3}")
set(DEPS_DIR "${CMAKE_ARGV4}")
set(WINDEPLOYQT "${CMAKE_ARGV5}")
set(EXPECTED_DEPS_HASH "${CMAKE_ARGV6}")
get_filename_component(GUI_DIR "${GUI_DLL}" DIRECTORY)
get_filename_component(WINDEPLOYQT_DIR "${WINDEPLOYQT}" DIRECTORY)
set(DEPS_COPIED_FILE "${GUI_DIR}/.deps_copied")
set(DEPS_HASH_FILE "${GUI_DIR}/.deps_hash")
# Check if we already copied the dependencies for the current Qt/deps state.
if(EXISTS "${DEPS_COPIED_FILE}" AND EXISTS "${DEPS_HASH_FILE}")
file(READ "${DEPS_HASH_FILE}" CURRENT_DEPS_HASH)
string(STRIP "${CURRENT_DEPS_HASH}" CURRENT_DEPS_HASH)
if("${CURRENT_DEPS_HASH}" STREQUAL "${EXPECTED_DEPS_HASH}")
return()
endif()
endif()
# Make windeployqt resilient against globally configured Qt environments.
string(CONCAT SANITIZED_PATH "${WINDEPLOYQT_DIR}" ";" "$ENV{PATH}")
set(ENV{PATH} "${SANITIZED_PATH}")
unset(ENV{QTDIR})
unset(ENV{QT_PLUGIN_PATH})
unset(ENV{QT_QPA_PLATFORM_PLUGIN_PATH})
unset(ENV{QML_IMPORT_PATH})
unset(ENV{QML2_IMPORT_PATH})
message(STATUS "Copying dependencies from ${DEPS_DIR} to ${GUI_DIR}")
execute_process(
COMMAND "${WINDEPLOYQT}" --pdb --no-compiler-runtime --no-translations --no-opengl-sw --force "${GUI_DLL}" --list relative
WORKING_DIRECTORY "${GUI_DIR}"
RESULT_VARIABLE WINDEPLOYQT_RESULT
OUTPUT_VARIABLE DEPS_COPIED
ERROR_VARIABLE WINDEPLOYQT_STDERR
OUTPUT_STRIP_TRAILING_WHITESPACE
ERROR_STRIP_TRAILING_WHITESPACE
)
if(NOT "${WINDEPLOYQT_STDERR}" STREQUAL "")
message(STATUS "${WINDEPLOYQT_STDERR}")
endif()
if(NOT WINDEPLOYQT_RESULT EQUAL 0)
message(FATAL_ERROR "windeployqt failed with exit code ${WINDEPLOYQT_RESULT}")
endif()
# Split the output into lines
string(REGEX REPLACE "\n" ";" DEPS_COPIED "${DEPS_COPIED}")
list(FILTER DEPS_COPIED EXCLUDE REGEX "^$")
foreach(line ${DEPS_COPIED})
message(STATUS "Copying ${line}")
endforeach()
function(copy_dep relfile)
set(DEPS_COPIED ${DEPS_COPIED} ${relfile} PARENT_SCOPE)
set(target_path "${GUI_DIR}/${relfile}")
if(IS_SYMLINK "${target_path}")
message(STATUS "Skipping symlink ${relfile}")
return()
endif()
message(STATUS "Copying ${relfile}")
get_filename_component(reldir "${relfile}" DIRECTORY)
get_filename_component(filename "${relfile}" NAME)
if(reldir)
file(COPY "${DEPS_DIR}/${reldir}/${filename}" DESTINATION "${GUI_DIR}/${reldir}")
else()
file(COPY "${DEPS_DIR}/${filename}" DESTINATION "${GUI_DIR}")
endif()
endfunction()
file(GLOB_RECURSE DEPS RELATIVE "${DEPS_DIR}" "${DEPS_DIR}/*.dll")
list(SORT DEPS)
foreach(DEP ${DEPS})
copy_dep("${DEP}")
endforeach()
list(JOIN DEPS_COPIED "\n" DEPS_COPIED)
file(WRITE "${DEPS_COPIED_FILE}" "${DEPS_COPIED}")
file(WRITE "${DEPS_HASH_FILE}" "${EXPECTED_DEPS_HASH}\n")
return()
endif()
if(NOT WIN32)
message(STATUS "copy_dependencies is only supported on Windows")
return()
endif()
if(NOT TARGET Qt5::windeployqt)
if(Qt5_FOUND AND TARGET Qt5::qmake)
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(NOT TARGET Qt5::windeployqt)
# Fallback: search for windeployqt on PATH
find_program(_qt5_windeployqt_from_path NAMES windeployqt.exe windeployqt)
if(_qt5_windeployqt_from_path)
add_executable(Qt5::windeployqt IMPORTED)
set_target_properties(Qt5::windeployqt PROPERTIES
IMPORTED_LOCATION ${_qt5_windeployqt_from_path}
)
endif()
endif()
endif()
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
set(DEPS_DIR ${CMAKE_SOURCE_DIR}/deps/x64)
else()
set(DEPS_DIR ${CMAKE_SOURCE_DIR}/deps/x32)
endif()
get_target_property(_qt5_windeployqt_location Qt5::windeployqt IMPORTED_LOCATION)
if(NOT _qt5_windeployqt_location)
message(FATAL_ERROR "Could not locate Qt5::windeployqt. Install Qt with windeployqt and ensure it is discoverable (in PATH or via Qt5::qmake).")
endif()
file(GLOB_RECURSE DEPS_INPUT_DLLS "${DEPS_DIR}/*.dll")
list(SORT DEPS_INPUT_DLLS)
file(SHA256 "${_qt5_windeployqt_location}" WINDEPLOYQT_HASH)
set(DEPS_HASH_INPUT "WINDEPLOYQT=${WINDEPLOYQT_HASH}\n")
foreach(DEP_FILE ${DEPS_INPUT_DLLS})
file(RELATIVE_PATH DEP_RELATIVE "${DEPS_DIR}" "${DEP_FILE}")
file(SHA256 "${DEP_FILE}" DEP_HASH)
string(APPEND DEPS_HASH_INPUT "${DEP_RELATIVE}=${DEP_HASH}\n")
endforeach()
string(SHA256 EXPECTED_DEPS_HASH "${DEPS_HASH_INPUT}")
add_custom_target(deps
COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_LIST_DIR}/deps.cmake $<TARGET_FILE:gui> ${DEPS_DIR} $<TARGET_FILE:Qt5::windeployqt> ${EXPECTED_DEPS_HASH}
)
# Make a rebuild copy the dependencies again
set_target_properties(deps PROPERTIES
ADDITIONAL_CLEAN_FILES "$<TARGET_FILE_DIR:gui>/.deps_copied;$<TARGET_FILE_DIR:gui>/.deps_hash"
)

View File

@ -0,0 +1,26 @@
function(init_submodule folder)
set(full_path "${CMAKE_CURRENT_LIST_DIR}/../${folder}")
if(NOT EXISTS ${full_path})
message(FATAL_ERROR "Submodule folder does not exist: ${full_path}")
endif()
file(GLOB files "${full_path}/*")
if(NOT files)
find_package(Git REQUIRED)
message(STATUS "Submodule '${folder}' not initialized, running git...")
execute_process(
COMMAND "${GIT_EXECUTABLE}" rev-parse --show-toplevel
WORKING_DIRECTORY "${CMAKE_CURRENT_LIST_DIR}/.."
OUTPUT_VARIABLE git_root
OUTPUT_STRIP_TRAILING_WHITESPACE
COMMAND_ERROR_IS_FATAL ANY
)
execute_process(
COMMAND "${GIT_EXECUTABLE}" submodule update --init -- "${full_path}"
WORKING_DIRECTORY "${git_root}"
COMMAND_ERROR_IS_FATAL ANY
)
endif()
endfunction()
init_submodule(src/dbg/btparser)
init_submodule(deps)

21
cmake/llvm-mingw.cmake Normal file
View File

@ -0,0 +1,21 @@
set(LLVM_MINGW /Users/admin/llvm-mingw-ucrt)
set(CMAKE_PREFIX_PATH /Users/admin/Qt5.6.3-msvc2015/msvc2015_64)
set(CMAKE_SYSTEM_PROCESSOR x86_64)
set(CMAKE_C_COMPILER_TARGET ${CMAKE_SYSTEM_PROCESSOR}-w64-mingw32)
set(CMAKE_C_COMPILER ${LLVM_MINGW}/bin/x86_64-w64-mingw32-clang)
set(CMAKE_CXX_COMPILER ${LLVM_MINGW}/bin/x86_64-w64-mingw32-clang++)
set(CMAKE_SYSTEM_NAME Windows)
set(CMAKE_SYSTEM_VERSION 1)
# This is working (thanks to Simon for finding this trick)
set(CMAKE_AR ${LLVM_MINGW}/bin/llvm-ar)
set(CMAKE_RANLIB ${LLVM_MINGW}/bin/x86_64-w64-mingw32-ranlib)
set(CMAKE_RC_COMPILER ${LLVM_MINGW}/bin/llvm-rc)
set(CMAKE_RC_COMPILER /Users/admin/Projects/zig-cross/cmake/zig-rc)
set(CMAKE_PROJECT_INCLUDE ${CMAKE_CURRENT_LIST_DIR}/qt-cross.cmake)
set(CMAKE_CXX_FLAGS_INIT "-stdlib=libc++ -mlzcnt")
set(CMAKE_EXE_LINKER_FLAGS_INIT "--start-no-unused-arguments -rtlib=compiler-rt -unwindlib=libunwind --end-no-unused-arguments")
set(CMAKE_MODULE_LINKER_FLAGS_INIT "${CMAKE_EXE_LINKER_FLAGS_INIT}")
set(CMAKE_SHARED_LINKER_FLAGS_INIT "${CMAKE_EXE_LINKER_FLAGS_INIT}")

9
cmake/msvc-wine.cmake Normal file
View File

@ -0,0 +1,9 @@
set(CMAKE_SYSTEM_NAME Windows)
set(MSVC_BIN_DIR $ENV{MSVC_BIN_DIR})
set(CMAKE_C_COMPILER ${MSVC_BIN_DIR}/cl)
set(CMAKE_CXX_COMPILER ${MSVC_BIN_DIR}/cl)
set(CMAKE_RC_COMPILER ${MSVC_BIN_DIR}/rc)
set(CMAKE_PROJECT_INCLUDE ${CMAKE_CURRENT_LIST_DIR}/qt-wine.cmake)

31
cmake/qt-cross.cmake Normal file
View File

@ -0,0 +1,31 @@
include_guard()
message(STATUS "Configuring Qt for cross-compilation...")
# Qt
#set(AUTOMOC_EXECUTABLE /Users/admin/Projects/qtbase-wasm32-wasi/bin/moc)
#set(AUTORCC_EXECUTABLE /Users/admin/Projects/qtbase-wasm32-wasi/bin/rcc)
#set(AUTOUIC_EXECUTABLE /Users/admin/Projects/qtbase-wasm32-wasi/bin/uic)
set(QT_HOST_BIN_DIR /Users/admin/Projects/qtbase-wasm32-wasi/bin/)
function(qt5_host_tool name)
if (NOT TARGET Qt5::${name})
add_executable(Qt5::${name} IMPORTED)
if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows")
set(imported_location ${QT_HOST_BIN_DIR}/${name}.exe)
else()
set(imported_location ${QT_HOST_BIN_DIR}/${name})
endif()
if(NOT EXISTS ${imported_location})
message(FATAL_ERROR "Qt5 tool not found: ${imported_location}")
endif()
set_target_properties(Qt5::${name} PROPERTIES
IMPORTED_LOCATION ${imported_location}
)
endif()
endfunction()
qt5_host_tool(qmake)
qt5_host_tool(moc)
qt5_host_tool(rcc)
qt5_host_tool(uic)

29
cmake/qt-wine.cmake Normal file
View File

@ -0,0 +1,29 @@
include_guard()
message(STATUS "Configuring Qt for Wine cross-compilation...")
set(QT_HOST_BIN_DIR ${CMAKE_CURRENT_LIST_DIR}/wine)
function(qt5_host_tool name)
if (NOT TARGET Qt5::${name})
add_executable(Qt5::${name} IMPORTED)
set(imported_location ${QT_HOST_BIN_DIR}/${name})
# FIXME run after deps.cmake to enable next
#if(NOT EXISTS ${imported_location})
# message(FATAL_ERROR "Qt5 tool not found: ${imported_location}")
#endif()
set_target_properties(Qt5::${name} PROPERTIES
IMPORTED_LOCATION ${imported_location}
)
endif()
endfunction()
qt5_host_tool(windeployqt)
qt5_host_tool(qmake)
qt5_host_tool(moc)
qt5_host_tool(rcc)
qt5_host_tool(uic)

135
cmake/release.cmake Normal file
View File

@ -0,0 +1,135 @@
cmake_minimum_required(VERSION 3.15)
# Get the root directory
get_filename_component(ROOT_DIR "${CMAKE_CURRENT_LIST_DIR}/.." ABSOLUTE)
set(RELEASE_DIR "${ROOT_DIR}/release")
# Clean up existing release directory
file(REMOVE_RECURSE "${RELEASE_DIR}")
file(MAKE_DIRECTORY "${RELEASE_DIR}")
# Setup pluginsdk directories
set(PLUGINSDK_DIR "${RELEASE_DIR}/pluginsdk")
file(MAKE_DIRECTORY "${PLUGINSDK_DIR}")
file(MAKE_DIRECTORY "${PLUGINSDK_DIR}/jansson")
file(MAKE_DIRECTORY "${PLUGINSDK_DIR}/lz4")
file(MAKE_DIRECTORY "${PLUGINSDK_DIR}/XEDParse")
# Setup release directories
file(MAKE_DIRECTORY "${RELEASE_DIR}/release")
file(MAKE_DIRECTORY "${RELEASE_DIR}/release/translations")
file(MAKE_DIRECTORY "${RELEASE_DIR}/release/x32")
file(MAKE_DIRECTORY "${RELEASE_DIR}/release/x64")
# Copy pluginsdk files
set(PLUGINSDK_DIR "${RELEASE_DIR}/pluginsdk")
# Copy directories
file(COPY "${ROOT_DIR}/src/dbg/jansson/" DESTINATION "${PLUGINSDK_DIR}/jansson")
file(COPY "${ROOT_DIR}/src/dbg/lz4/" DESTINATION "${PLUGINSDK_DIR}/lz4")
file(COPY "${ROOT_DIR}/src/dbg/XEDParse/" DESTINATION "${PLUGINSDK_DIR}/XEDParse")
# Copy headers
file(GLOB PLUGIN_HEADERS
"${ROOT_DIR}/src/dbg/_plugin_types.h"
"${ROOT_DIR}/src/dbg/_plugins.h"
"${ROOT_DIR}/src/dbg/_scriptapi*.h"
"${ROOT_DIR}/src/dbg/_dbgfunctions.h"
"${ROOT_DIR}/src/bridge/bridge*.h"
)
file(COPY ${PLUGIN_HEADERS} DESTINATION "${PLUGINSDK_DIR}")
file(COPY "${ROOT_DIR}/bin/x32/x32bridge.lib" DESTINATION "${PLUGINSDK_DIR}")
file(COPY "${ROOT_DIR}/bin/x32/x32dbg.lib" DESTINATION "${PLUGINSDK_DIR}")
file(COPY "${ROOT_DIR}/bin/x64/x64bridge.lib" DESTINATION "${PLUGINSDK_DIR}")
file(COPY "${ROOT_DIR}/bin/x64/x64dbg.lib" DESTINATION "${PLUGINSDK_DIR}")
# Copy release files
set(RELEASE_MAIN_DIR "${RELEASE_DIR}/release")
# Handle deps_copied
set(DEPS_BLACKLIST libGLESV2.dll libEGL.dll d3dcompiler_47.dll)
function(handle_deps_copied arch)
file(READ "${ROOT_DIR}/bin/${arch}/.deps_copied" DEPS_COPIED)
string(REGEX REPLACE "\n" ";" DEPS_COPIED "${DEPS_COPIED}")
foreach(DEP ${DEPS_COPIED})
if(NOT ${DEP} IN_LIST DEPS_BLACKLIST)
get_filename_component(reldir ${DEP} DIRECTORY)
file(COPY "${ROOT_DIR}/bin/${arch}/${DEP}" DESTINATION "${RELEASE_MAIN_DIR}/${arch}/${reldir}")
endif()
endforeach()
endfunction()
function(copy_debug_engines arch)
file(COPY "${ROOT_DIR}/bin/${arch}/TitanEngine.dll" DESTINATION "${RELEASE_MAIN_DIR}/${arch}")
foreach(ENGINE_DIR GleeBug StaticEngine)
file(MAKE_DIRECTORY "${RELEASE_MAIN_DIR}/${arch}/${ENGINE_DIR}")
file(COPY "${ROOT_DIR}/bin/${arch}/${ENGINE_DIR}/TitanEngine.dll" DESTINATION "${RELEASE_MAIN_DIR}/${arch}/${ENGINE_DIR}")
endforeach()
endfunction()
function(copy_debug_engine_symbols arch)
foreach(ENGINE_DIR GleeBug StaticEngine)
file(MAKE_DIRECTORY "${RELEASE_DIR}/pdb/${arch}/${ENGINE_DIR}")
file(COPY "${ROOT_DIR}/bin/${arch}/${ENGINE_DIR}/TitanEngine.pdb" DESTINATION "${RELEASE_DIR}/pdb/${arch}/${ENGINE_DIR}")
endforeach()
endfunction()
handle_deps_copied("x64")
handle_deps_copied("x32")
# Copy themes
file(COPY "${ROOT_DIR}/bin/themes/" DESTINATION "${RELEASE_MAIN_DIR}/themes")
# Copy main files
file(COPY "${ROOT_DIR}/bin/x96dbg.exe" DESTINATION "${RELEASE_MAIN_DIR}")
file(COPY "${ROOT_DIR}/bin/mnemdb.json" DESTINATION "${RELEASE_MAIN_DIR}")
file(COPY "${ROOT_DIR}/bin/errordb.txt" DESTINATION "${RELEASE_MAIN_DIR}")
file(COPY "${ROOT_DIR}/bin/exceptiondb.txt" DESTINATION "${RELEASE_MAIN_DIR}")
file(COPY "${ROOT_DIR}/bin/ntstatusdb.txt" DESTINATION "${RELEASE_MAIN_DIR}")
file(COPY "${ROOT_DIR}/bin/winconstants.txt" DESTINATION "${RELEASE_MAIN_DIR}")
# Copy translations
file(GLOB TRANSLATION_FILES "${ROOT_DIR}/bin/translations/*.qm")
file(COPY ${TRANSLATION_FILES} DESTINATION "${RELEASE_MAIN_DIR}/translations")
# Copy x32 files
file(COPY "${ROOT_DIR}/bin/x32/x32bridge.dll" DESTINATION "${RELEASE_MAIN_DIR}/x32")
file(COPY "${ROOT_DIR}/bin/x32/x32dbg.dll" DESTINATION "${RELEASE_MAIN_DIR}/x32")
file(COPY "${ROOT_DIR}/bin/x32/x32dbg.exe" DESTINATION "${RELEASE_MAIN_DIR}/x32")
file(COPY "${ROOT_DIR}/bin/x32/x32gui.dll" DESTINATION "${RELEASE_MAIN_DIR}/x32")
file(COPY "${ROOT_DIR}/bin/x32/loaddll.exe" DESTINATION "${RELEASE_MAIN_DIR}/x32")
file(COPY "${ROOT_DIR}/bin/x32/headless.exe" DESTINATION "${RELEASE_MAIN_DIR}/x32")
copy_debug_engines("x32")
# Copy x64 files
file(COPY "${ROOT_DIR}/bin/x64/x64bridge.dll" DESTINATION "${RELEASE_MAIN_DIR}/x64")
file(COPY "${ROOT_DIR}/bin/x64/x64dbg.dll" DESTINATION "${RELEASE_MAIN_DIR}/x64")
file(COPY "${ROOT_DIR}/bin/x64/x64dbg.exe" DESTINATION "${RELEASE_MAIN_DIR}/x64")
file(COPY "${ROOT_DIR}/bin/x64/x64gui.dll" DESTINATION "${RELEASE_MAIN_DIR}/x64")
file(COPY "${ROOT_DIR}/bin/x64/loaddll.exe" DESTINATION "${RELEASE_MAIN_DIR}/x64")
file(COPY "${ROOT_DIR}/bin/x64/headless.exe" DESTINATION "${RELEASE_MAIN_DIR}/x64")
copy_debug_engines("x64")
# Create commithash.txt
execute_process(
COMMAND git rev-parse HEAD
OUTPUT_FILE "${RELEASE_DIR}/commithash.txt"
WORKING_DIRECTORY "${ROOT_DIR}"
)
# Copy PDB files
file(MAKE_DIRECTORY "${RELEASE_DIR}/pdb")
file(MAKE_DIRECTORY "${RELEASE_DIR}/pdb/x32")
file(MAKE_DIRECTORY "${RELEASE_DIR}/pdb/x64")
file(GLOB PDB_FILES "${ROOT_DIR}/bin/*.pdb")
file(COPY ${PDB_FILES} DESTINATION "${RELEASE_DIR}/pdb")
file(GLOB PDB_X32_FILES "${ROOT_DIR}/bin/x32/*.pdb")
file(COPY ${PDB_X32_FILES} DESTINATION "${RELEASE_DIR}/pdb/x32")
copy_debug_engine_symbols("x32")
file(GLOB PDB_X64_FILES "${ROOT_DIR}/bin/x64/*.pdb")
file(COPY ${PDB_X64_FILES} DESTINATION "${RELEASE_DIR}/pdb/x64")
copy_debug_engine_symbols("x64")

1
cmake/wine/moc Symbolic link
View File

@ -0,0 +1 @@
run

1
cmake/wine/qmake Symbolic link
View File

@ -0,0 +1 @@
run

1
cmake/wine/rcc Symbolic link
View File

@ -0,0 +1 @@
run

52
cmake/wine/run Executable file
View File

@ -0,0 +1,52 @@
#!/usr/bin/env bash
#
# Copyright (c) 2018 Martin Storsjo
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#. msvcenv.sh
# /showIncludes
unixify_path='/^Note: including file: /{ s/z:([\\/])/\1/i; s,\\,/,g; }'
# /E
unixify_line='/^[[:blank:]]*#[[:blank:]]*line[[:blank:]]/{ s/z:([\\/])/\1/i; s,\\\\,/,g; }'
# Warnings and Errors
unixify_note='/^[zZ]:.*\([[:digit:]]+\): (note|error C[[:digit:]]{4}|warning C[[:digit:]]{4}): /{ s/z:([\\/])/\1/ig; s,\\,/,g; }'
export WINE_MSVC_STDOUT_SED="$unixify_path;$unixify_line;$unixify_note"
export WINE_MSVC_STDERR_SED="$unixify_path"
"$MSVC_BIN_DIR"/wine-msvc.sh "$QT_BIN_DIR"/$(basename $0).exe "$@"
ec=$?
[ $ec -ne 0 ] && exit $ec
# Postprocess
for a in "$@"; do
case $a in
[-/]P) arg_P=$a ;;
[-/]Fi*) arg_Fi=${a:3} ;;
esac
done
# Unixify paths for /P
if [ -n "$arg_P" ] && [ -f "$arg_Fi" ]; then
if sed --help 2>&1 | grep '\-i extension' >/dev/null; then
inplace=(-i '') # BSD sed
else
inplace=(-i) # GNU sed
fi
sed "${inplace[@]}" -E 's/\r//;'"$unixify_line" "$arg_Fi"
fi
exit $ec

1
cmake/wine/uic Symbolic link
View File

@ -0,0 +1 @@
run

1
cmake/wine/windeployqt Symbolic link
View File

@ -0,0 +1 @@
run

2
deps

@ -1 +1 @@
Subproject commit fdef4703ba4045204d36f6f5c1734749a8b7204a
Subproject commit 4a830e113bdb56efe828eed132b1511fb8259c72

7
docs/.editorconfig Normal file
View File

@ -0,0 +1,7 @@
; Top-most EditorConfig file
root = true
; Windows-style newlines
[*]
end_of_line = CRLF

7
docs/.gitignore vendored Normal file
View File

@ -0,0 +1,7 @@
_build*/
*.chm
python-2.7.18.amd64.portable/
hha.dll
hhc.exe
itcc.dll
*.7z

23
docs/.readthedocs.yaml Normal file
View File

@ -0,0 +1,23 @@
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
# Required
version: 2
# Set the version of Python and other tools you might need
build:
os: ubuntu-22.04
tools:
python: "2.7"
# Build documentation in the docs/ directory with Sphinx
sphinx:
builder: html
configuration: docs/conf.py
fail_on_warning: false
# We recommend specifying your dependencies to enable reproducible builds:
# https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
python:
install:
- requirements: docs/requirements.txt

37
docs/COMPILE-linux.md Normal file
View File

@ -0,0 +1,37 @@
## Prerequisites
```sh
sudo apt update
sudo apt install cmake ninja-build wine
```
## Install MSVC
Download https://github.com/mstorsjo/msvc-wine
```sh
cd msvc-wine
./vsdownload.py --accept-license --dest ~/opt/msvc Microsoft.VisualStudio.Workload.VCTools Microsoft.VisualStudio.Component.VC.ATL
./install.sh ~/opt/msvc
```
## Build
x86
```sh
cd x64dbg
export MSVC_BIN_DIR=~/opt/msvc/bin/x86
export QT_BIN_DIR=~/src/x64dbg/build32/_deps/qt5-src/bin
cmake -B build32 -DCMAKE_TOOLCHAIN_FILE=cmake/msvc-wine.cmake -G Ninja
cmake --build build32 -j4
```
x64
```sh
cd x64dbg
export MSVC_BIN_DIR=~/opt/msvc/bin/x64
export QT_BIN_DIR=~/src/x64dbg/build64/_deps/qt5-src/bin
cmake -B build64 -DCMAKE_TOOLCHAIN_FILE=cmake/msvc-wine.cmake -G Ninja
cmake --build build64 -j4
```
## Issues
- ```LINK : fatal error LNK1158: cannot run 'rc.exe'```
> Fix: winecfg -> Drives -> Remove drives with alternative path to x64dbg src (like: E: -> ~/src)

18
docs/README.md Normal file
View File

@ -0,0 +1,18 @@
# docs
Documentation repository for [x64dbg](http://x64dbg.com) at [Read the Docs](https://readthedocs.org/projects/x64dbg).
## Building
Run `makechm.bat`. It will build the .CHM help file.
When first building the .CHM help file, it automatically downloads
[python 2.7.18 portable](https://github.com/x64dbg/docs/releases/download/python27-portable/python-2.7.18.amd64.portable.7z) and
[Microsoft HTML Help Compiler 4.74.8702](https://github.com/x64dbg/deps/releases/download/dependencies/hhc-4.74.8702.7z) from GitHub.
Then, `7z` is used to extract the downloaded archive, so make sure [7-zip](https://7-zip.org/) is installed, and `7z` command can be accessed from
the current directory.
Note: The following patch was applied:
Add `relpath = relpath.replace(os.path.sep, '/')` after `C:\Python27\Lib\site-packages\recommonmark\transform.py` line `63`

0
docs/_static/EMPTY vendored Normal file
View File

0
docs/_templates/EMPTY vendored Normal file
View File

View File

@ -0,0 +1,11 @@
# GetRelocSize/grs
Get the correct size of a relocation table. This is useful while unpacking and restoring the original relocation table.
## arguments
`arg1` The address of the relocation table to analyze.
## results
The found size of the relocation table is stored in `$result`.

View File

@ -0,0 +1,11 @@
# analadv
Do function analysis, embedded data analysis and xref analysis.
## arguments
This command has no arguments.
## results
This command does not set any result variables.

View File

@ -0,0 +1,11 @@
# analrecur/analr
Do single function analysis.
## arguments
`arg1` The base address of the function to analyze.
## results
This command does not set any result variables.

View File

@ -0,0 +1,11 @@
# analxrefs/analx
Do xrefs analysis in the module selected in the disassembly view.
## arguments
This command has no arguments.
## results
This command does not set any result variables.

View File

@ -0,0 +1,11 @@
# analyse/analyze/anal
Do function analysis.
## arguments
This command has no arguments.
## result
This command does not set any result variables.

View File

@ -0,0 +1,11 @@
# analyse_nukem/analyze_nukem/anal_nukem
Do function analysis using nukem's algorithm.
## arguments
This command has no arguments.
## result
This command does not set any result variables.

View File

@ -0,0 +1,11 @@
# cfanalyze/cfanalyse/cfanal
Do control flow analysis in the module selected in the disassembly view.
## arguments
This command has no arguments.
## results
This command does not set any result variables.

View File

@ -0,0 +1,11 @@
# exanalyse/exanalyze/exanal
Do exception directory analysis. This kind of analysis doesn't work on 32-bit executables.
## arguments
This command has no arguments.
## results
This command does not set any result variables.

View File

@ -0,0 +1,12 @@
exhandlers
==========
Print all exception handlers, including SEH(StructuredExceptionHandler), VEH(VectoredExceptionHandler),
VCH(VectoredContinueHandler) and UnhandledExceptionFilter, into the log.
arguments
---------
This command has no arguments
results
-------
This command does not set any result variables.

View File

@ -0,0 +1,24 @@
# exinfo
Print the `EXCEPTION_DEBUG_INFO` structure from the last exception.
Sample output:
```
EXCEPTION_DEBUG_INFO:
dwFirstChance: 1
ExceptionCode: 80000001 (EXCEPTION_GUARD_PAGE)
ExceptionFlags: 00000000
ExceptionAddress: 00007FFE16FB1B91 ntdll.00007FFE16FB1B91
NumberParameters: 2
ExceptionInformation[00]: 0000000000000008
ExceptionInformation[01]: 00007FFE16FB1B91 ntdll.00007FFE16FB1B91
```
arguments
---------
This command has no arguments
results
-------
This command does not set any result variables.

View File

@ -0,0 +1,11 @@
# imageinfo
Output the image information for a module. The information describes the Characteristics and DLL Characteristics fields in the PE header structure.
## arguments
`[arg1]` The base of the module. If not specified the module at CIP will be used.
## results
This command does not set any result variables.

View File

@ -0,0 +1,25 @@
Analysis
========
This section contains commands that are used for analysis.
**Contents:**
.. toctree::
:maxdepth: 1
analyse
exanalyse
cfanalyze
analyse_nukem
analxrefs
analrecur
analadv
virtualmod
symdownload
symload
symunload
imageinfo
GetRelocSize
exhandlers
exinfo
traceexecute

View File

@ -0,0 +1,13 @@
# symdownload/downloadsym
Attempt to download a symbol from a Symbol Store.
## arguments
`[arg1]` Module name (with or without extension) to attempt to download symbols for. When not specified, an attempt will be done to download symbols for all loaded modules.
`[arg2]` Symbol Store URL. When not specified, the default store will be used.
## result
This command does not set any result variables.

View File

@ -0,0 +1,15 @@
# symload/loadsym
Attempt to load a symbol from disk.
## arguments
`arg1` Module name (with or without extension) to attempt to load symbols for.
`arg2` Path to the symbol file.
`[arg3]` Force load. Set to `1` to skip symbol validation.
## result
This command does not set any result variables.

View File

@ -0,0 +1,11 @@
# symunload/unloadsym
Unload a symbol.
## arguments
`arg1` Module name (with or without extension) to unload symbols from.
## result
This command does not set any result variables.

View File

@ -0,0 +1,11 @@
# traceexecute
Tell the debugger that an address has been traced.
## arguments
`arg1` The address.
## result
This command does not set any result variables.

View File

@ -0,0 +1,15 @@
# virtualmod
Tell the debugger to treat a memory range as a virtual module.
## arguments
`arg1` the user-supplied module name.
`arg2` the base of the memory range.
`[arg3]` the size of the memory range.
## result
This command does not set any result variables.

View File

@ -0,0 +1,11 @@
# DeleteBPX/bpc/bc
Delete a breakpoint set using the SetBPX command.
## arguments
`[arg1]` Name or address of the breakpoint to delete. If this argument is not specified, all breakpoints will be deleted.
## result
This command does not set any result variables.

View File

@ -0,0 +1,11 @@
# DeleteExceptionBPX
Delete an exception breakpoint set using the SetExceptionBPX command.
## arguments
`[arg1]` Name, exception name or code of the exception breakpoint to delete. If this argument is not specified, all exception breakpoints will be deleted.
## result
This command does not set any result variables.

View File

@ -0,0 +1,11 @@
# DeleteHardwareBreakpoint/bphc/bphwc
Delete a hardware breakpoint set using the SetHardwareBreakpoint command.
## arguments
`[arg1]` Name or address of the hardware breakpoint to delete. If this argument is not specified, all hardware breakpoints will be deleted.
## result
This command does not set any result variables.

View File

@ -0,0 +1,11 @@
# DeleteMemoryBPX/membpc/bpmc
Delete a memory breakpoint set using the SetMemoryBPX command.
## arguments
`[arg1]` Name or (base) address of the memory breakpoint to delete. If this argument is not specified, all memory breakpoints will be deleted.
## result
This command does not set any result variables.

View File

@ -0,0 +1,11 @@
# DisableBPX/bpd/bd
Disable a breakpoint set using the SetBPX command.
## arguments
`[arg1]` Name or address of the breakpoint to disable. If this argument is not specified, all breakpoints will be disabled.
## result
This command does not set any result variables.

View File

@ -0,0 +1,11 @@
# DisableExceptionBPX
Disable an exception breakpoint set using the SetExceptionBPX command.
## arguments
`[arg1]` Name, exception name or code of the exception breakpoint to enable. If this argument is not specified, all exception breakpoints will be disabled.
## result
This command does not set any result variables.

View File

@ -0,0 +1,11 @@
# DisableHardwareBreakpoint/bphd/bphwd
Disable a hardware breakpoint.
## arguments
`[arg1]` Address of the hardware breakpoint to disable. If this argument is not specified, all hardware breakpoints will be disabled.
## result
This command does not set any result variables.

View File

@ -0,0 +1,11 @@
# DisableMemoryBreakpoint/membpd/bpmd
Disable a memory breakpoint.
## arguments
`[arg1]` Address of the memory breakpoint to disable. If this argument is not specified, all memory breakpoints will be disabled.
## result
This command does not set any result variables.

View File

@ -0,0 +1,11 @@
# EnableBPX/bpe/be
Enable a breakpoint set using the SetBPX command.
## arguments
`[arg1]` Name or address of the breakpoint to enable. If this argument is not specified, all breakpoints will be enabled.
## result
This command does not set any result variables.

View File

@ -0,0 +1,11 @@
# EnableExceptionBPX
Enable an exception breakpoint set using the SetExceptionBPX command.
## arguments
`[arg1]` Name, exception name or code of the exception breakpoint to enable. If this argument is not specified, all exception breakpoints will be enabled.
## result
This command does not set any result variables.

View File

@ -0,0 +1,11 @@
# EnableHardwareBreakpoint/bphe/bphwe
Enable a previously disabled hardware breakpoint.
## arguments
`[arg1]` Address of the hardware breakpoint to enable. If this argument is not specified, as many as possible hardware breakpoints will be enabled.
## result
This command does not set any result variables.

View File

@ -0,0 +1,11 @@
# EnableMemoryBreakpoint/membpe/bpme
Enable a previously disabled memory breakpoint.
## arguments
`[arg1]` Address of the memory breakpoint to enable. If this argument is not specified, all memory breakpoints will be enabled.
## result
This command does not set any result variables.

View File

@ -0,0 +1,11 @@
# LibrarianDisableBreakpoint/bpddll
Enable a DLL breakpoint set using the LibrarianSetBreakpoint command.
## arguments
`[arg1]` DLL Name of the DLL breakpoint to disable. If this argument is not specified, all DLL breakpoints will be disabled.
## result
This command does not set any result variables.

View File

@ -0,0 +1,11 @@
# LibrarianEnableBreakpoint/bpedll
Enable a DLL breakpoint set using the LibrarianSetBreakpoint command.
## arguments
`[arg1]` DLL Name of the DLL breakpoint to enable. If this argument is not specified, all DLL breakpoints will be enabled.
## result
This command does not set any result variables.

View File

@ -0,0 +1,11 @@
# LibrarianRemoveBreakpoint/bcdll
Remove a DLL breakpoint.
## arguments
`arg1` DLL Name to remove the breakpoint from.
## result
This command does not set any result variables.

View File

@ -0,0 +1,15 @@
# LibrarianSetBreakpoint/bpdll
Set a singleshoot breakpoint on DLL load/unload.
## arguments
`arg1` DLL Name to break on.
`[arg2]` `a` means on load and unload, `l` means on load, `u` means on unload. When not specified, x64dbg will break on both load and unload.
`[arg3]` When specified, the breakpoint will be singleshoot. When not specified the breakpoint will not be removed after it has been hit.
## result
This command does not set any result variables.

View File

@ -0,0 +1,15 @@
# SetBPX/bp/bpx
Set an INT3 (SHORT/LONG) or UD2 breakpoint and optionally assign a name to it.
## arguments
`arg1` Address to put a breakpoint on. This can be an API name.
`[arg2]` Name of the breakpoint, use quotation marks to include spaces. This name can be used by the EnableBPX, DisableBPX and DeleteBPX functions as alias, but is mainly intended to provide a single line of information about the currently-hit breakpoint. When arg2 equals to a valid type (arg3) the type is used and arg2 is ignored.
`[arg3]` Breakpoint type. Can be one of the following options in random order: "ss" (single shot breakpoint), "long" (CD03), "ud2" (0F0B) and "short" (CC). You can combine the "ss" option with one of the type options in one string. Example: "SetBPX 00401000,"entrypoint",ssud2" will set a single shot UD2 breakpoint at 00401000 with the name "entrypoint". When specifying no type or just the type "ss" the default type will be used. Per default this equals to the "short" type. You can change the default type using the "SetBPXOptions" command.
## result
This command does not any result variables.

View File

@ -0,0 +1,11 @@
# SetBPXOptions/bptype
Set the default type for the "SetBPX" command.
## arguments
`arg1` Default type. This can be "short" (CC), "long" (CD03) or "ud2" (0F0B). Type default type affects both NORMAL and SINGLESHOT breakpoints.
## result
This command does not set any result variables.

View File

@ -0,0 +1,13 @@
# SetExceptionBPX
Set an exception breakpoint. If an exception breakpoint is active, all the exceptions with the same chance and code will be captured as a breakpoint event and will not be handled by the default exception handling policy.
## arguments
`arg1` Exception name or code of the new exception breakpoint
`[arg2]` Chance. Set to `first`/`1` to capture first-chance exceptions, `second`/`2` to capture second-chance exceptions, `all`/`3` to capture all exceptions. Default value is `first`.
## result
This command does not any result variables.

View File

@ -0,0 +1,15 @@
# SetHardwareBreakpoint/bph/bphws
Set a hardware breakpoint (using debug registers).
## arguments
`arg1` Address of the hardware breakpoint.
`[arg2]` Hardware breakpoint type. Can be either 'r' (readwrite), 'w' (write) or 'x' (execute). When not specified, 'x' is assumed.
`[arg3]` Hardware breakpoint size. Can be either '1', '2', '4' or '8' (x64 only). Per default, '1' is assumed. The address you're putting the hardware breakpoint on must be aligned to the specified size.
## result
This command does not set any result variables.

View File

@ -0,0 +1,15 @@
# SetMemoryBPX/membp/bpm
Set a memory breakpoint (GUARD_PAGE) on the whole memory region the provided address is in.
## arguments
`arg1` Address of or inside a memory region that will be watched.
`[arg2]` 1/0 restore the memory breakpoint once it's hit? When this value is not equal to '1' or '0', it's assumed to be arg3. This means "bpm eax,r" would be the same command as: "bpm eax,0,r".
`[arg3]` Breakpoint type, it can be 'a' (read+write+execute) 'r' (read), 'w' (write) or 'x' (execute). Per default, it's 'a' (read+write+execute)
## result
This command does not set any result variables.

View File

@ -0,0 +1,15 @@
# SetMemoryRangeBPX/memrangebp/bpmrange
Set a memory breakpoint (GUARD_PAGE) on a specific memory range.
## arguments
`start` Start of the memory range.
`size` Size of the memory range.
`[type]` Breakpoint type, it can be 'a' (read+write+execute) 'r' (read), 'w' (write) or 'x' (execute). Per default, it's 'a' (read+write+execute). Append `ss` for a singleshot breakpoint (you can also use [SetMemoryBreakpointSingleshoot](../conditional-breakpoint-control/SetMemoryBreakpointSingleshoot.md) to do this).
## result
This command does not set any result variables.

View File

@ -0,0 +1,20 @@
# bpgoto
Configure the breakpoint so that when the program reaches it, the program will be directed to a new location. It is equivallent to the following commands:
```
SetBreakpointCondition arg1, 0
SetBreakpointCommand arg1, "CIP=arg2"
SetBreakpointCommandCondition arg1, 1
SetBreakpointFastResume arg1, 0
```
## arguments
`arg1` The address of the breakpoint.
`arg2` The new address to execute if the breakpoint is reached.
## results
This command does not set any result variables.

View File

@ -0,0 +1,21 @@
# bplist
Get a list of breakpoints. This list includes their state (enabled/disabled), their type, their address and (optionally) their names.
## arguments
This command has no arguments.
## result
This command does not set any result variables. A list entry has the following format:
STATE:TYPE:ADDRESS\[:NAME\]
STATEcan be 0 or 1. 0 means disabled, 1 means enabled. Only singleshoot and 'normal' breakpoints can be disabled.
TYPEcan be one of the following values: BP, SS, HW and GP. BP stands for a normal breakpoint (set using the SetBPX command), SS stands for SINGLESHOT, HW stands for HARDWARE and GP stand for Guard Page, the way of setting memory breakpoints.
ADDRESSis the breakpoint address, given in 32 and 64 bits for the x32 and x64 debugger respectively.
NAMEis the name assigned to the breakpoint.

View File

@ -0,0 +1,34 @@
Breakpoint Control
==================
This section contains breakpoint control (set/delete/enable/disable) commands.
**Context:**
.. toctree::
:maxdepth: 0
SetBPX
DeleteBPX
EnableBPX
DisableBPX
SetHardwareBreakpoint
DeleteHardwareBreakpoint
EnableHardwareBreakpoint
DisableHardwareBreakpoint
SetMemoryBPX
SetMemoryRangeBPX
DeleteMemoryBPX
EnableMemoryBreakpoint
DisableMemoryBreakpoint
LibrarianSetBreakpoint
LibrarianRemoveBreakpoint
LibrarianEnableBreakpoint
LibrarianDisableBreakpoint
SetExceptionBPX
DeleteExceptionBPX
EnableExceptionBPX
DisableExceptionBPX
bpgoto
bplist
SetBPXOptions

View File

@ -0,0 +1,11 @@
# GetBreakpointHitCount
Gets the hit counter of a software breakpoint.
## arguments
`arg1` The address of the breakpoint.
## result
`$result` will be set to the current value of the hit counter.

View File

@ -0,0 +1,11 @@
# GetExceptionBreakpointHitCount
Gets the hit counter of an exception breakpoint.
## arguments
`arg1` The name, exception name or code of the exception breakpoint.
## result
`$result` will be set to the current value of the hit counter.

View File

@ -0,0 +1,11 @@
# GetHardwareBreakpointHitCount
Gets the hit counter of a hardware breakpoint.
## arguments
`arg1` The address of the breakpoint.
## result
`$result` will be set to the current value of the hit counter.

View File

@ -0,0 +1,11 @@
# GetLibrarianBreakpointHitCount
Gets the hit counter of a librarian breakpoint.
## arguments
`arg1` The DLL name.
## result
`$result` will be set to the current value of the hit counter.

View File

@ -0,0 +1,11 @@
# GetMemoryBreakpointHitCount
Gets the hit counter of a memory breakpoint.
## arguments
`arg1` The address of the breakpoint.
## result
`$result` will be set to the current value of the hit counter.

View File

@ -0,0 +1,13 @@
# ResetBreakpointHitCount
Resets the hit counter of a software breakpoint.
## arguments
`arg1` The address of the breakpoint.
`[arg2]` The new hit count (zero when not specified).
## result
This command does not set any result variables.

View File

@ -0,0 +1,13 @@
# ResetExceptionBreakpointHitCount
Resets the hit counter of an exception breakpoint.
## arguments
`arg1` The name, exception code or name of the exception breakpoint.
`[arg2]` The new hit count (zero when not specified).
## result
This command does not set any result variables.

View File

@ -0,0 +1,13 @@
# ResetHardwareBreakpointHitCount
Resets the hit counter of a hardware breakpoint.
## arguments
`arg1` The address of the breakpoint.
`[arg2]` The new hit count (zero when not specified).
## result
This command does not set any result variables.

View File

@ -0,0 +1,13 @@
# ResetLibrarianBreakpointHitCount
Resets the hit counter of a librarian breakpoint.
## arguments
`arg1` The DLL name.
`[arg2]` The new hit count (zero when not specified).
## result
This command does not set any result variables.

Some files were not shown because too many files have changed in this diff Show More