1<html lang="en"> 2<head> 3<title>Targets - Debugging with GDB</title> 4<meta http-equiv="Content-Type" content="text/html"> 5<meta name="description" content="Debugging with GDB"> 6<meta name="generator" content="makeinfo 4.13"> 7<link title="Top" rel="start" href="index.html#Top"> 8<link rel="prev" href="GDB-Files.html#GDB-Files" title="GDB Files"> 9<link rel="next" href="Remote-Debugging.html#Remote-Debugging" title="Remote Debugging"> 10<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage"> 11<!-- 12Copyright (C) 1988-2013 Free Software Foundation, Inc. 13 14Permission is granted to copy, distribute and/or modify this document 15under the terms of the GNU Free Documentation License, Version 1.3 or 16any later version published by the Free Software Foundation; with the 17Invariant Sections being ``Free Software'' and ``Free Software Needs 18Free Documentation'', with the Front-Cover Texts being ``A GNU Manual,'' 19and with the Back-Cover Texts as in (a) below. 20 21(a) The FSF's Back-Cover Text is: ``You are free to copy and modify 22this GNU Manual. Buying copies from GNU Press supports the FSF in 23developing GNU and promoting software freedom.'' 24--> 25<meta http-equiv="Content-Style-Type" content="text/css"> 26<style type="text/css"><!-- 27 pre.display { font-family:inherit } 28 pre.format { font-family:inherit } 29 pre.smalldisplay { font-family:inherit; font-size:smaller } 30 pre.smallformat { font-family:inherit; font-size:smaller } 31 pre.smallexample { font-size:smaller } 32 pre.smalllisp { font-size:smaller } 33 span.sc { font-variant:small-caps } 34 span.roman { font-family:serif; font-weight:normal; } 35 span.sansserif { font-family:sans-serif; font-weight:normal; } 36--></style> 37<link rel="stylesheet" type="text/css" href="../cs.css"> 38</head> 39<body> 40<div class="node"> 41<a name="Targets"></a> 42<p> 43Next: <a rel="next" accesskey="n" href="Remote-Debugging.html#Remote-Debugging">Remote Debugging</a>, 44Previous: <a rel="previous" accesskey="p" href="GDB-Files.html#GDB-Files">GDB Files</a>, 45Up: <a rel="up" accesskey="u" href="index.html#Top">Top</a> 46<hr> 47</div> 48 49<h2 class="chapter">19 Specifying a Debugging Target</h2> 50 51<p><a name="index-debugging-target-1145"></a>A <dfn>target</dfn> is the execution environment occupied by your program. 52 53 <p>Often, <span class="sc">gdb</span> runs in the same host environment as your program; 54in that case, the debugging target is specified as a side effect when 55you use the <code>file</code> or <code>core</code> commands. When you need more 56flexibility—for example, running <span class="sc">gdb</span> on a physically separate 57host, or controlling a standalone system over a serial port or a 58realtime system over a TCP/IP connection—you can use the <code>target</code> 59command to specify one of the target types configured for <span class="sc">gdb</span> 60(see <a href="Target-Commands.html#Target-Commands">Commands for Managing Targets</a>). 61 62 <p><a name="index-target-architecture-1146"></a>It is possible to build <span class="sc">gdb</span> for several different <dfn>target 63architectures</dfn>. When <span class="sc">gdb</span> is built like that, you can choose 64one of the available architectures with the <kbd>set architecture</kbd> 65command. 66 67 68<a name="index-set-architecture-1147"></a> 69<a name="index-show-architecture-1148"></a> 70<dl><dt><code>set architecture </code><var>arch</var><dd>This command sets the current target architecture to <var>arch</var>. The 71value of <var>arch</var> can be <code>"auto"</code>, in addition to one of the 72supported architectures. 73 74 <br><dt><code>show architecture</code><dd>Show the current target architecture. 75 76 <br><dt><code>set processor</code><dt><code>processor</code><dd><a name="index-set-processor-1149"></a><a name="index-show-processor-1150"></a>These are alias commands for, respectively, <code>set architecture</code> 77and <code>show architecture</code>. 78</dl> 79 80<ul class="menu"> 81<li><a accesskey="1" href="Active-Targets.html#Active-Targets">Active Targets</a>: Active targets 82<li><a accesskey="2" href="Target-Commands.html#Target-Commands">Target Commands</a>: Commands for managing targets 83<li><a accesskey="3" href="Byte-Order.html#Byte-Order">Byte Order</a>: Choosing target byte order 84</ul> 85 86 </body></html> 87 88