Reputation: 499
So I am running quemu with the gdb flag on my local machine (on port 26000). And then on Clion (running on the same local machine), I set up a remote gdb debugging configuration. The debugger is able to successfully connect, but for some reason breakpoints won't work. The output says that I can't source any of the source files.
The following are the debugging configuration I used:
GDB: Bundled GDB
'target remote' args: localhost:26000
Symbol file: <project dir>/kernel
Sysroot: <project dir>
Path Mappings:
remote: <project dir>
local: <project dir>
And the following is the qemu command I ran:
qemu-system-x86_64 -nographic -net none -hdb fs.img xv6.img -smp 2 -m 512 -S -gdb tcp::26000
Placing a breakpoint would give a message like:
No source file named <project dir>/entry.S.
The debugger is able to connect but there seems to be a problem with the files syncing. Both the qemu and debugger are running on the same local machine from the same directory.
Upvotes: 0
Views: 1791
Reputation: 691
Try the "directory" command in gdb, e.g. "directory /your/project/directory"
Upvotes: 1