I am new to programming, and I am following the book "Learn C the Hard Way" by Zed Shaw.
In Paragraph 4, it goes through the process of using a debugger with the command line.
I am following along with Windows 10, so I downloaded LLVM 12.0.0 Binaries from https://releases.llvm.org/download.html#12.0.1, to use lldb,
I am testing on a simple C file which prints on the console some hard coded text, compiled with
clang -fuse-ld=lld -g -O0 -std=c17 Example.c -o Example.exe
After that, I tried to use lldb with it, using lldb Example
from cmd in the directory in which .exe, .c, .pdb files are located. Within lldb, trying to use
b main
producesWARNING: Unable to resolve breakpoint to any actual locations.
list
produces nothing, whilesource list --file Example.c
gives backerror: Could not find source file "Example.c".
breakpoint set --file Extra1.c --name main
gives againWARNING: Unable to resolve breakpoint to any actual locations.
run
is the only command left from the ones which I know, and It executes the program, without displaying anything, it's only telling me what the main function returned
Furthermore I noticed that Windows Explorer doesn't stop me from trying to delete the .pdb file, which lldb is supposed to use(?) while lldb is running, while the same can't be said for the .exe file. Since I know little to nothing, I have no idea how to get it to work. Any help? Thanks in advice