public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Printing statements from compiler
@ 2022-04-04 18:09 RICHU NORMAN
  2022-04-04 19:18 ` Xi Ruoyao
  0 siblings, 1 reply; 3+ messages in thread
From: RICHU NORMAN @ 2022-04-04 18:09 UTC (permalink / raw)
  To: gcc-help

Hi,
I am a beginner in gcc development
1. Is there a way to use print statements in gcc to track the flow or debug
the code?
2. After each edit do we use 'make' to build the gcc?
3. Is there a way to individually compile the edited files, as using 'make'
takes more time?


Thanking you in advance.

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

* Re: Printing statements from compiler
  2022-04-04 18:09 Printing statements from compiler RICHU NORMAN
@ 2022-04-04 19:18 ` Xi Ruoyao
  2022-04-04 19:57   ` RICHU NORMAN
  0 siblings, 1 reply; 3+ messages in thread
From: Xi Ruoyao @ 2022-04-04 19:18 UTC (permalink / raw)
  To: RICHU NORMAN, gcc-help

On Mon, 2022-04-04 at 23:39 +0530, RICHU NORMAN wrote:
> Hi,
> I am a beginner in gcc development
> 1. Is there a way to use print statements in gcc to track the flow or debug
> the code?

AFAIK you can call fprintf to print to stderr.  But it's not a "print
statement": there is no such concept in C++.

> 2. After each edit do we use 'make' to build the gcc?

Yes.

> 3. Is there a way to individually compile the edited files, as using 'make'
> takes more time?

Why would it take more time?  make tracks the timestamps of files and
only recompile a file when it's necessary.
-- 
Xi Ruoyao <xry111@mengyan1223.wang>
School of Aerospace Science and Technology, Xidian University

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

* Re: Printing statements from compiler
  2022-04-04 19:18 ` Xi Ruoyao
@ 2022-04-04 19:57   ` RICHU NORMAN
  0 siblings, 0 replies; 3+ messages in thread
From: RICHU NORMAN @ 2022-04-04 19:57 UTC (permalink / raw)
  To: Xi Ruoyao; +Cc: gcc-help

Thanks a lot

On Tue, Apr 5, 2022, 12:48 AM Xi Ruoyao <xry111@mengyan1223.wang> wrote:

> On Mon, 2022-04-04 at 23:39 +0530, RICHU NORMAN wrote:
> > Hi,
> > I am a beginner in gcc development
> > 1. Is there a way to use print statements in gcc to track the flow or
> debug
> > the code?
>
> AFAIK you can call fprintf to print to stderr.  But it's not a "print
> statement": there is no such concept in C++.
>
> > 2. After each edit do we use 'make' to build the gcc?
>
> Yes.
>
> > 3. Is there a way to individually compile the edited files, as using
> 'make'
> > takes more time?
>
> Why would it take more time?  make tracks the timestamps of files and
> only recompile a file when it's necessary.
> --
> Xi Ruoyao <xry111@mengyan1223.wang>
> School of Aerospace Science and Technology, Xidian University
>

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

end of thread, other threads:[~2022-04-04 19:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-04 18:09 Printing statements from compiler RICHU NORMAN
2022-04-04 19:18 ` Xi Ruoyao
2022-04-04 19:57   ` RICHU NORMAN

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).