Reputation: 5855
I work on program with multiple C++ files. I have run the executable through gdb for debugging segmentation fault. Later, gdb backtrace
provided the list of functions before segmentation fault. Later, I tried to set a break point in a file on a particular line-number. (The path specified is absolute path)
(gdb) break /aia/r015/home/sathish/zfs_amr/src/zfslbminterfaced2q9.cpp:100
However, gdb gives the following message:
No source file named /aia/r015/home/sathish/zfs_amr/src/zfslbminterfaced2q9.cpp.
However, this particular does exist in the location. What really the message means?
Upvotes: 2
Views: 4582
Reputation: 213877
What really the message means?
The message means that GDB does not know about any source file named /aia/r015/home/sathish/zfs_amr/src/zfslbminterfaced2q9.cpp
.
There are multiple reasons this could be the case:
-g
, or because the debug info was (possibly inadvertantly) stripped later on,As Pat suggested, setting breakpoint on zfslbminterfaced2q9.cpp:100
is more likely to work.
If that doesn't work, info sources
will tell you which files GDB does know about.
Update:
info sources gives blank
This means that the application doesn't have any debug info at all.
Usually this happens for one of two reasons:
-g
on the link line (some platforms require -g
both at compile and link time),-s
somewhere on your link line (which strips the final executable).Upvotes: 3