简体   繁体   中英

No source file found in Clion remote gdb debugging from local machine

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.

尝试在gdb中使用“目录”命令,例如“目录/ your / project / directory”

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM