Skip to content

Conversation

peace-maker
Copy link
Contributor

@peace-maker peace-maker commented Feb 2, 2025

This allows to add additional command line flags more easily. It probably requires LLVMParty/args#3 unless I messed up the compilation setup.
https://github.com/LLVMParty/args is copied into the tree. You can pass additional arguments to the target program after -- on the command line.

Add -c flag to run a command right away on startup and -cf to run multiple commands read from a file on startup.

Closes #3428

@peace-maker peace-maker force-pushed the cmdline_argparse branch 2 times, most recently from 15e9bc7 to 773a614 Compare February 2, 2025 14:17
@AppVeyorBot
Copy link

Download x64dbg 1.0.1966 (commit ca288df713 by @peace-maker)

@AppVeyorBot
Copy link

Download x64dbg 1.0.1967 (commit e6af3668e3 by @peace-maker)

@AppVeyorBot
Copy link

Download x64dbg 1.0.1968 (commit 57e8c58e2c by @peace-maker)

@AppVeyorBot
Copy link

Download x64dbg 1.0.1969 (commit 6d711514d9 by @peace-maker)

@AppVeyorBot
Copy link

Download x64dbg 1.0.1970 (commit e35bf23105 by @peace-maker)

@peace-maker
Copy link
Contributor Author

In the current state, the commands specified on the commandline using -c and -cf are executed asynchronously on startup and thus before the debugger attached to the target or started a new process. -c "bp prog.exe!main" prints The command "bp prog.exe!main" is debug-only.

The command should be applied once x64dbg is in debug mode to allow setting breakpoints right away when starting the debugger.

@AppVeyorBot
Copy link

Download x64dbg 1.0.1979 (commit 5dab29b845 by @peace-maker)

@peace-maker peace-maker force-pushed the cmdline_argparse branch 4 times, most recently from d9a967f to bbf9f46 Compare March 6, 2025 14:44
@AppVeyorBot
Copy link

Download x64dbg 1.0.1984 (commit a50b15ecc0 by @peace-maker)

@AppVeyorBot
Copy link

Download x64dbg 1.0.1985 (commit e74f407285 by @peace-maker)

@AppVeyorBot
Copy link

Download x64dbg 1.0.1986 (commit 87d194dca7 by @peace-maker)

@AppVeyorBot
Copy link

Download x64dbg 1.0.1988 (commit ba10c1b796 by @peace-maker)

mrexodia added a commit that referenced this pull request Mar 30, 2025
Currently useless, but after #3516 is merged this will be used for automated testing

https://github.com/x64dbg/x64dbg_headless
@mrexodia mrexodia force-pushed the development branch 2 times, most recently from 03447d4 to 699342d Compare July 3, 2025 23:32
@mrexodia mrexodia merged commit 575d823 into x64dbg:development Jul 22, 2025
@mrexodia
Copy link
Member

Thanks again for your patience, are you can see it required quite a lot of refactoring to get working 😅

@peace-maker peace-maker deleted the cmdline_argparse branch July 23, 2025 06:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support specifying debugger commands to run on the command line
3 participants