* How to auto insert logs when use gcc compile a C/C++ source.
@ 2022-05-30 0:45 Mr. Joey
2022-05-30 10:40 ` Xi Ruoyao
0 siblings, 1 reply; 3+ messages in thread
From: Mr. Joey @ 2022-05-30 0:45 UTC (permalink / raw)
To: gcc-help
hi, guys
How to auto insert logs when use gcc compile a C/C++ source. I thinks it’s useful when quickly debug a crash.
Thanks
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: How to auto insert logs when use gcc compile a C/C++ source.
2022-05-30 0:45 How to auto insert logs when use gcc compile a C/C++ source Mr. Joey
@ 2022-05-30 10:40 ` Xi Ruoyao
2022-05-30 12:44 ` Mr. Joey
0 siblings, 1 reply; 3+ messages in thread
From: Xi Ruoyao @ 2022-05-30 10:40 UTC (permalink / raw)
To: Mr. Joey, gcc-help
On Mon, 2022-05-30 at 08:45 +0800, Mr. Joey via Gcc-help wrote:
> hi, guys
>
> How to auto insert logs when use gcc compile a C/C++ source. I thinks
> it’s useful when quickly debug a crash.
I don't understand your intention. You mean debug a crash in GCC itself
("Internal Compiler Error") or a crash of the executable created by GCC?
For the prior, the output of -fdump-tree-* and -fdump-rtl-* can serve as
a log. But it's more efficient to just minimize the testcase with a
tool like cvise and debug the compiler with GDB.
For the latter, it's impossible. You can use a logging library like
boost::log in your program anyway.
--
Xi Ruoyao <xry111@xry111.site>
School of Aerospace Science and Technology, Xidian University
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: How to auto insert logs when use gcc compile a C/C++ source.
2022-05-30 10:40 ` Xi Ruoyao
@ 2022-05-30 12:44 ` Mr. Joey
0 siblings, 0 replies; 3+ messages in thread
From: Mr. Joey @ 2022-05-30 12:44 UTC (permalink / raw)
To: Xi Ruoyao; +Cc: gcc-help
Thanks Ruoyao
I means later, trace a program created by gcc.
As I know there is finstrument-functions options, is this feature I can use to insert a log to trace program run flow?
Sent from my iPhone
> On May 30, 2022, at 6:40 PM, Xi Ruoyao <xry111@xry111.site> wrote:
>
> Xi Ruoyao
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-05-30 12:44 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-30 0:45 How to auto insert logs when use gcc compile a C/C++ source Mr. Joey
2022-05-30 10:40 ` Xi Ruoyao
2022-05-30 12:44 ` Mr. Joey
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).