Many compilers generate assembly language instead of machine language.
This convention facilitates debugging, since assembly language is easier for people to read, and isolates the compiler from changes in the format of machine language files.
Compilers for c begin with a preprocessor that removes comments and expand macros.
This allows several versions of a program to be built from the same source.
Source- to – source translation (C++):
C++ implementations based on the early AT&T compiler generated an intermediate program in c instead of assembly language.
Compilers and interpreters do not exist in isolation. Programmers are assisted in their work by a host of other tools.
Assemblers, debuggers, preprocessors, and linkers were mentioned earlier.
Editors are familiar to every programmer. They may be assisted by cross-referencing facilities that allow the programmer to find the point at which an object is defined, given a point at which it is used.
Configuration management tools help keep track of dependences among the (many versions of) separately compiled modules in a large software system.
Perusal tools exist not only for text but also for intermediate languages that may be stored in binary.
Profilers and other performance analysis tools often work in conjunction with debuggers to help identify the pieces of a program that consume the bulk of its computation time.
In older programming environments, tools may be executed individually, at the explicit request of the user. If a running program terminates abnormally with a “bus error” (invalid address) message,
for example, the user may choose to invoke a debugger to examine the “core” file dumped by the operating system.
He or she may then attempt to identify the program bug by setting breakpoints, enabling tracing, and so on, and running the program again under the control of the debugger.
More recent programming environments provide much more integrated tools.
When an invalid address error occurs in an integrated environment, a new window is likely to appear on the user’s screen, with the line of source code at which the error occurred highlighted.
Breakpoints and tracing can then be set in this window without explicitly invoking a debugger.
Changes to the source can be made without explicitly invoking an editor.
The editor may also incorporate knowledge of the language syntax, providing templates for all the standard control structures, and checking syntax as it is typed in.
In most recent years, integrated environmens have largely displaced command-line tools for many languages and systems.