Compare commits

Author SHA1 Message Date
Duncan Ogilvie cb62e2be70 Archive notice 2025-07-04 01:37:54 +02:00
Duncan Ogilvie c001166788 Update VisitType documentation 2025-06-19 13:17:43 +02:00
Duncan Ogilvie 9706dea1b3 Add DisplayType alias 2025-06-08 21:10:33 +02:00
jd wu 980700de51 winerrorname and ntstatusname 2025-04-06 16:55:44 +08:00
Torusrxxx 1c04f5a3d8 Fix broken link 2025-04-03 08:46:26 +00:00
jd wu 820de7621a Add AVX-512 documentation 2025-04-03 13:05:57 +08:00
Torusrxxx 69fb3b08a2 Add source.md into index 2025-03-28 10:28:36 +00:00
Tommy Jerry Mairo 2a59c0953b Reword the Source view document
- remove ambiguous pronoun in the document
2025-03-28 10:27:49 +00:00
Tommy Jerry Mairo bc28ed07f8 Document Source view 2025-03-28 10:27:49 +00:00
jd wu c09a67996c Document mulhi, popcnt and lzcnt 2025-03-20 21:48:00 +08:00
Duncan Ogilvie 2f698682d9 Update Formatting.md 2025-02-26 19:47:13 +01:00
Duncan Ogilvie 6b8468f54b Document SetMemoryRangeBPX command 2025-01-17 12:44:58 +01:00
Duncan Ogilvie f224394fd6 more 2024-12-16 23:07:23 +01:00
Duncan Ogilvie 7f37ab1f0b shorter 2024-12-16 21:56:10 +01:00
Duncan Ogilvie ebe36dca55 Add warning about hex numbers 2024-12-16 21:50:56 +01:00
Duncan Ogilvie 6720611815 Uncapitalize 2024-12-11 01:31:38 +01:00
Duncan Ogilvie 8bbb404a7b Add missing expression functions 2024-12-11 01:28:38 +01:00
Duncan Ogilvie 86408054f1 Migrate more documents from rst to markdown 2024-12-11 01:28:22 +01:00
Duncan Ogilvie 21e4e1de92 Update Expressions.rst 2024-12-03 17:22:08 +01:00
Torusrxxx f2a0cd7106 Update various documentation (#95)
* Update bswap.md

* Note about movdqu

* Update mul.md

* Update rol.md

* Update ror.md

* Update RunToUserCode.md
2024-07-27 10:25:44 +00:00
Duncan Ogilvie 092fd587e7 Update ConditionalBreakpoint.md 2024-05-01 07:01:41 +09:00
Duncan Ogilvie 9b3495a39a Clean up some of the documentation 2023-11-10 12:32:36 +01:00
torusrxxx 89d4c63b07 GuiOpenTraceFile 2023-09-19 22:09:58 +08:00
torusrxxx 55062b38ae Add isdebuggeefocused and rdtsc 2023-09-01 11:51:36 +08:00
Duncan Ogilvie 4990e3b382 Add documentation for ansi(addr) 2023-08-12 17:17:02 +02:00
Duncan Ogilvie bd07369a73 Improve searchability
Closes #90
2023-08-12 17:16:37 +02:00
Duncan Ogilvie 8fb54a2a57 Create .readthedocs.yaml
Closes #93
2023-08-12 17:08:21 +02:00
torusrxxx 2ea86a4d54 added some licenses, removed snowman 2023-08-02 11:16:49 +08:00
Duncan Ogilvie 84c7ea5b95 Merge pull request #92 from torusrxxx/master
Update movdqu, isdebuggerfocused and plugin APIs
2023-08-01 11:50:09 +02:00
torusrxxx 2cb98ee59a Update movdqu, isdebuggerfocused and plugin APIs 2023-07-29 18:39:36 +08:00
Duncan Ogilvie 1df823adac Update documentation for command condition 2023-06-09 23:55:06 +02:00
Duncan Ogilvie 4646da61f7 Clarify module syntax (thanks to laiyierjiangsu!)
Reference: https://github.com/x64dbg/x64dbg/issues/3081
2023-05-04 15:10:25 +02:00
Duncan Ogilvie 86ec68869b Add StepSystem and StepUser commands 2023-04-24 02:14:47 +02:00
Duncan Ogilvie 72552b99af Update var.md 2023-02-13 22:21:39 +01:00
Duncan Ogilvie 120986fbde Restructure some pages and add more examples where relevant 2023-01-25 11:39:19 +01:00
Duncan Ogilvie 0d5f16b209 Add documentation for the minidump command 2022-10-10 17:06:39 +02:00
Duncan Ogilvie fc6be1ac5d Add the Glossary to the introduction chapters 2022-07-29 15:09:47 +02:00
Duncan Ogilvie 1bb28db0c4 Update documentation for the recent changes to x64dbg 2022-07-20 01:52:04 +02:00
Duncan Ogilvie 551788b3fa Merge pull request #91 from mateussilva92/patch-1
Fix jxx descriptions
2022-07-13 00:30:52 +02:00
Mateus Silva f77e6ff7ae Fix jxx descriptions 2022-07-12 23:05:24 +01:00
Duncan Ogilvie dfd59984dc Change wording, see https://github.com/x64dbg/x64dbg/issues/2888 2022-06-20 21:50:07 +02:00
Duncan Ogilvie d38ca414a9 Update string formatting documentation 2022-06-19 01:46:45 +02:00
Duncan Ogilvie c752433847 Add user/system/module option to findallmem 2022-06-15 19:47:25 +02:00
Duncan Ogilvie 890f54d1fb Update expression function documentation 2022-04-11 00:54:04 +02:00
Duncan Ogilvie e52bc7dcc8 Merge pull request #89 from dwendt/intro-add-expressionfunctions
Add example for string-comparison conditional breakpoint
2022-03-13 22:03:02 +01:00
Ditmar Wendt f602bef96d Example for string-comparison conditional break 2022-03-13 13:48:12 -07:00
Duncan Ogilvie eef4421502 Merge pull request #88 from r3sus/patch-1
Update log.rst
2022-02-26 23:45:20 +01:00
r3sus e584695235 Update log.rst
fix formatting
2022-02-26 22:29:50 +03:00
torusrxxx dd0612e115 Clarify XMM, YMM, x87 and AVX-512 registers 2022-02-09 18:34:52 +08:00
clarkewd 51572d6bae Update Input.md 2022-02-08 10:09:34 -05:00
Duncan Ogilvie bd80c73609 Merge pull request #86 from clarkewd/patch-2
Clarify 64-bit register usage
2022-02-07 13:45:30 +01:00
Duncan Ogilvie 63b560aeb3 Removed some old stuff 2022-02-07 13:44:50 +01:00
Duncan Ogilvie 1275246e7c fix typo 2022-02-01 19:44:12 +01:00
Duncan Ogilvie 1067a6b55e Merge pull request #85 from clarkewd/patch-1
Clarify XMM/YMM usage and caveats
2022-02-01 11:08:03 +01:00
clarkewd 4a2e49a249 Clarify 64-bit register usage 2022-01-31 20:35:29 -05:00
clarkewd e7b999421c Clarify XMM/YMM usage and caveats 2022-01-31 20:27:32 -05:00
Duncan Ogilvie e7c83ae302 Merge pull request #84 from ruslangaripov/master 2022-01-25 10:50:56 +01:00
Ruslan Garipov d033f2927d Add "Dereferenced register" example
This adds new example to the ``String Formatting'' page.

It obvious that to dereference a register with Intel syntax, one should
use [eax] syntax.  But when I had tried that for first time I messed
something and got "Formatting error".  I then tried AT&T syntax, C
syntax, I even wrote a message to the Telegram group...  Therefore, I
believe such example would be helpful for someone like me.

Signed-off-by: Ruslan Garipov <[email protected]>
2022-01-25 10:35:57 +05:00
torusrxxx 1b33189d9e add floating point format function 2022-01-05 16:14:47 +08:00
Duncan Ogilvie 6741ed32a8 Use portable python distribution 2021-10-24 07:40:41 +02:00
119 changed files with 1354 additions and 753 deletions

No files matched your search

+2 -1
View File
@@ -1,2 +1,3 @@
_build*/ _build*/
*.chm *.chm
python-2.7.18.amd64.portable/
+23
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: 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: requirements.txt
+8 -2
View File
@@ -1,9 +1,15 @@
# This repository was moved to https://github.com/x64dbg/x64dbg/tree/development/docs
# docs # docs
Documentation repository for [x64dbg](http://x64dbg.com) at [Read the Docs](https://readthedocs.org/projects/x64dbg). Documentation repository for [x64dbg](http://x64dbg.com) at [Read the Docs](https://readthedocs.org/projects/x64dbg).
## Building ## Building
1. `pip install sphinx recommonmark==0.4.0 sphinx_rtd_theme==0.2.5b2` 1. Download https://github.com/x64dbg/docs/releases/download/python27-portable/python-2.7.18.amd64.portable.7z
2. Add `relpath = relpath.replace(os.path.sep, '/')` to `C:\Python27\Lib\site-packages\recommonmark\transform.py` line `63` 2. Extract to the `python-2.7.18.amd64.portable` folder
3. run `makechm.bat`. It will build the .CHM help file. 3. run `makechm.bat`. It will build the .CHM help file.
Note: The following patch was applied:
Add `relpath = relpath.replace(os.path.sep, '/')` after `C:\Python27\Lib\site-packages\recommonmark\transform.py` line `63`
+1 -1
View File
@@ -6,7 +6,7 @@ Set a memory breakpoint (GUARD_PAGE) on the whole memory region the provided add
`arg1` Address of or inside a memory region that will be watched. `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 '3', it's assumed to be arg3. This means "bpm eax,r" would be the same command as: "bpm eax,0,r". `[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) `[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)
@@ -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.
+1
View File
@@ -17,6 +17,7 @@ This section contains breakpoint control (set/delete/enable/disable) commands.
EnableHardwareBreakpoint EnableHardwareBreakpoint
DisableHardwareBreakpoint DisableHardwareBreakpoint
SetMemoryBPX SetMemoryBPX
SetMemoryRangeBPX
DeleteMemoryBPX DeleteMemoryBPX
EnableMemoryBreakpoint EnableMemoryBreakpoint
DisableMemoryBreakpoint DisableMemoryBreakpoint
+1 -1
View File
@@ -8,7 +8,7 @@ Initializes the debugger. This command will load the executable (do some basic c
`[arg2]` Commandline to create the process with. `[arg2]` Commandline to create the process with.
`[arg3]` Current folder (passed to the `CreateProcess` API). `[arg3]` Current folder (passed to the `CreateProcess` API) (this is also sometimes called 'working directory' or 'current directory')
## result ## result
+11
View File
@@ -0,0 +1,11 @@
# StepSystem/StepSystemInto
Step into until reaching a system module.
## arguments
This command has no arguments.
## results
This command does not set any result variables.
+11
View File
@@ -0,0 +1,11 @@
# StepUser/StepUserInto
Step into until reaching a user module.
## arguments
This command has no arguments.
## results
This command does not set any result variables.
+3 -1
View File
@@ -24,4 +24,6 @@ Debug Control
StepOut StepOut
eStepOut eStepOut
skip skip
InstrUndo InstrUndo
StepUser
StepSystem
+1 -1
View File
@@ -1,6 +1,6 @@
# bswap # bswap
Perform a `bswap` operation. Perform a `bswap` operation: The byte order of the destination is inverted, so the last byte becomes the first.
## arguments ## arguments
+2 -2
View File
@@ -1,4 +1,4 @@
# dec # dec
Decrease a value. Decrease a value.
@@ -8,4 +8,4 @@ Decrease a value.
## result ## result
This command does not set any result variables. This command does not set any result variables.
+6
View File
@@ -12,6 +12,7 @@ This section contains various commands that are used for calculations etc.
add add
sub sub
mul mul
mulhi
div div
and and
or or
@@ -24,8 +25,13 @@ This section contains various commands that are used for calculations etc.
shl shl
shr shr
sar sar
popcnt
lzcnt
push push
pop pop
test test
cmp cmp
mov mov
movdqu
vmovdqu
kmovd
+20
View File
@@ -0,0 +1,20 @@
# kmovd/kmovq
The `kmovd`/`kmovq` commands are used to access AVX-512 opmask registers `K0`-`K7`. These commands are only available when the computer and x64dbg version supports AVX-512.
The `kmovd` command copies a 32-bit value from an expression to an AVX-512 opmask register, or from an AVX-512 opmask register to a memory location, a general purpose register, or an opmask register.
If the destination is a 64-bit register, for example, an opmask register, then the 32-bit value is zero-extended to 64 bits.
The `kmovq` command copies a 64-bit value from an expression to an AVX-512 opmask register, or from an AVX-512 opmask register to a memory location, a general purpose register, or an opmask register.
If executed in 32-bit environment, then only memory locations in the form of `[address]` or opmask registers are supported as operands.
In 64-bit environment, all valid expressions can be used to calculate the value to be copied into the destination opmask register.
## arguments
`arg1` The destination operand.
`arg2` The source operand.
## result
This command does not set any result variables.
+11
View File
@@ -0,0 +1,11 @@
# lzcnt
Count the number of leading zeros of a value. If the value is 0, then the result is 64 on 64-bit platform and 32 on 32-bit platform.
## arguments
`arg1` Value.
## result
`arg1` is set to the number of leading zeros. Additionaly, the internal variable `$_EZ_FLAG` is set to 1 if `arg1` is 0, and set to 0 otherwise. The internal variable `$_BS_FLAG` is set to 0.
+1 -1
View File
@@ -4,7 +4,7 @@ Set a variable.
## arguments ## arguments
`arg1` Variable name (optionally prefixed with a $) to set. When the variable does not exist, it will be created. `arg1` Variable name (optionally prefixed with a $) to set. When the variable does not exist, it will be created. Note that SSE registers are not supported (Instead use [movdqu](movdqu.md) for SSE registers).
`arg2` Value to store in the variable. If you use `#11 22 33#` it will write the bytes `11 22 33` in the process memory at `arg1`. `arg2` Value to store in the variable. If you use `#11 22 33#` it will write the bytes `11 22 33` in the process memory at `arg1`.
+13
View File
@@ -0,0 +1,13 @@
# movdqu/movups/movupd
Read/write an XMM register. The source and destination operands can be either an XMM register, or a memory location. The value of destination operand will be set to source operand. When using a memory location, only the syntax `[addr]` is supported, where `addr` is an expression of the memory address. Unlike other commands, the size of operands are 16 bytes. MM/YMM/ZMM registers are not supported by this command, to access YMM/ZMM registers, use [`vmovdqu`](vmovdqu.md) command.
## arguments
`arg1` The destination operand.
`arg2` The source operand.
## result
This command does not set any result variables.
+1 -1
View File
@@ -1,6 +1,6 @@
# mul # mul
Multiply two values. Multiply two values and store the lower part of result into `arg1`.
## arguments ## arguments
+13
View File
@@ -0,0 +1,13 @@
# mulhi
Multiply two unsigned values and store the upper part of result into `arg1`.
## arguments
`arg1` Destination.
`arg2` Source.
## result
This command does not set any result variables.
+11
View File
@@ -0,0 +1,11 @@
# popcnt
Evaluate the population count of a value, that is, number of bits set to 1.
## arguments
`arg1` Value.
## result
`arg1` is set to the population count. Additionaly, the internal variable `$_EZ_FLAG` is set to 1 if `arg1` is 0, and set to 0 otherwise. The internal variable `$_BS_FLAG` is set to 0.
+1 -1
View File
@@ -1,6 +1,6 @@
# rol # rol
Binary ROL a value. Binary ROL (rotate left) a value.
## arguments ## arguments
+1 -1
View File
@@ -1,6 +1,6 @@
# ror # ror
Binary ROR a value. Binary ROR (rotate right) a value.
## arguments ## arguments
+13
View File
@@ -0,0 +1,13 @@
# vmovdqu/vmovups/vmovupd
Read/write a YMM/ZMM register. The source and destination operands can be either an YMM/ZMM register, or a memory location. The value of destination operand will be set to source operand. When using a memory location, only the syntax `[addr]` is supported, where `addr` is an expression of the memory address. Unlike other commands, the size of operands are 32 bytes for YMM registers and 64 bytes for ZMM registers. To access ZMM registers, the computer and x64dbg version must support AVX-512. To access XMM registers, use [`movdqu`](movdqu.md) command.
## arguments
`arg1` The destination operand.
`arg2` The source operand.
## result
This command does not set any result variables.
+1 -1
View File
@@ -6,7 +6,7 @@ Add an entry to the reference view. You need to call 'refinit' before using refa
`arg1` Address to put in the reference view. `arg1` Address to put in the reference view.
`arg2` Text to put after the address. You can use [String Formatting](../../introduction/Formatting.rst) here. `arg2` Text to put after the address. You can use [String Formatting](../../introduction/Formatting.md) here.
## result ## result
+1 -1
View File
@@ -1,4 +1,4 @@
# reget # refget
Retrieve the address of a reference. Retrieve the address of a reference.
+1 -1
View File
@@ -4,7 +4,7 @@ Initialize reference view for command usage.
## arguments ## arguments
`[arg1]` The title of the new reference view. You can use [String Formatting](../../introduction/Formatting.rst) here. `[arg1]` The title of the new reference view. You can use [String Formatting](../../introduction/Formatting.md) here.
## result ## result
+3 -1
View File
@@ -1,7 +1,9 @@
Commands Commands
======== ========
This is the documentation of x64dbg commands. Commands have the following format (notice the arguments are **comma separated**):
``command arg1, arg2, argN``
FAQ: FAQ:
+2 -1
View File
@@ -13,4 +13,5 @@ This section contains commands to manipulate memory inside the debuggee.
free free
getpagerights getpagerights
setpagerights setpagerights
savedata savedata
minidump
+11
View File
@@ -0,0 +1,11 @@
# minidump
Create a [minidump](https://learn.microsoft.com/en-us/windows/win32/debug/minidump-files) with full memory and handle information from the debuggee.
## arguments
`arg1` The filename of the `.dmp`.
## results
This command does not set any result variables.
+1 -1
View File
@@ -4,7 +4,7 @@ Save a memory region to disk.
## arguments ## arguments
`arg1` The filename. If you use `:memdump:` as name it will save a file as `memdump_pid_addr_size.bin` in the x64dbg directory. You can use [String Formatting](../../introduction/Formatting.rst) here. `arg1` The filename. If you use `:memdump:` as name it will save a file as `memdump_pid_addr_size.bin` in the x64dbg directory. You can use [String Formatting](../../introduction/Formatting.md) here.
`arg2` The address of the memory region. `arg2` The address of the memory region.
+1 -1
View File
@@ -6,7 +6,7 @@ Assemble an instruction.
`arg1` Address to place the assembled instruction at. `arg1` Address to place the assembled instruction at.
`arg2` Instruction text. You can use [String Formatting](../../introduction/Formatting.rst) here. `arg2` Instruction text. You can use [String Formatting](../../introduction/Formatting.md) here.
`[arg3]` When specified the remainder of the previous instruction will be filled with NOPs. `[arg3]` When specified the remainder of the previous instruction will be filled with NOPs.
+2 -2
View File
@@ -8,8 +8,8 @@ There are various branches that can react on the flags set by the `cmp` (and may
* branch if equal - `je`/`ife(q)`/`jz`/`ifz` * branch if equal - `je`/`ife(q)`/`jz`/`ifz`
* branch if smaller - `jb`/`ifb`/`jl`/`ifl` * branch if smaller - `jb`/`ifb`/`jl`/`ifl`
* branch if bigger - `ja`/`ifa`/`jg`/`ifg` * branch if bigger - `ja`/`ifa`/`jg`/`ifg`
* branch if bigger/equal - `jbe`/`ifbe(q)`/`jle`/`ifle(q)` * branch if smaller/equal - `jbe`/`ifbe(q)`/`jle`/`ifle(q)`
* branch if smaller/equal - `jae`/`ifae(q)`/`jge`/`ifge(q)` * branch if bigger/equal - `jae`/`ifae(q)`/`jge`/`ifge(q)`
arguments arguments
--------- ---------
+1 -1
View File
@@ -6,7 +6,7 @@ Put information in the log.
arguments arguments
--------- ---------
``[arg1]`` Format string (see :doc:`../../introduction/Formatting`). When not specified, a newline will be logged. When using a format string it is recommended to use quotes to avoid ambiguity with the ``;`` (command separator): ````log "{mem;8@rax}"````. ``[arg1]`` Format string (see :doc:`../../introduction/Formatting`). When not specified, a newline will be logged. When using a format string it is recommended to use quotes to avoid ambiguity with the ``;`` (command separator): ``log "{mem;8@rax}"``.
result result
------ ------
+1 -1
View File
@@ -4,7 +4,7 @@ Display a message box.
## arguments ## arguments
`arg1` Message box text. You can use [String Formatting](../../introduction/Formatting.rst) here. `arg1` Message box text. You can use [String Formatting](../../introduction/Formatting.md) here.
## result ## result
+1 -1
View File
@@ -4,7 +4,7 @@ Display a message box, asking the user to answer yes or no.
## arguments ## arguments
`arg1` Message box text. You can use [String Formatting](../../introduction/Formatting.rst) here. `arg1` Message box text. You can use [String Formatting](../../introduction/Formatting.md) here.
## result ## result
+1 -1
View File
@@ -6,7 +6,7 @@ Find a pattern in a memory page. If you want to find all occurrences of a patter
`arg1` The address to start searching from. Notice that the searching will stop when the end of the memory page this address resides in has been reached. This means you cannot search the complete process memory without enumerating the memory pages first. If you want to find all occurrences of a pattern in the entire memory map use [findallmem](./findallmem.md). `arg1` The address to start searching from. Notice that the searching will stop when the end of the memory page this address resides in has been reached. This means you cannot search the complete process memory without enumerating the memory pages first. If you want to find all occurrences of a pattern in the entire memory map use [findallmem](./findallmem.md).
`arg2` The byte pattern to search for. This byte pattern can contain wildcards (?) for example: `EB0?90??8D`. You can use [String Formatting](../../introduction/Formatting.rst) here. `arg2` The byte pattern to search for. This byte pattern can contain wildcards (?) for example: `EB0?90??8D`. You can use [String Formatting](../../introduction/Formatting.md) here.
`[arg3]` The size of the data to search in. Default is the size of the memory region. `[arg3]` The size of the data to search in. Default is the size of the memory region.
+15 -1
View File
@@ -6,7 +6,7 @@ Find all occurrences of a pattern in a memory page.
`arg1` The address to start searching from. Notice that the searching will stop when the end of the memory page this address resides in has been reached. This means you cannot search the complete process memory without enumerating the memory pages first. You can use [findallmem](./findallmem.md) to search for a pattern in the whole memory. `arg1` The address to start searching from. Notice that the searching will stop when the end of the memory page this address resides in has been reached. This means you cannot search the complete process memory without enumerating the memory pages first. You can use [findallmem](./findallmem.md) to search for a pattern in the whole memory.
`arg2` The byte pattern to search for. This byte pattern can contain wildcards (?) for example: `EB0?90??8D`. You can use [String Formatting](../../introduction/Formatting.rst) here. `arg2` The byte pattern to search for. This byte pattern can contain wildcards (?) for example: `EB0?90??8D`. You can use [String Formatting](../../introduction/Formatting.md) here.
`[arg3]` The size of the data to search in. Default is the size of the memory region. `[arg3]` The size of the data to search in. Default is the size of the memory region.
@@ -27,3 +27,17 @@ Search for all occurences of the value of cax in the stack memory page:
``` ```
findall mem.base(csp), "{bswap@cax}" findall mem.base(csp), "{bswap@cax}"
``` ```
## remarks
The contents of the reference view can be iterated in a script with the `ref.addr` [expression function](../../introduction/Expression-functions.md):
```
i = 0
loop:
addr = ref.addr(i)
log "reference {d:i} = {p:addr}"
i++
cmp i, ref.count()
jne loop
```
+18 -2
View File
@@ -6,10 +6,26 @@ Find all occurrences of a pattern in the entire memory map.
`arg1` The address to start searching from. `arg1` The address to start searching from.
`arg2` The byte pattern to search for. This byte pattern can contain wildcards (?) for example: `EB0?90??8D`. You can use [String Formatting](../../introduction/Formatting.rst) here. `arg2` The byte pattern to search for. This byte pattern can contain wildcards (?) for example: `EB0?90??8D`. You can use [String Formatting](../../introduction/Formatting.md) here.
`[arg3]` The size of the data to search in. Default is the entire memory map. `[arg3]` The size of the data to search in. Default is the entire memory map (`-1`).
`[arg4]` Set to `user`/`system`/`module` to only include (user/system) modules in the search.
## result ## result
`$result` is set to the number of occurrences. `$result` is set to the number of occurrences.
## remarks
The contents of the reference view can be iterated in a script with the `ref.addr` [expression function](../../introduction/Expression-functions.md):
```
i = 0
loop:
addr = ref.addr(i)
log "reference {d:i} = {p:addr}"
i++
cmp i, ref.count()
jne loop
```
+16 -2
View File
@@ -4,7 +4,7 @@ Find assembled instruction.
## arguments ## arguments
`arg1` Instruction to look for (make sure to use quoted "mov eax, ebx" to ensure you actually search for that instruction). You can use [String Formatting](../../introduction/Formatting.rst) here. `arg1` Instruction to look for (make sure to use quoted "mov eax, ebx" to ensure you actually search for that instruction). You can use [String Formatting](../../introduction/Formatting.md) here.
`[arg2]` Address of/inside a memory page to look in. When not specified CIP will be used. `[arg2]` Address of/inside a memory page to look in. When not specified CIP will be used.
@@ -12,4 +12,18 @@ Find assembled instruction.
## result ## result
The $result variable is set to the number of references found. The `$result` variable is set to the number of references found.
## remarks
The contents of the reference view can be iterated in a script with the `ref.addr` [expression function](../../introduction/Expression-functions.md):
```
i = 0
loop:
addr = ref.addr(i)
log "reference {d:i} = {p:addr}"
i++
cmp i, ref.count()
jne loop
```
+15 -1
View File
@@ -12,4 +12,18 @@ Find references to GUID. The referenced GUID must be registered in the system, o
## results ## results
Set `$result` to `1` if any GUID is found, `0` otherwise. Set `$result` to `1` if any GUID is found, `0` otherwise.
## remarks
The contents of the reference view can be iterated in a script with the `ref.addr` [expression function](../../introduction/Expression-functions.md):
```
i = 0
loop:
addr = ref.addr(i)
log "reference {d:i} = {p:addr}"
i++
cmp i, ref.count()
jne loop
```
+14
View File
@@ -11,3 +11,17 @@ Find all inter-modular calls.
## result ## result
The `$result` variable is set to the number of inter-modular calls found. The `$result` variable is set to the number of inter-modular calls found.
## remarks
The contents of the reference view can be iterated in a script with the `ref.addr` [expression function](../../introduction/Expression-functions.md):
```
i = 0
loop:
addr = ref.addr(i)
log "reference {d:i} = {p:addr}"
i++
cmp i, ref.count()
jne loop
```
+15 -1
View File
@@ -12,4 +12,18 @@ Find references to a certain value.
## result ## result
The $result variable is set to the number of references found. The `$result` variable is set to the number of references found.
## remarks
The contents of the reference view can be iterated in a script with the `ref.addr` [expression function](../../introduction/Expression-functions.md):
```
i = 0
loop:
addr = ref.addr(i)
log "reference {d:i} = {p:addr}"
i++
cmp i, ref.count()
jne loop
```
+14
View File
@@ -15,3 +15,17 @@ Find references to a certain range of values.
## result ## result
The `$result` variable is set to the number of references found. The `$result` variable is set to the number of references found.
## remarks
The contents of the reference view can be iterated in a script with the `ref.addr` [expression function](../../introduction/Expression-functions.md):
```
i = 0
loop:
addr = ref.addr(i)
log "reference {d:i} = {p:addr}"
i++
cmp i, ref.count()
jne loop
```
+15 -1
View File
@@ -10,4 +10,18 @@ Find referenced text strings.
## result ## result
The $result variable is set to the number of string references found. The `$result` variable is set to the number of string references found.
## remarks
The contents of the reference view can be iterated in a script with the `ref.addr` [expression function](../../introduction/Expression-functions.md):
```
i = 0
loop:
addr = ref.addr(i)
log "reference {d:i} = {p:addr}"
i++
cmp i, ref.count()
jne loop
```
+2
View File
@@ -2,6 +2,8 @@
Run until user code is reached. It is equivallent to `RunToParty 0`. Run until user code is reached. It is equivallent to `RunToParty 0`.
This command sets temporary memory breakpoints on all user code pages, rather than single stepping. It fails when another RunToUserCode command is already executing, because the temporary memory breakpoints are already set.
## arguments ## arguments
This command has no arguments. This command has no arguments.
+2 -2
View File
@@ -1,6 +1,6 @@
# StartRunTrace/opentrace # StartTraceRecording/StartRunTrace/opentrace
Start recording a run trace with a specified file. The file will also be opened in the trace view. Note you need to use [TraceIntoConditional](./TraceIntoConditional.md) or other command to actually trace the program. Start recording a trace to the specified file. The file will also be opened in the trace view. Note you need to use [TraceIntoConditional](./TraceIntoConditional.md) or other command to actually trace the program and record instructions.
## arguments ## arguments
+2 -2
View File
@@ -1,6 +1,6 @@
# StopRunTrace/tc # StopTraceRecording/StopRunTrace/tc
Stops recording a run trace and closes file. Stops trace recording and closes the file.
## arguments ## arguments
@@ -1,8 +1,8 @@
# TraceIntoBeyondTraceRecord/tibt # TraceIntoBeyondTraceCoverage/TraceIntoBeyondTraceRecord/tibt
Perform [StepInto](StepInto.md) until the program reaches somewhere outside the trace record. This is similar to `ticnd tr.hitcount(cip)==0&&arg1, arg2` except that it achieves higher performance by avoiding the expression function invocation. Perform [StepInto](StepInto.md) until the program reaches somewhere outside the trace coverage. This is similar to `ticnd tr.hitcount(cip)==0&&arg1, arg2` except that it achieves higher performance by avoiding the expression function invocation.
Usage example: If you want to find out the forking point of the program when different inputs are provided, first enable or re-enable trace record to clean trace record data. Usage example: If you want to find out the forking point of the program when different inputs are provided, first enable or re-enable trace coverage to clean trace coverage data.
Then you trace while input A is provided. Finally you provide input B and execute `TraceIntoBeyondTraceRecord` command. The program will be paused where the instruction is never executed before. Then you trace while input A is provided. Finally you provide input B and execute `TraceIntoBeyondTraceRecord` command. The program will be paused where the instruction is never executed before.
## arguments ## arguments
+2 -2
View File
@@ -1,6 +1,6 @@
# TraceIntoIntoTraceRecord/tiit # TraceIntoIntoTraceCoverage/TraceIntoIntoTraceRecord/tiit
Perform StepInto until the program reaches somewhere inside the trace record. Perform StepInto until the program reaches somewhere inside the trace coverage.
## arguments ## arguments
@@ -1,6 +1,6 @@
# TraceOverBeyondTraceRecord/tobt # TraceOverBeyondTraceCoverage,TraceOverBeyondTraceRecord/tobt
Perform StepOver until the program reaches somewhere outside the trace record. Perform StepOver until the program reaches somewhere outside the trace coverage.
## arguments ## arguments
+2 -2
View File
@@ -1,6 +1,6 @@
# TraceOverIntoTraceRecord/toit # TraceOverIntoTraceCoverage/TraceOverIntoTraceRecord/toit
Perform StepOver until the program reaches somewhere inside the trace record. Perform StepOver until the program reaches somewhere inside the trace coverage.
## arguments ## arguments
+6 -4
View File
@@ -1,14 +1,16 @@
# VisitType # VisitType/DisplayType/dt
Visit a type and print its members. Display a type and print its members in the struct view.
## arguments ## arguments
`arg1` The type to visit. `arg1` The type to display.
`[arg2]` Address to print from. If not specified (or zero) the type will be printed without values. `[arg2]` Address to print from. If not specified (or zero) the type will be printed without values.
`[arg3]` Maximum pointer resolution depth (default is 0). This can be used to also display structures (and values) pointed to by members of the type you are visiting. `[arg3]` Maximum pointer resolution depth. This can be used to also display structures (and values) pointed to by members of the type you are visiting. If not specified or negative, it will default to 2 (configurable with `[Engine].DefaultTypePtrDepth`).
`[arg4]` Name of the variable. If not specified it will default to an empty string.
## result ## result
+15 -1
View File
@@ -8,4 +8,18 @@ This command has no arguments.
## result ## result
$resultwill be set to the number of user-defined arguments. `$result` will be set to the number of user-defined arguments.
## remarks
The contents of the reference view can be iterated in a script with the `ref.addr` [expression function](../../introduction/Expression-functions.md):
```
i = 0
loop:
addr = ref.addr(i)
log "reference {d:i} = {p:addr}"
i++
cmp i, ref.count()
jne loop
```
+15 -1
View File
@@ -8,4 +8,18 @@ This command has no arguments.
## result ## result
$resultwill be set to the number of user-defined bookmarks. `$result` will be set to the number of user-defined bookmarks.
## remarks
The contents of the reference view can be iterated in a script with the `ref.addr` [expression function](../../introduction/Expression-functions.md):
```
i = 0
loop:
addr = ref.addr(i)
log "reference {d:i} = {p:addr}"
i++
cmp i, ref.count()
jne loop
```
+15 -1
View File
@@ -8,4 +8,18 @@ This command has no arguments.
## result ## result
$resultwill be set to the number of user-defined comments. `$result` will be set to the number of user-defined comments.
## remarks
The contents of the reference view can be iterated in a script with the `ref.addr` [expression function](../../introduction/Expression-functions.md):
```
i = 0
loop:
addr = ref.addr(i)
log "reference {d:i} = {p:addr}"
i++
cmp i, ref.count()
jne loop
```
+15 -1
View File
@@ -8,4 +8,18 @@ This command has no arguments.
## result ## result
$resultwill be set to the number of user-defined functions. `$result` will be set to the number of user-defined functions.
## remarks
The contents of the reference view can be iterated in a script with the `ref.addr` [expression function](../../introduction/Expression-functions.md):
```
i = 0
loop:
addr = ref.addr(i)
log "reference {d:i} = {p:addr}"
i++
cmp i, ref.count()
jne loop
```
+15 -1
View File
@@ -8,4 +8,18 @@ This command has no arguments.
## result ## result
$resultwill be set to the number of user-defined labels. `$result` will be set to the number of user-defined labels.
## remarks
The contents of the reference view can be iterated in a script with the `ref.addr` [expression function](../../introduction/Expression-functions.md):
```
i = 0
loop:
addr = ref.addr(i)
log "reference {d:i} = {p:addr}"
i++
cmp i, ref.count()
jne loop
```
+1 -1
View File
@@ -6,7 +6,7 @@ Set a label.
`arg1` Address to set the label at (preferably inside a module). `arg1` Address to set the label at (preferably inside a module).
`arg2` Label text. You can use [String Formatting](../../introduction/Formatting.rst) here. `arg2` Label text. You can use [String Formatting](../../introduction/Formatting.md) here.
## result ## result
+2
View File
@@ -2,6 +2,8 @@
Declare a new variable. Declare a new variable.
**Note**: You should not use this command under normal circumstances. If you want to create a variable you can do so with `myvar = 42`.
## arguments ## arguments
`arg1` Variable name (will be prefixed with '$' if not done). `arg1` Variable name (will be prefixed with '$' if not done).
+1 -1
View File
@@ -89,7 +89,7 @@ language = None
# List of patterns, relative to source directory, that match files and # List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files. # directories to ignore when looking for source files.
# This patterns also effect to html_static_path and html_extra_path # This patterns also effect to html_static_path and html_extra_path
exclude_patterns = ['_build*', 'Thumbs.db', '.DS_Store', 'README.md', '.git'] exclude_patterns = ['_build*', 'Thumbs.db', '.DS_Store', 'README.md', '.git', 'python-2.7.18.amd64.portable']
# The reST default role (used for this markup: `text`) to use for all # The reST default role (used for this markup: `text`) to use for all
# documents. # documents.
+30 -30
View File
@@ -1,30 +1,30 @@
# DbgMemGetPageSize # DbgMemGetPageSize
Function description. Function description.
```c++ ```c++
Function definition. Function definition.
``` ```
## Parameters ## Parameters
`param1` Parameter description. `param1` Parameter description.
## Return Value ## Return Value
Return value description. Return value description.
## Example ## Example
Get page base and size of selected instruction. Get page base and size of selected instruction.
```c++ ```c++
SELECTIONDATA sel; // Define Address the slected line in the Disassembly window ( begin , End ) SELECTIONDATA sel; // Define Address the slected line in the Disassembly window ( begin , End )
GuiSelectionGet(GUI_DISASSEMBLY, &sel); // Get the value of sel(begin addr , End addr ) GuiSelectionGet(GUI_DISASSEMBLY, &sel); // Get the value of sel(begin addr , End addr )
duint pagesize = DbgMemGetPageSize(sel.start); // get the page size of the section from the selected memory addr duint pagesize = DbgMemGetPageSize(sel.start); // get the page size of the section from the selected memory addr
//Or use the following statement to get page base and size in one call. //Or use the following statement to get page base and size in one call.
duint sctionbase = DbgMemFindBaseAddr(sel.start, &pagesize); // get the base of this section ( begin addr of the section ) duint sctionbase = DbgMemFindBaseAddr(sel.start, &pagesize); // get the base of this section ( begin addr of the section )
``` ```
## Related functions ## Related functions
- List of related functions - List of related functions
@@ -8,7 +8,7 @@ duint DbgValFromString(const char* string);
## Parameters ## Parameters
`string` The [expression](../../../introduction/Expressions.rst) to evaluate in UTF-8 encoding. `string` The [expression](../../../introduction/Expressions.md) to evaluate in UTF-8 encoding.
## Return Value ## Return Value
+33 -32
View File
@@ -1,32 +1,33 @@
# GuiGetDebuggeeNotes # GuiGetDebuggeeNotes
Returns into a variable a pointer to a string containing notes and information that a user has made relating to the target being debugged (the debuggee). The function GuiGetGlobalNotes can be used to get the global notes stored by a user. Returns into a variable a pointer to a string containing notes and information that a user has made relating to the target being debugged (the debuggee). The function GuiGetGlobalNotes can be used to get the global notes stored by a user.
```c++ ```c++
void GuiGetDebuggeeNotes(char** text) void GuiGetDebuggeeNotes(char** text)
``` ```
## Parameters ## Parameters
`text` A variable that will contain a pointer to a buffer on return. The pointer returned points to a string that will contain the notes for the debuggee. `text` A variable that will contain a pointer to a buffer on return. The pointer returned points to a string that will contain the notes for the debuggee.
## Return Value ## Return Value
This function does not return a value. The string containing the notes is returned via the pointer supplied via the `text` parameter. This function does not return a value. The string containing the notes is returned via the pointer supplied via the `text` parameter.
## Example ## Example
```c++ ```c++
char* text = nullptr; char* text = nullptr;
GuiGetDebuggeeNotes(&text); GuiGetDebuggeeNotes(&text);
if(text) if(text)
{ {
// do something with text // do something with text
} BridgeFree(text);
``` }
```
## Related functions
## Related functions
- [GuiSetDebuggeeNotes](./GuiSetDebuggeeNotes.md)
- [GuiGetGlobalNotes](./GuiGetGlobalNotes.md) - [GuiSetDebuggeeNotes](./GuiSetDebuggeeNotes.md)
- [GuiSetGlobalNotes](./GuiSetGlobalNotes.md) - [GuiGetGlobalNotes](./GuiGetGlobalNotes.md)
- [GuiSetGlobalNotes](./GuiSetGlobalNotes.md)
+33 -32
View File
@@ -1,32 +1,33 @@
# GuiGetGlobalNotes # GuiGetGlobalNotes
Returns into a variable a pointer to a string containing global notes and information that a user has made. The function GuiGetDebuggeeNotes can be used to get the local notes stored by a user for the target being debugged (the debuggee). Returns into a variable a pointer to a string containing global notes and information that a user has made. The function GuiGetDebuggeeNotes can be used to get the local notes stored by a user for the target being debugged (the debuggee).
```c++ ```c++
void GuiGetGlobalNotes(char** text) void GuiGetGlobalNotes(char** text)
``` ```
## Parameters ## Parameters
`text` A variable that will contain a pointer to a buffer on return. The pointer returned points to a string that will contain the global notes. `text` A variable that will contain a pointer to a buffer on return. The pointer returned points to a string that will contain the global notes.
## Return Value ## Return Value
This function does not return a value. The string containing the notes is returned via the pointer supplied via the `text` parameter. This function does not return a value. The string containing the notes is returned via the pointer supplied via the `text` parameter.
## Example ## Example
```c++ ```c++
char* text = nullptr; char* text = nullptr;
GuiGetGlobalNotes(&text); GuiGetGlobalNotes(&text);
if(text) if(text)
{ {
// do something with text // do something with text
} BridgeFree(text);
``` }
```
## Related functions
## Related functions
- [GuiSetGlobalNotes](./GuiSetGlobalNotes.md)
- [GuiGetDebuggeeNotes](./GuiGetDebuggeeNotes.md) - [GuiSetGlobalNotes](./GuiSetGlobalNotes.md)
- [GuiSetDebuggeeNotes](./GuiSetDebuggeeNotes.md) - [GuiGetDebuggeeNotes](./GuiGetDebuggeeNotes.md)
- [GuiSetDebuggeeNotes](./GuiSetDebuggeeNotes.md)
@@ -0,0 +1,16 @@
# GuiOpenTraceFile
Open a run trace file (*.trace32 or *.trace64 file) in the trace view.
```c++
void GuiOpenTraceFile(const char* fileName);
```
## Parameters
`fileName` Path to the run trace file.
## Return Value
This function does not return a value.
+31 -31
View File
@@ -1,31 +1,31 @@
# GuiSetGlobalNotes # GuiSetGlobalNotes
Sets the global notes, based on the text variable passed to the function. The text variable is a pointer to a string containing the information to set as the global notes. Sets the global notes, based on the text variable passed to the function. The text variable is a pointer to a string containing the information to set as the global notes.
```c++ ```c++
void GuiSetGlobalNotes(char** text) void GuiSetGlobalNotes(char** text)
``` ```
## Parameters ## Parameters
`text` A variable that contains a pointer to a string that contains the text to set as the global notes. `text` A variable that contains a pointer to a string that contains the text to set as the global notes.
## Return Value ## Return Value
This function does not return a value. This function does not return a value.
## Example ## Example
```c++ ```c++
notesFile = String(szProgramDir) + "\\notes.txt"; notesFile = String(szProgramDir) + "\\notes.txt";
String text; String text;
if(!FileExists(notesFile.c_str()) || FileHelper::ReadAllText(notesFile, text)) if(!FileExists(notesFile.c_str()) || FileHelper::ReadAllText(notesFile, text))
GuiSetGlobalNotes(text.c_str()); GuiSetGlobalNotes(text.c_str());
``` ```
## Related functions ## Related functions
- [GuiGetGlobalNotes](./GuiGetGlobalNotes.md) - [GuiGetGlobalNotes](./GuiGetGlobalNotes.md)
- [GuiGetDebuggeeNotes](./GuiGetDebuggeeNotes.md) - [GuiGetDebuggeeNotes](./GuiGetDebuggeeNotes.md)
- [GuiSetDebuggeeNotes](./GuiSetDebuggeeNotes.md) - [GuiSetDebuggeeNotes](./GuiSetDebuggeeNotes.md)
@@ -1,47 +1,47 @@
# GuiSymbolUpdateModuleList # GuiSymbolUpdateModuleList
Refreshes the symbol view modules list. Refreshes the symbol view modules list.
```c++ ```c++
void GuiSymbolUpdateModuleList(int count, SYMBOLMODULEINFO* modules) void GuiSymbolUpdateModuleList(int count, SYMBOLMODULEINFO* modules)
``` ```
## Parameters ## Parameters
`count` An integer representing the number of symbol module's to update. `count` An integer representing the number of symbol module's to update.
`modules` A SYMBOLMODULEINFO variable that will hold the symbol module information. `modules` A SYMBOLMODULEINFO variable that will hold the symbol module information.
## Return Value ## Return Value
This function does not return a value. This function does not return a value.
## Example ## Example
```c++ ```c++
// Build the vector of modules // Build the vector of modules
std::vector<SYMBOLMODULEINFO> modList; std::vector<SYMBOLMODULEINFO> modList;
if(!SymGetModuleList(&modList)) if(!SymGetModuleList(&modList))
{ {
GuiSymbolUpdateModuleList(0, nullptr); GuiSymbolUpdateModuleList(0, nullptr);
return; return;
} }
// Create a new array to be sent to the GUI thread // Create a new array to be sent to the GUI thread
size_t moduleCount = modList.size(); size_t moduleCount = modList.size();
SYMBOLMODULEINFO* data = (SYMBOLMODULEINFO*)BridgeAlloc(moduleCount * sizeof(SYMBOLMODULEINFO)); SYMBOLMODULEINFO* data = (SYMBOLMODULEINFO*)BridgeAlloc(moduleCount * sizeof(SYMBOLMODULEINFO));
// Direct copy from std::vector data // Direct copy from std::vector data
memcpy(data, modList.data(), moduleCount * sizeof(SYMBOLMODULEINFO)); memcpy(data, modList.data(), moduleCount * sizeof(SYMBOLMODULEINFO));
// Send the module data to the GUI for updating // Send the module data to the GUI for updating
GuiSymbolUpdateModuleList((int)moduleCount, data); GuiSymbolUpdateModuleList((int)moduleCount, data);
``` ```
## Related functions ## Related functions
- [GuiSymbolLogAdd](./GuiSymbolLogAdd.md) - [GuiSymbolLogAdd](./GuiSymbolLogAdd.md)
- [GuiSymbolLogClear](./GuiSymbolLogClear.md) - [GuiSymbolLogClear](./GuiSymbolLogClear.md)
- [GuiSymbolRefreshCurrent](./GuiSymbolRefreshCurrent.md) - [GuiSymbolRefreshCurrent](./GuiSymbolRefreshCurrent.md)
- [GuiSymbolSetProgress](./GuiSymbolSetProgress.md) - [GuiSymbolSetProgress](./GuiSymbolSetProgress.md)
+1
View File
@@ -37,6 +37,7 @@ This section contains information about the Graphical User Interface GUI functio
GuiMenuClear GuiMenuClear
GuiMenuSetEntryIcon GuiMenuSetEntryIcon
GuiMenuSetIcon GuiMenuSetIcon
GuiOpenTraceFile
GuiReferenceAddColumn GuiReferenceAddColumn
GuiReferenceDeleteAllColumns GuiReferenceDeleteAllColumns
GuiReferenceGetCellContent GuiReferenceGetCellContent
+2 -1
View File
@@ -4,6 +4,8 @@ The x64dbg can be automated and extended in various ways: by the use of x64dbg s
This section contains documentation intended to help developers to write code related to this program. This section contains documentation intended to help developers to write code related to this program.
**Notice:** It is easy to compile x64dbg. If you find it is more interesting in working directly on x64dbg source code to add your new features, don't forget to share it with us on Github, as required by GPLv3 licence of x64dbg, so that everyone can benefit from a better x64dbg. It will also ensure your code won't suddenly break due to incompatible changes made by x64dbg team who don't know your work.
**Contents:** **Contents:**
.. toctree:: .. toctree::
@@ -12,4 +14,3 @@ This section contains documentation intended to help developers to write code re
plugins/index plugins/index
functions/index functions/index
tracefile tracefile
+3 -1
View File
@@ -3,7 +3,9 @@ _plugin_debugpause
================== ==================
This function returns debugger control to the user. You would use this function when you write an unpacker that needs support from x64dbg (for example in development). Calling this function will set the debug state to 'paused' and it will not return until the user runs the debuggee using the `run` command . This function returns debugger control to the user. You would use this function when you write an unpacker that needs support from x64dbg (for example in development). Calling this function will set the debug state to 'paused' and it will not return until the user runs the debuggee using the `run` command .
`void _plugin_debugpause();` ::
void _plugin_debugpause();
---------- ----------
Parameters Parameters
@@ -6,7 +6,7 @@ This function returns sets if the debugger should skip first-chance exceptions.
:: ::
void _plugin_debugskipexceptions( void _plugin_debugskipexceptions(
bool skip //skip flag bool skip //skip flag
); );
---------- ----------
+3 -3
View File
@@ -5,9 +5,9 @@ This function allows you to hash some data. It is used by x64dbg in various plac
:: ::
bool _plugin_hash( duint _plugin_hash(
const void* data, //data to hash const void* data, //data to hash
duint size //size (in bytes) of the data to hash duint size //size (in bytes) of the data to hash
); );
---------- ----------
+9 -3
View File
@@ -9,18 +9,24 @@ This section contains information about the `_plugin_` prefixed functions export
debugpause debugpause
debugskipexceptions debugskipexceptions
hash
logprintf logprintf
logputs logputs
menuadd menuadd
menuaddentry menuaddentry
menuaddseparator menuaddseparator
menuclear menuclear
menuentryseticon
menuentrysetchecked menuentrysetchecked
menuentryseticon
menuseticon menuseticon
registercallback registercallback
registercommand registercommand
registerexprfunction
registerexprfunctionex
registerformatfunction
startscript
unregistercallback unregistercallback
unregistercommand unregistercommand
waituntilpaused unregisterexprfunction
hash unregisterformatfunction
waituntilpaused
+2 -2
View File
@@ -7,8 +7,8 @@ This function prints a message to the log window.
:: ::
void _plugin_logprintf( void _plugin_logprintf(
const char* format, //format string const char* format, //format string
... //additional arguments ... //additional arguments
); );
---------- ----------
+1 -1
View File
@@ -6,7 +6,7 @@ This function prints a single line to the log window.
:: ::
void _plugin_logputs( void _plugin_logputs(
const char* text //text to print const char* text //text to print
); );
---------- ----------
+2 -2
View File
@@ -6,8 +6,8 @@ This function adds a new child menu to a menu.
:: ::
int _plugin_menuadd( int _plugin_menuadd(
int hMenu, //menu handle to add the new child menu to int hMenu, //menu handle to add the new child menu to
const char* title //child menu title const char* title //child menu title
); );
---------- ----------
+3 -3
View File
@@ -6,9 +6,9 @@ This function adds a menu entry to a menu.
:: ::
bool _plugin_menuaddentry( bool _plugin_menuaddentry(
int hMenu, //menu handle to add the new child menu to int hMenu, //menu handle to add the new child menu to
int hEntry, //plugin-wide identifier for the menu entry int hEntry, //plugin-wide identifier for the menu entry
const char* title //menu entry title const char* title //menu entry title
); );
Parameters Parameters
+1 -1
View File
@@ -6,7 +6,7 @@ This function adds a new child menu to a menu.
:: ::
bool _plugin_menuaddseparator( bool _plugin_menuaddseparator(
int hMenu //menu handle to add the separator to int hMenu //menu handle to add the separator to
); );
Parameters Parameters
+2 -2
View File
@@ -4,8 +4,8 @@ This function removes all entries and child menus from a menu. It will not remov
:: ::
bool _plugin_menuclear ( bool _plugin_menuclear(
int hMenu //menu handle of the menu to clear int hMenu //menu handle of the menu to clear
); );
Parameters Parameters
@@ -4,10 +4,10 @@ This function sets the checked state of a menu entry. Notice that this function
:: ::
void _plugin_menuentrysetchecked ( void _plugin_menuentrysetchecked(
int pluginHandle, //plugin handle int pluginHandle, //plugin handle
int hEntry, //handle of the menu entry int hEntry, //handle of the menu entry
bool checked //new checked state bool checked //new checked state
); );
Parameters Parameters
+4 -4
View File
@@ -4,10 +4,10 @@ This function sets an icon to a menu entry.
:: ::
void _plugin_menuentryseticon ( void _plugin_menuentryseticon(
int pluginHandle, //plugin handle int pluginHandle, //plugin handle
int hEntry, //handle of the menu entry int hEntry, //handle of the menu entry
const ICONDATA* icon //icon data const ICONDATA* icon //icon data
); );
Parameters Parameters
+3 -3
View File
@@ -4,9 +4,9 @@ This function sets an icon to a menu.
:: ::
void _plugin_menuseticon ( void _plugin_menuseticon(
int hMenu, //handle of the menu int hMenu, //handle of the menu
const ICONDATA* icon //icon data const ICONDATA* icon //icon data
); );
Parameters Parameters
+3 -3
View File
@@ -6,9 +6,9 @@ This function registers an event callback for a plugin. Every plugin can have it
:: ::
void _plugin_registercallback( void _plugin_registercallback(
int pluginHandle, //plugin handle int pluginHandle, //plugin handle
CBTYPE cbType, //event type CBTYPE cbType, //event type
CBPLUGIN cbPlugin //callback function CBPLUGIN cbPlugin //callback function
); );
---------- ----------
+38 -38
View File
@@ -1,38 +1,38 @@
======================= =======================
_plugin_registercommand _plugin_registercommand
======================= =======================
This function registers a command for usage inside scripts or the command bar. This function registers a command for usage inside scripts or the command bar.
:: ::
bool _plugin_registercommand( bool _plugin_registercommand(
int pluginHandle, //plugin handle int pluginHandle, //plugin handle
const char* command, //command name const char* command, //command name
CBPLUGINCOMMAND cbCommand, //function that is called when the command is executed CBPLUGINCOMMAND cbCommand, //function that is called when the command is executed
bool debugonly //restrict the command to debug-only bool debugonly //restrict the command to debug-only
); );
---------- ----------
Parameters Parameters
---------- ----------
:pluginHandle: Handle of the calling plugin. :pluginHandle: Handle of the calling plugin.
:command: Command name. :command: Command name.
:cbCommand: Callback with the following typedef: :cbCommand: Callback with the following typedef:
:: ::
bool CBPLUGINCOMMAND( bool CBPLUGINCOMMAND(
int argc //argument count (number of arguments + 1) int argc //argument count (number of arguments + 1)
char* argv[] //array of arguments (argv[0] is the full command, arguments start at argv[1]) char* argv[] //array of arguments (argv[0] is the full command, arguments start at argv[1])
); );
:debugonly: When set, the command will never be executed when there is no target is being debugged. :debugonly: When set, the command will never be executed when there is no target is being debugged.
------------- -------------
Return Values Return Values
------------- -------------
This function returns true when the command was successfully registered, make sure to check this, other plugins may have already registered the same command. This function returns true when the command was successfully registered, make sure to check this, other plugins may have already registered the same command.
@@ -0,0 +1,34 @@
============================
_plugin_registerexprfunction
============================
This function registers an expression function defined by a plugin, so that users can use it in expressions. All arguments are integer type.
::
bool _plugin_registerexprfunction(
int pluginHandle, //plugin handle
const char* name, //name of expresison function
int argc, //number of arguments
CBPLUGINEXPRFUNCTION cbFunction, //callback function
void* userdata //user data
);
----------
Parameters
----------
:pluginHandle: Handle of the calling plugin.
:name: Name of expresison function.
:argc: Number of arguments of expression function.
:cbFunction: Callback with the following typdef:
::
typedef duint(*CBPLUGINEXPRFUNCTION)(int argc, const duint* argv, void* userdata);
:userdata: A pointer value passed to the callback, may be used by plugin to pass additional information.
-------------
Return Values
-------------
Return true when the registration is successful, otherwise return false.
@@ -0,0 +1,65 @@
==============================
_plugin_registerexprfunctionex
==============================
This function registers an expression function defined by a plugin, so that users can use it in expressions. Unlike :doc:`registerexprfunction`, this function can also register expression functions that process string argument types.
::
bool _plugin_registerexprfunctionex(
int pluginHandle, //plugin handle
const char* name, //name of expresison function
const ValueType & returnType, //type of return value
const ValueType* argTypes, //type of arguments
size_t argc, //number of arguments
CBPLUGINEXPRFUNCTIONEX cbFunction, //callback function
void* userdata //user data
);
----------
Parameters
----------
:pluginHandle: Handle of the calling plugin.
:name: Name of expresison function.
:returnType: Type of return value. The definition of ValueType is:
::
typedef enum
{
ValueTypeNumber,
ValueTypeString,
// Types below cannot be used for values, only for registration
ValueTypeAny,
ValueTypeOptionalNumber,
ValueTypeOptionalString,
ValueTypeOptionalAny,
} ValueType;
:argTypes: Array of types of arguments
:argc: Number of arguments of expression function.
:cbFunction: Callback with the following typdef:
::
typedef struct
{
const char* ptr; // Should be allocated with BridgeAlloc
bool isOwner; // When set to true BridgeFree will be called on ptr
} StringValue;
typedef struct
{
ValueType type;
duint number;
StringValue string;
} ExpressionValue;
typedef bool(*CBPLUGINEXPRFUNCTIONEX)(ExpressionValue* result, int argc, const ExpressionValue* argv, void* userdata);
:userdata: A pointer value passed to the callback, may be used by plugin to pass additional information.
-------------
Return Values
-------------
Return true when the registration is successful, otherwise return false.
@@ -0,0 +1,32 @@
==============================
_plugin_registerformatfunction
==============================
This function registers a format function defined by a plugin, so that users can use it in :doc:`../../../introduction/Formatting`.
::
bool _plugin_registerformatfunction(
int pluginHandle, //plugin handle
const char* type, //the name of format function
CBPLUGINFORMATFUNCTION cbFunction, //callback function
void* userdata //user data
);
----------
Parameters
----------
:pluginHandle: Handle of the calling plugin.
:type: The name of format function. This is the part before `;` in a string format function. Valid names must begin with `_` or letters, followed by `_`, `.`, letters or digits.
:cbFunction: Callback with the following typdef:
::
typedef FORMATRESULT(*CBPLUGINFORMATFUNCTION)(char* dest, size_t destCount, int argc, char* argv[], duint value, void* userdata);
:userdata: A pointer value passed to the callback, may be used by plugin to pass additional information.
-------------
Return Values
-------------
Return `true` when the registration is successful, otherwise return `false`.
+24
View File
@@ -0,0 +1,24 @@
===================
_plugin_startscript
===================
Creates a new thread to run the callback function asynchronously.
::
void _plugin_startscript(
CBPLUGINSCRIPT cbScript //callback
);
----------
Parameters
----------
:cbScript: Callback with the following typedef:
::
typedef void (*CBPLUGINSCRIPT)();
-------------
Return Values
-------------
This function does not return a value.
+43 -43
View File
@@ -1,43 +1,43 @@
========================== ==========================
_plugin_unregistercallback _plugin_unregistercallback
========================== ==========================
This plugin unregisters a previously set callback. It is only possible to remove callbacks that were previously set using _plugin_registercallback. This plugin unregisters a previously set callback. It is only possible to remove callbacks that were previously set using _plugin_registercallback.
:: ::
bool _plugin_unregistercallback( bool _plugin_unregistercallback(
int pluginHandle, //plugin handle int pluginHandle, //plugin handle
CBTYPE cbType //callback type to remove CBTYPE cbType //callback type to remove
); );
Parameters Parameters
---------- ----------
:pluginHandle: Handle of the calling plugin. :pluginHandle: Handle of the calling plugin.
:cbType: The event type. This can be any of the following values: :cbType: The event type. This can be any of the following values:
* CB_INITDEBUG, * CB_INITDEBUG,
* CB_STOPDEBUG, * CB_STOPDEBUG,
* CB_CREATEPROCESS, * CB_CREATEPROCESS,
* CB_EXITPROCESS, * CB_EXITPROCESS,
* CB_CREATETHREAD, * CB_CREATETHREAD,
* CB_EXITTHREAD, * CB_EXITTHREAD,
* CB_SYSTEMBREAKPOINT, * CB_SYSTEMBREAKPOINT,
* CB_LOADDLL, * CB_LOADDLL,
* CB_UNLOADDLL, * CB_UNLOADDLL,
* CB_OUTPUTDEBUGSTRING, * CB_OUTPUTDEBUGSTRING,
* CB_EXCEPTION, * CB_EXCEPTION,
* CB_BREAKPOINT, * CB_BREAKPOINT,
* CB_PAUSEDEBUG, * CB_PAUSEDEBUG,
* CB_RESUMEDEBUG, * CB_RESUMEDEBUG,
* CB_STEPPED, * CB_STEPPED,
* CB_ATTACH, * CB_ATTACH,
* CB_DETACH, * CB_DETACH,
* CB_DEBUGEVENT, * CB_DEBUGEVENT,
* CB_MENUENTRY, * CB_MENUENTRY,
* CB_WINEVENT, * CB_WINEVENT,
* CB_WINEVENTGLOBAL * CB_WINEVENTGLOBAL
Return Values Return Values
------------- -------------
This function returns true when the callback was removed without problems. This function returns true when the callback was removed without problems.
+2 -2
View File
@@ -6,8 +6,8 @@ This function removes a command set by a plugin. It is only possible to remove c
:: ::
bool _plugin_unregistercommand( bool _plugin_unregistercommand(
int pluginHandle, //plugin handle int pluginHandle, //plugin handle
const char* command //command name const char* command //command name
); );
---------- ----------
@@ -0,0 +1,24 @@
==============================
_plugin_unregisterexprfunction
==============================
This function removes an expression function registered by a plugin. It is only possible to remove commands that you previously registered using `_plugin_registerexprfunction` or `_plugin_registerexprfunctionex`.
::
bool _plugin_unregisterexprfunction(
int pluginHandle, //plugin handle
const char* name //expression function name
);
----------
Parameters
----------
:pluginHandle: Handle of the calling plugin.
:name: Expression function name.
-------------
Return Values
-------------
This function returns true when the callback was removed without problems.
@@ -0,0 +1,24 @@
================================
_plugin_unregisterformatfunction
================================
This function removes a string format function registered by a plugin. It is only possible to remove commands that you previously registered using `_plugin_registerformatfunction`.
::
bool _plugin_unregisterformatfunction(
int pluginHandle, //plugin handle
const char* type //string format function name
);
----------
Parameters
----------
:pluginHandle: Handle of the calling plugin.
:type: String format function name.
-------------
Return Values
-------------
This function returns `true` when the string format function was removed without problems.
+5 -5
View File
@@ -1,5 +1,5 @@
# x64dbg trace file format specification # x64dbg trace file format specification
x64dbg trace file is a binary file that contains all information about program execution. Each trace file is composed of 3 parts: **Magic word**, **JSON header** and **binary trace blocks**. x64dbg trace file is little-endian. x64dbg trace file is a binary file that contains all information about program execution. Each trace file is composed of 3 parts: **Magic word**, **JSON header** and **binary trace blocks**. x64dbg trace file is little-endian.
## Magic word ## Magic word
Every trace file will begin with 4 bytes, "TRAC" (encoded in ASCII). Every trace file will begin with 4 bytes, "TRAC" (encoded in ASCII).
## Header ## Header
@@ -54,14 +54,14 @@ typedef struct
} REGDUMP; } REGDUMP;
``` ```
For example, `ccx` is the second member of regcontext. On x64 architecture, it is at byte offset 8 and on x86 architecture it is at byte offset 4. On both architecture, it is at index 1 and `cax` is at index 0. Therefore, when `RegisterChangePosition[0]` = 0, `RegisterChangeNewData[0]` contains the new value of `cax`. If `RegisterChangePosition[1]` = 0, `RegisterChangeNewData[1]` contains the new value of `ccx`, since the absolute index is computed by 0+0+1=1. The use of relative indexing helps achieve better data compression if a lossless compression is then applied to trace file, and also allow future expansion of `REGDUMP` structure without increasing size of `RegisterChanges` and `RegisterChangePosition` beyond a byte. Note: the file reader can locate the address of the instruction using `cip` register in this structure. For example, `ccx` is the second member of `regcontext`. On x64 architecture, it is at byte offset 8 and on x86 architecture it is at byte offset 4. On both architectures, it is at index 1 and `cax` is at index 0. Therefore, when `RegisterChangePosition[0]` = 0, `RegisterChangeNewData[0]` contains the new value of `cax`. If `RegisterChangePosition[1]` = 0, `RegisterChangeNewData[1]` contains the new value of `ccx`, since the absolute index is computed by 0+0+1=1. The use of relative indexing helps achieve better data compression if a lossless compression is then applied to trace file, and also allow future expansion of `REGDUMP` structure without increasing size of `RegisterChanges` and `RegisterChangePosition` beyond a byte. Note: the file reader can locate the address of the instruction using `cip` register in this structure.
x64dbg will save all registers at the start of trace, and every 512 instructions(this number might be changed in future versions to have different tradeoff between speed and space). A block with all registers saved will have `RegisterChanges`=172 on 64-bit platform and 216 on 32-bit platform. This allows x64dbg trace file to be randomly accessed. x64dbg might be unable to open a trace file that has a sequence of instruction longer than an implementation-defined limit without all registers saved. x64dbg will save all registers at the start of trace, and every 512 instructions (this number might be changed in future versions to have different tradeoff between speed and space). A block with all registers saved will have `RegisterChanges`=172 on 64-bit platform and 216 on 32-bit platform. This allows x64dbg trace file to be randomly accessed. x64dbg might be unable to open a trace file that has a sequence of instruction longer than an implementation-defined limit without all registers saved.
`MemoryAccessFlags` is an array of bytes that indicates properties of memory access. Currently, only bit 0 is defined and all other bits are reserved and set to 0. When bit 0 is set, it indicates the memory is not changed(This could mean it is read, or it is overwritten with identical value), so `MemoryAccessNewData` will not have an entry for this memory access. The file reader may use a disassembler to determine the true type of memory access. `MemoryAccessFlags` is an array of bytes that indicates properties of memory access. Currently, only bit 0 is defined and all other bits are reserved and set to 0. When bit 0 is set, it indicates the memory is not changed (This could mean it is read, or it is overwritten with identical value), so `MemoryAccessNewData` will not have an entry for this memory access. The file reader may use a disassembler to determine the true type of memory access.
`MemoryAccessAddress` is an array of pointers that indicates the address of memory access. `MemoryAccessAddress` is an array of pointers that indicates the address of memory access.
`MemoryAccessOldData` is an array of pointer-sized integers that stores the old content of memory. `MemoryAccessOldData` is an array of pointer-sized integers that stores the old content of memory.
`MemoryAccessNewData` is an array of pointer-sized integers that stores the new content of memory. `MemoryAccessNewData` is an array of pointer-sized integers that stores the new content of memory.
+3 -3
View File
@@ -164,9 +164,9 @@ Animate command
Pop up a dialog to enter a command, and execute that command at a steady frequency. Pop up a dialog to enter a command, and execute that command at a steady frequency.
------------ --------------
Trace Record Trace Coverage
------------ --------------
--------------------- ---------------------
Undo last instruction Undo last instruction
+1 -1
View File
@@ -5,6 +5,6 @@ Graph view contains the control flow graph. When you use :doc:`../../commands/gu
There are two modes to show the control flow graph: Normal mode and overview mode. There are two modes to show the control flow graph: Normal mode and overview mode.
In overview mode, the program will draw all the control flow graph within the window area, but not output the disassembly. When the first instruction is traced when trace record is enabled on this memory page, the whole basic block will be shown in a different color (Default is green). In overview mode, the program will draw all the control flow graph within the window area, but not output the disassembly. When the first instruction is traced when trace coverage is enabled on this memory page, the whole basic block will be shown in a different color (Default is green).
The graph view is now part of CPU view. The graph view is now part of CPU view.
+5
View File
@@ -0,0 +1,5 @@
# Source
If available, the source view displays the source file corresponding to a specific instruction. The debugger won't automatically do this; instead, the user must right-click the desired instruction in the disassembly view and select "Open Source File."
To successfully load the source file, both the debug symbols (typically the PDB file) and the source file must be accessible. Additionally, the debug symbols need to be loaded before the source file.
+4 -4
View File
@@ -9,13 +9,13 @@ You can double-click on columns to perform quick operation:
* Disassembly: follow in disassembly. * Disassembly: follow in disassembly.
* Comments: set comments. * Comments: set comments.
## Start Run Trace ## Start trace recording
To enable trace logging into trace view, you first enable it via "**Start Run Trace**" menu. It will pop up a dialog allowing you to save the recorded instructions into a file. The default location of this file is in the database directory. To enable trace logging into trace view, you first enable it via "**Start trace recording**" menu item. It will pop up a dialog allowing you to save the recorded instructions to a file. The default location of this file is in the database directory.
Once started, every instruction you stepped or traced will appear immediately in Trace view. Instructions executed while the debuggee is running or stepping over will not appear here. Once started, every instruction you stepped or traced will appear immediately in Trace view. If you let the application run the executed instructions will not be recorded.
## Stop Run Trace ## Stop trace recording
This menu can stop recording instructions. This menu can stop recording instructions.
+2 -1
View File
@@ -13,4 +13,5 @@ This section describes the usage of the views in the user interface.
Log Log
Notes Notes
CallStack CallStack
Trace Trace
Source
+1 -2
View File
@@ -5,14 +5,13 @@ Welcome to x64dbg's documentation!
Suggested reads Suggested reads
--------------- ---------------
If you came here because someone told you to read the manual, start by reading **all sections** of the :doc:`introduction <introduction/index>`. If you came here because someone told you to read the manual, start by reading **all sections** of the :doc:`introduction <introduction/index>`. See :doc:`commands <commands/index>` for an overview of the available commands and how they work (the arguments are **comma separated**).
**Contents:** **Contents:**
.. toctree:: .. toctree::
:maxdepth: 2 :maxdepth: 2
what
introduction/index introduction/index
gui/index gui/index
commands/index commands/index
+14 -8
View File
@@ -6,19 +6,19 @@ This section describes the conditional breakpoint capability in x64dbg.
When a breakpoint is hit, x64dbg will do the following things: When a breakpoint is hit, x64dbg will do the following things:
- If the breakpoint is an exception breakpoint, set the system variable `$breakpointexceptionaddress` to the exception address; - Set the system variable `$breakpointexceptionaddress` to the address that triggered the breakpoint (memory location);
- Increment the *hit counter*; - Increment the *hit counter*;
- Set the system variable `$breakpointcounter` to the value of *hit counter*; - Set the system variable `$breakpointcounter` to the value of *hit counter*;
- If *break condition* is set, evaluate the [expression](./Expressions.rst) (defaults to `1`); - If *break condition* is set, evaluate the [expression](./Expressions.md) (defaults to `1`);
- If *fast resume* is set and *break condition* evaluated to `0`: - If *fast resume* is set and *break condition* evaluated to `0`:
- Resume execution of the debuggee (skip the next steps). This will also skip executing plugin callbacks and GUI updates. - Resume execution of the debuggee (skip the next steps). This will also skip executing plugin callbacks and GUI updates.
- If *log condition* is set, evaluate the [expression](./Expressions.rst) (defaults to `1`); - If *log condition* is set, evaluate the [expression](./Expressions.md) (defaults to `1`);
- If *command condition* is set, evaluate the [expression](./Expressions.rst) (defaults to *break condition*); - If *command condition* is set, evaluate the [expression](./Expressions.md) (defaults to `1`);
- If *break condition* evaluated to `1` (or any value other than '0'): - If *break condition* evaluated to `1` (or any value other than '0'):
- Print the standard log message; (if [the breakpoint is set to be silent](../commands/conditional-breakpoint-control/SetBreakpointSilent.md), standard log message is supressed.) - Print the standard log message; (if [the breakpoint is set to be silent](../commands/conditional-breakpoint-control/SetBreakpointSilent.md), standard log message is supressed.)
- Execute plugin callbacks. - Execute plugin callbacks.
- If *log text* is set and *log condition* evaluated to `1` (or any value other than '0'): - If *log text* is set and *log condition* evaluated to `1` (or any value other than '0'):
- Format and print the *log text* (see [String Formatting](./Formatting.rst)). - Format and print the *log text* (see [String Formatting](./Formatting.md)).
- If *command text* is set and *command condition* evaluated to `1`: - If *command text* is set and *command condition* evaluated to `1`:
- Set the system variable `$breakpointcondition` to the *break condition*; - Set the system variable `$breakpointcondition` to the *break condition*;
- Set the system variable `$breakpointlogcondition` to the *log condition*; - Set the system variable `$breakpointlogcondition` to the *log condition*;
@@ -29,13 +29,15 @@ When a breakpoint is hit, x64dbg will do the following things:
If any expression is invalid, the condition will be triggered (That is, an invalid expression as condition will cause the breakpoint to always break, log and execute command). If any expression is invalid, the condition will be triggered (That is, an invalid expression as condition will cause the breakpoint to always break, log and execute command).
**Warning: All numbers in expressions are interpreted as hex by default!** For decimal use `.123`.
## Hit counter ## Hit counter
A hit counter records how many times a breakpoint has been reached. It will be incremented unconditionally, even if fast resume is enabled on this breakpoint. It may be viewed at breakpoint view and reset with [ResetBreakpointHitCount](../commands/conditional-breakpoint-control/ResetBreakpointHitCount.md). A hit counter records how many times a breakpoint has been reached. It will be incremented unconditionally, even if fast resume is enabled on this breakpoint. It may be viewed at breakpoint view and reset with [ResetBreakpointHitCount](../commands/conditional-breakpoint-control/ResetBreakpointHitCount.md).
## Logging ## Logging
The log can be formatted by x64dbg to log the current state of the program. See [formatting](./Formatting.rst) on how to format the log string. The log can be formatted by x64dbg to log the current state of the program. See [formatting](./Formatting.md) on how to format the log string.
## Notes ## Notes
@@ -69,6 +71,10 @@ You should not use commands that can change the running state of the debuggee (s
*break condition*: `tid()==1C0` *break condition*: `tid()==1C0`
**A conditional breakpoint which breaks only if ECX points to a UTF-16 string containing "foo"**
*break condition*: `strstr(utf16(ECX), "foo")`
## Comparison with Conditional Tracing ## Comparison with Conditional Tracing
A conditional breakpoint can only pause the debuggee when it is executed. It cannot pause the debuggee when the breakpoint is not hit even if the condition is satisfied. If you don't know where the condition will become true, try [conditional tracing](./ConditionalTracing.md) instead! A conditional breakpoint can only pause the debuggee when it is executed. It cannot pause the debuggee when the breakpoint is not hit even if the condition is satisfied. If you don't know where the condition will become true, try [conditional tracing](./ConditionalTracing.md) instead!
@@ -76,6 +82,6 @@ A conditional breakpoint can only pause the debuggee when it is executed. It can
## See also ## See also
- [Conditional Breakpoint Control](../commands/conditional-breakpoint-control/index.rst) - [Conditional Breakpoint Control](../commands/conditional-breakpoint-control/index.rst)
- [Expressions](./Expressions.rst) - [Expressions](./Expressions.md)
- [Expression Functions](./Expression-functions.md) - [Expression Functions](./Expression-functions.md)
- [String Formatting](./Formatting.rst) - [String Formatting](./Formatting.md)
Loaded 100 of 119 files, more files were not shown because too many files have changed in this diff. Show more