toolchain/share/doc/gdb/Targets.html

87 lines
4.2 KiB
HTML
Raw Permalink Normal View History

2024-01-10 05:24:32 +00:00
<html lang="en">
<head>
<title>Targets - 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="GDB-Files.html#GDB-Files" title="GDB Files">
<link rel="next" href="Remote-Debugging.html#Remote-Debugging" title="Remote Debugging">
<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="Targets"></a>
<p>
Next:&nbsp;<a rel="next" accesskey="n" href="Remote-Debugging.html#Remote-Debugging">Remote Debugging</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="GDB-Files.html#GDB-Files">GDB Files</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="index.html#Top">Top</a>
<hr>
</div>
<h2 class="chapter">19 Specifying a Debugging Target</h2>
<p><a name="index-debugging-target-1301"></a>A <dfn>target</dfn> is the execution environment occupied by your program.
<p>Often, <span class="sc">gdb</span> runs in the same host environment as your program;
in that case, the debugging target is specified as a side effect when
you use the <code>file</code> or <code>core</code> commands. When you need more
flexibility&mdash;for example, running <span class="sc">gdb</span> on a physically separate
host, or controlling a standalone system over a serial port or a
realtime system over a TCP/IP connection&mdash;you can use the <code>target</code>
command to specify one of the target types configured for <span class="sc">gdb</span>
(see <a href="Target-Commands.html#Target-Commands">Commands for Managing Targets</a>).
<p><a name="index-target-architecture-1302"></a>It is possible to build <span class="sc">gdb</span> for several different <dfn>target
architectures</dfn>. When <span class="sc">gdb</span> is built like that, you can choose
one of the available architectures with the <kbd>set architecture</kbd>
command.
<a name="index-set-architecture-1303"></a>
<a name="index-show-architecture-1304"></a>
<dl><dt><code>set architecture </code><var>arch</var><dd>This command sets the current target architecture to <var>arch</var>. The
value of <var>arch</var> can be <code>"auto"</code>, in addition to one of the
supported architectures.
<br><dt><code>show architecture</code><dd>Show the current target architecture.
<br><dt><code>set processor</code><dt><code>processor</code><dd><a name="index-set-processor-1305"></a><a name="index-show-processor-1306"></a>These are alias commands for, respectively, <code>set architecture</code>
and <code>show architecture</code>.
</dl>
<ul class="menu">
<li><a accesskey="1" href="Active-Targets.html#Active-Targets">Active Targets</a>: Active targets
<li><a accesskey="2" href="Target-Commands.html#Target-Commands">Target Commands</a>: Commands for managing targets
<li><a accesskey="3" href="Byte-Order.html#Byte-Order">Byte Order</a>: Choosing target byte order
</ul>
</body></html>