how set break point for cpp header file

Simon Marchi simark@simark.ca
Tue Dec 1 04:48:21 GMT 2020


On 2020-11-30 11:28 p.m., liang tang via Gdb wrote:
> Hi,
> I want to set break point for cpp header files. But 'info sources' doesn't
> show the header file I want to debug.
> What can I do to debug the header file for CPP? and If 'info sources'
> doesn't contain the header file, What can I do to make the header file
> contained?
> Thanks. Regards
>

Set the breakpoint as usual using the "break" command, like "break
myheader.hpp:123".  Or "break myfunction" works even if myfunction is
defined in a header file.

Simon


More information about the Gdb mailing list