I have two source files that I'm currently compiling into one executable.
I use gcc -o ProgramName file1.c file2.c
I know gdb requires the -g flag when being compiled but I must be placing it incorrectly. I have tried several things but nothing along the lines of:
gcc -g -o ProgramName file1.c file2.c is working for me. When I run gdb -> run it says that no executable was found.
How do I compile this correctly so it will run in GDB?

gdb ./ProgramName->run. GDB requires an executable to run it