Hello. I found this forum just now. I'm writing some lessons about C-programming. I have run gcc in Linux (Debian-based) and if there are errors in the code, I get messages describing the error, or the reason for the "crash". I just wonder, what program is dealing with the error-hints. Is it GCC or GDB, or something else?
What is this procedure called, "debug-info", "error-tracing", "syntax-hinting"?
Greetings
Valema said:if there are errors in the code, I get messages
Build time diagnostics are produced by the compiler or linker.
The compiler generates debug information which gets included into the object file to allow the debugger to associate memory addresses with source code lines and identifiers. This is the "debug-info".
The debugger works at run time. It uses the debug information from the compiler.
Valema said:I get messages describing the error, or the reason for the "crash".
This sounds like you're talking about messages generated by an operating system?
Not sure what you're referring to as "error-tracing" ?
By "syntax hinting" do you mean syntax highlighting? This is actually performed by the IDE - not the compiler.
Ok thanks. I ran an hello world program (with printf) without having #include <stdio.h>
it said something "incompatible implicit declaration of built-in function 'printf' " and then suggested me to use stdio.h
Are those 2 from the debugger?
That last is what I meant with "syntax hinting"
Valema said:Are those 2 from the debugger?
No - those are from the compiler.
Again, the debugger only comes into play when you are actually running your program.