75 lines
3.6 KiB
HTML
75 lines
3.6 KiB
HTML
|
<html lang="en">
|
||
|
<head>
|
||
|
<title>Languages - Debugging with GDB</title>
|
||
|
<meta http-equiv="Content-Type" content="text/html">
|
||
|
<meta name="description" content="Debugging with GDB">
|
||
|
<meta name="generator" content="makeinfo 4.13">
|
||
|
<link title="Top" rel="start" href="index.html#Top">
|
||
|
<link rel="prev" href="Overlays.html#Overlays" title="Overlays">
|
||
|
<link rel="next" href="Symbols.html#Symbols" title="Symbols">
|
||
|
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||
|
<!--
|
||
|
Copyright (C) 1988-2019 Free Software Foundation, Inc.
|
||
|
|
||
|
Permission is granted to copy, distribute and/or modify this document
|
||
|
under the terms of the GNU Free Documentation License, Version 1.3 or
|
||
|
any later version published by the Free Software Foundation; with the
|
||
|
Invariant Sections being ``Free Software'' and ``Free Software Needs
|
||
|
Free Documentation'', with the Front-Cover Texts being ``A GNU Manual,''
|
||
|
and with the Back-Cover Texts as in (a) below.
|
||
|
|
||
|
(a) The FSF's Back-Cover Text is: ``You are free to copy and modify
|
||
|
this GNU Manual. Buying copies from GNU Press supports the FSF in
|
||
|
developing GNU and promoting software freedom.''
|
||
|
-->
|
||
|
<meta http-equiv="Content-Style-Type" content="text/css">
|
||
|
<style type="text/css"><!--
|
||
|
pre.display { font-family:inherit }
|
||
|
pre.format { font-family:inherit }
|
||
|
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||
|
pre.smallformat { font-family:inherit; font-size:smaller }
|
||
|
pre.smallexample { font-size:smaller }
|
||
|
pre.smalllisp { font-size:smaller }
|
||
|
span.sc { font-variant:small-caps }
|
||
|
span.roman { font-family:serif; font-weight:normal; }
|
||
|
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||
|
--></style>
|
||
|
</head>
|
||
|
<body>
|
||
|
<div class="node">
|
||
|
<a name="Languages"></a>
|
||
|
<p>
|
||
|
Next: <a rel="next" accesskey="n" href="Symbols.html#Symbols">Symbols</a>,
|
||
|
Previous: <a rel="previous" accesskey="p" href="Overlays.html#Overlays">Overlays</a>,
|
||
|
Up: <a rel="up" accesskey="u" href="index.html#Top">Top</a>
|
||
|
<hr>
|
||
|
</div>
|
||
|
|
||
|
<h2 class="chapter">15 Using <span class="sc">gdb</span> with Different Languages</h2>
|
||
|
|
||
|
<p><a name="index-languages-965"></a>
|
||
|
Although programming languages generally have common aspects, they are
|
||
|
rarely expressed in the same manner. For instance, in ANSI C,
|
||
|
dereferencing a pointer <code>p</code> is accomplished by <code>*p</code>, but in
|
||
|
Modula-2, it is accomplished by <code>p^</code>. Values can also be
|
||
|
represented (and displayed) differently. Hex numbers in C appear as
|
||
|
‘<samp><span class="samp">0x1ae</span></samp>’, while in Modula-2 they appear as ‘<samp><span class="samp">1AEH</span></samp>’.
|
||
|
|
||
|
<p><a name="index-working-language-966"></a>Language-specific information is built into <span class="sc">gdb</span> for some languages,
|
||
|
allowing you to express operations like the above in your program's
|
||
|
native language, and allowing <span class="sc">gdb</span> to output values in a manner
|
||
|
consistent with the syntax of your program's native language. The
|
||
|
language you use to build expressions is called the <dfn>working
|
||
|
language</dfn>.
|
||
|
|
||
|
<ul class="menu">
|
||
|
<li><a accesskey="1" href="Setting.html#Setting">Setting</a>: Switching between source languages
|
||
|
<li><a accesskey="2" href="Show.html#Show">Show</a>: Displaying the language
|
||
|
<li><a accesskey="3" href="Checks.html#Checks">Checks</a>: Type and range checks
|
||
|
<li><a accesskey="4" href="Supported-Languages.html#Supported-Languages">Supported Languages</a>: Supported languages
|
||
|
<li><a accesskey="5" href="Unsupported-Languages.html#Unsupported-Languages">Unsupported Languages</a>: Unsupported languages
|
||
|
</ul>
|
||
|
|
||
|
</body></html>
|
||
|
|