You can do this:
gdb --args path/to/executable -every -arg you can=think < of
The magic bit being --args
.
Just type run
in the gdb command console to start debugging.
More Related Contents:
- Can I set a breakpoint on ‘memory access’ in GDB?
- Debugging core files generated on a Customer’s box
- How do I print the elements of a C++ vector in GDB?
- Run an Application in GDB Until an Exception Occurs
- How do I print the full value of a long string in gdb?
- How to pretty-print STL containers in GDB?
- How to get a “codesigned” gdb on OSX?
- How to set a breakpoint in GDB where the function returns?
- How do I use the MinGW gdb debugger to debug a C++ program in Windows?
- How to avoid entering library’s source files while debugging in Qt Creator with gdb?
- Debugging with command-line parameters in Visual Studio
- _DEBUG vs NDEBUG
- How to debug heap corruption errors?
- __FILE__, __LINE__, and __FUNCTION__ usage in C++
- Determine the line of code that causes a segmentation fault?
- View array in Visual Studio debugger? [duplicate]
- How to enable gdb pretty printing for C++ STL objects in Eclipse CDT?
- Is it possible to “jump”/”skip” in GDB debugger?
- Why is std::cout not printing the correct value for my int8_t number?
- How to solve “ptrace operation not permitted” when trying to attach GDB to a process?
- error LNK2038: mismatch detected for ‘_ITERATOR_DEBUG_LEVEL’: value ‘0’ doesn’t match value ‘2’ in main.obj
- gdb is jumping over lines
- segfault only when NOT using debugger
- What are data breakpoints?
- Stepping into Qt sources in Qt Creator (in Ubuntu Linux)
- How to debug in Codeblocks?
- “please check gdb is codesigned – see taskgated(8)” – How to get gdb installed with homebrew code signed?
- Inspecting STL containers in Visual Studio debugging
- Debug Assertion Failed! Expression: _BLOCK_TYPE_IS_VALID [closed]
- Remote debugging C++ applications with Eclipse CDT/RSE/RDT