I've looked through the internet and searched for solution for debugging xv6 on mac with CLion and didn't find one. as you know it's difficult (or maybe impossible, I didn't succeeded anyway) to make gdb work on macOS. So, how can I do it? How can I debug xv6 with CLion on macOS?
run make qemu-gdb clean
in terminal (in the project's directory of course), pay attention for the port, it may be different for some reason, for me it was 25501.
All I needed to do is the following:
kernel
is good for debugging proc.c
, if you want to debug other file, (i.e. sh.c
) you should put _sh
instead.