public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: Xi Ruoyao <xry111@xry111.site>
To: "Mr. Joey" <ailee.email@icloud.com>, gcc-help@gcc.gnu.org
Subject: Re: How to auto insert logs when use gcc compile a C/C++ source.
Date: Mon, 30 May 2022 18:40:35 +0800	[thread overview]
Message-ID: <4394c42e70304c22922eb53927a800bc91e4f734.camel@xry111.site> (raw)
In-Reply-To: <ABF96053-DB08-45BA-9DD8-F4C0EA46E906@icloud.com>

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

  reply	other threads:[~2022-05-30 10:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-30  0:45 Mr. Joey
2022-05-30 10:40 ` Xi Ruoyao [this message]
2022-05-30 12:44   ` Mr. Joey

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4394c42e70304c22922eb53927a800bc91e4f734.camel@xry111.site \
    --to=xry111@xry111.site \
    --cc=ailee.email@icloud.com \
    --cc=gcc-help@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).