I compiled segfault.c as gcc -ggdb -g -o segfault segfault.c. It gave a warning, intentional I guess for the lab, and when I ran the executable (segfault) with cgdb it displayed the source file content in second window but output:
Reading symbols from segfault...done.
(gdb) run
warning: Cannot exec /usr/bin/zsh
warning: -c
warning: exec /home/family/Documents/Projects/C-Lab-1/segfault
warning: Error: No such file or directory
Starting program: /home/family/Documents/Projects/C-Lab-1/segfault
During startup program exited with code 127.
Note: I removed zsh because it was being annoying
So I couldn't get any of the things working like the lab1 video; I could set break points at the right spots but cgdb didn't stop at them during running the executable, and just output "exited with code 127" every time