Menu
Home
Log in / Register
 
Home arrow Computer Science arrow Android Application Development for the Intel Platform
< Prev   CONTENTS   Next >

Editor

Any text editing tool can be used to write and edit source code. The Linux platform has two categories of editors: one includes line editors such as ed and ex; the other includes full-screen editors such as vi, Emacs, and gedit. Line editors can only operate on one line, while full-screen editors can edit an entire screen of code and the edited files are displayed, thus overcoming the shortcomings of line editing and making it easier to use. Full-screen editors have a larger feature set than line editors.

In an IDE, editors are integrated into the tool and need not be used separately to write source code.

Compiler and Linker

The editing process involves grammar, semantic, and lexical analyses, generation and optimization of intermediate codes, symbol table management and error management. The GNU editor is gcc. Gcc is considered the standard compiler of Linux.

Gcc was initially the C language editor of GNU. Now it supports C, C++, Object-C, FORTRAN, Java, and ADA. To some degree, gcc is the combination of all GNU editors. Gcc compiles source code and does the linking process. Users can choose the command parameters to compile, link, and generate executable files.

Intel Compiler also optimized code paths to improve application performance on Intel platforms. Intel Compiler is bundled with the tools offering from Intel called Intel Integrated Native Developer Experience.

Debugger

A debugger makes it easier for programmers to debug programs. But it is not necessarily a tool required for code execution. During the compilation process, the time spent on debugging is more than the time on encoding. Therefore a full-featured debugger that's easy to use is necessary.

The GNU debugger is gdb (abbreviation of GNU Debugger). It is also open source code and is a command line–based debugger. All debugging commands are realized through the commands of the control station.

Build Manager

GNU provides one build manager called make, a tool for controlling compilation of multiple software files. It is similar to Visual C++† project in Windows. In addition, it can automatically manage the contents, means, and timing of software compilation to help programmers so they can focus on coding instead of organizing compiling sequences.

Make can call gcc to compile and link source codes into executable files for the target machine according to the makefile defined by the developer.

Makefile Auto Generation Tool

Makefile can help make to perform the target file generation task. But encoding a makefile is not an easy job, especially for big projects. GNU provides a series of autotools to make makefiles. Such tools are aware of system configuration issues to help developers deal with migration issues. Autotools include aclocal, autoscan, autoconf, autoheader, automake, and libtool.

Several methods are used for generating target files from source code as shown in Figure 3-8.

Figure 3-8. Methods for generating target files using GNU tool chain

• Method 1: Use gcc (or Intel compiler ICC) to compile and link all source code files to generate executable target files

• Method 2: Use an IDE, such as Eclipse, to compile a makefile and other configuration files and then use make to generate executable target files

• Method 3: Use system build tools-autotools to make makefile and other configurations, and then use make to generate executable target files

Optimizing Tools -gprof

To help developers optimize their programs, GNU provides a performance analyzer, gproof, one of the GNU binutils tools.

Gproof can measure the performance of programs and record the called times of each function and corresponding execution time so that the optimization effort can be centered on the most time-consuming portions. In addition, gproof can also generate function call relations during programming execution, including number of called times, to help programmers analyze how programs are executing. By relying on the function call relations, developers do not need to go through all the details of a program's execution, improving their work efficiency. And this function is also helpful for maintaining old code or analyzing open source projects. With the calling diagram, you can get a basic understanding of the running framework and “skeleton” of the programs. Then analyzing

them is less difficult, especially for code and open source projects you may not be familiar with.

 
Found a mistake? Please highlight the word and press Shift + Enter  
< Prev   CONTENTS   Next >
 
Subjects
Accounting
Business & Finance
Communication
Computer Science
Economics
Education
Engineering
Environment
Geography
Health
History
Language & Literature
Law
Management
Marketing
Philosophy
Political science
Psychology
Religion
Sociology
Travel