Compile your code with the -g flag, and then use the gdb debugger. Documentation for gdb is here, but in essence:
gcc -g -o prog myfile.c another.c
and then:
gdb prog
If you want a user-friendly GUI for gdb, take a look at DDD or Insight.
More Related Contents:
- Hide password input on terminal
- Why does malloc initialize the values to 0 in gcc?
- Where is the header file on Linux? Why can’t I find ? [duplicate]
- Working of fork() in linux gcc [duplicate]
- Where is PATH_MAX defined in Linux?
- Why does the C preprocessor interpret the word “linux” as the constant “1”?
- Merge multiple .so shared libraries
- How to include needed C library using gcc?
- What is the advantage of GCC’s __builtin_expect in if else statements?
- Build .so file from .c file using gcc command line
- Finding out what the GCC include path is [duplicate]
- How to print the address of a function?
- `bash: ./a.out: No such file or directory` on running executable produced by `ld`
- Linking against older symbol version in a .so file
- How to compile my own glibc C standard library from source and use it?
- Why am I able to perform floating point operations inside a Linux kernel module?
- Disable variable-length automatic arrays in gcc
- How to solve “ptrace operation not permitted” when trying to attach GDB to a process?
- Why do I have to define LD_LIBRARY_PATH with an export every time I run my application?
- Is there a macro definition to check the Linux kernel version?
- How can a shared library (.so) call a function that is implemented in its loader code?
- How to print time difference in accuracy of milliseconds and nanoseconds from C in Linux?
- How can I include a needed C library using GCC?
- calling assembly function from c
- How to set up a cron job to run an executable every hour?
- Building a shared library using gcc on Linux and MinGW on Windows
- Returning struct containing array
- How does GCC behave if passed conflicting compiler flags?
- getrandom syscall in C not found
- argv: Sanitizing wildcards