public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* how set break point for cpp header file
@ 2020-12-01  4:28 liang tang
  2020-12-01  4:48 ` Simon Marchi
  0 siblings, 1 reply; 2+ messages in thread
From: liang tang @ 2020-12-01  4:28 UTC (permalink / raw)
  To: gdb

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: how set break point for cpp header file
  2020-12-01  4:28 how set break point for cpp header file liang tang
@ 2020-12-01  4:48 ` Simon Marchi
  0 siblings, 0 replies; 2+ messages in thread
From: Simon Marchi @ 2020-12-01  4:48 UTC (permalink / raw)
  To: liang tang, gdb


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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-12-01  4:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-01  4:28 how set break point for cpp header file liang tang
2020-12-01  4:48 ` Simon Marchi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).