Once gdb
starts, you can run the program using “r args“.
So if you are running your code by:
$ executablefile arg1 arg2 arg3
Debug it on gdb
by:
$ gdb executablefile
(gdb) r arg1 arg2 arg3
More Related Contents:
- How to solve “ptrace operation not permitted” when trying to attach GDB to a process?
- Cannot insert breakpoints. Addresses with low values
- Debugging core files generated on a Customer’s box
- Best way to invoke gdb from inside program to print its stacktrace?
- How can I tell if a library was compiled with -g?
- How to print every executed line in GDB automatically until a given breakpoint is reached?
- Include source code of malloc.c in gdb?
- How Can I debug a C program on Linux?
- Is it possible to “jump”/”skip” in GDB debugger?
- How to pretty-print STL containers in GDB?
- How to make backtrace()/backtrace_symbols() print the function names?
- How to modify memory contents using GDB?
- segfault only when NOT using debugger
- Debugging a linked-list
- C-programming board game [duplicate]
- How to write a signal handler to catch SIGSEGV?
- How do I analyze a program’s core dump file with GDB when it has command-line parameters?
- Where is the itoa function in Linux?
- How to set the name of a thread in Linux pthreads?
- “undefined reference to `pow'” even with math.h and the library link -lm [duplicate]
- How to use POSIX semaphores on forked processes in C?
- Pipe buffer size is 4k or 64k?
- How to wait for exit of non-children processes
- Compiler using local variables without adjusting RSP
- How to access mmaped /dev/mem without crashing the Linux kernel?
- How can a shared library (.so) call a function that is implemented in its loader code?
- fd leak, custom Shell
- How can I include a needed C library using GCC?
- What API do I call to get the system uptime?
- Where are syscalls located in glibc source