question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Debugger alters command line arguments

See original GitHub issue

Compile the following on windows

include <stdio.h>

int main(int argc, const char **argv) {
    if (argc < 2) return 0;
    puts(argv[1]);
    getchar();
    return 0;
}

Compile into an exe and run with the command line argument https://www.google.com and you will see the correct output.

Load into Ghidra debugger, in dbgeng locally in vm, append the same command line argument and run until the results appear.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:10 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
nsadeveloper789commented, Mar 28, 2022

Yes, the idea is to unify the machine-state modification story across the UI. Listing (via Patch Instruction, Patch Data, and Paste actions); Memory Bytes (via Paste action or editing the bytes); Registers; and Watches windows. Feature-wise, it’s nearly complete, but I’m in the process of smoothing the rough edges, then testing.

1reaction
d-millarcommented, Mar 28, 2022

Hmmmm, yes, sadly that appears to be true. I think there’s a ticket in for this (may even be an active branch for it from @nsadeveloper789), but for the moment you may be stuck using the Interpreter window.

Read more comments on GitHub >

github_iconTop Results From Across the Web

c# - Is it possible to change command line arguments while ...
The problem is not about changing command line arguments, but about reexecuting the code that was already executed with different arguments.
Read more >
Help with command-line arguments? - MSDN - Microsoft
Hi everyone, I'm having problems with correctly configuring the Visual Studio 2008 debugger to pass command-line arguments to my exe.
Read more >
Command line arguments when debugging - NI Community
My project would read in the command line parameters as typed in by the user at the command line. Labview already has a...
Read more >
CS585 : Getting Started with Visual Studio Tutorial
To set command-line arguments in Visual Studio, right click on the project name, then go to Properties. In the Properties Pane, go to...
Read more >
Debugging and Command Line Arguments with VS Code
Debugging and Command Line Arguments with VS Code. 16K views 2 years ago. Dalhousie University ECED3403. Dalhousie University ECED3403.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found