Buy the book!
|[ < ]||[ > ]||[ << ]||[ Up ]||[ >> ]||[Top]||[Contents]||[Index]||[ ? ]|
There are two ways to control the working language--either have GDB
set it automatically, or select it manually yourself. You can use the
set language command for either purpose. On startup, GDB
defaults to setting the language automatically. The working language is
used to determine how expressions you type are interpreted, how values
are printed, etc.
In addition to the working language, every source file that
GDB knows about has its own working language. For some object
file formats, the compiler might indicate which language a particular
source file is in. However, most of the time GDB infers the
language from the name of the file. The language of a source file
controls whether C++ names are demangled--this way
show each frame appropriately for its own language. There is no way to
set the language of a source file from within GDB, but you can
set the language associated with a filename extension. See section Displaying the language.
This is most commonly a problem when you use a program, such
f2c, that generates C but is written in
another language. In that case, make the
#line directives in its C output; that way
GDB will know the correct language of the source code of the original
program, and will display that source code, not the generated C code.
12.1.1 List of filename extensions and languages Filename extensions and languages. 12.1.2 Setting the working language Setting the working language manually 12.1.3 Having GDB infer the source language
|webmaster||delorie software privacy|
|Copyright © 2003 by The Free Software Foundation||Updated Jun 2003|