Error "No source file named"
Eli Zaretskii
eliz@gnu.org
Sun Aug 8 14:35:07 GMT 2021
> Date: Sun, 8 Aug 2021 13:38:33 +0000 (UTC)
> From: Mahmood Naderan via Gdb <gdb@sourceware.org>
>
> When I want to set a breakpoint at a specific line number, I get the following error:
>
> (gdb) break /home/mahmood/accel-sim-framework/gpu-simulator/gpgpu-sim/src/gpgpu-sim/shader.cc:1656
> No source file named /home/mahmood/accel-sim-framework/gpu-simulator/gpgpu-sim/src/gpgpu-sim/shader.cc.
> Make breakpoint pending on future shared library load? (y or [n])
>
>
> However, that line exists.
>
> $ sed -n 1656p /home/mahmood/accel-sim-framework/gpu-simulator/gpgpu-sim/src/gpgpu-sim/shader.cc
> printf("[Mahmood:shader.cc:1655] %" PRIu64 "\n", localaddr);
Try using the command "info sources" to see what GDB knows about
source file names of your program. And why don't you use just the
base name of the file, i.e. just "shader.cc"?
More information about the Gdb
mailing list