blob: cd3f96d48243a9fb40a5785edfd9b8f479ebefcc [file] [log] [blame]
<html lang="en">
<head>
<title>Prompt - 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="up" href="Controlling-GDB.html#Controlling-GDB" title="Controlling GDB">
<link rel="next" href="Editing.html#Editing" title="Editing">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996,
1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
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>
<link rel="stylesheet" type="text/css" href="../cs.css">
</head>
<body>
<div class="node">
<a name="Prompt"></a>
<p>
Next:&nbsp;<a rel="next" accesskey="n" href="Editing.html#Editing">Editing</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="Controlling-GDB.html#Controlling-GDB">Controlling GDB</a>
<hr>
</div>
<h3 class="section">22.1 Prompt</h3>
<p><a name="index-prompt-1429"></a>
<span class="sc">gdb</span> indicates its readiness to read a command by printing a string
called the <dfn>prompt</dfn>. This string is normally &lsquo;<samp><span class="samp">(gdb)</span></samp>&rsquo;. You
can change the prompt string with the <code>set prompt</code> command. For
instance, when debugging <span class="sc">gdb</span> with <span class="sc">gdb</span>, it is useful to change
the prompt in one of the <span class="sc">gdb</span> sessions so that you can always tell
which one you are talking to.
<p><em>Note:</em> <code>set prompt</code> does not add a space for you after the
prompt you set. This allows you to set a prompt which ends in a space
or a prompt that does not.
<a name="index-set-prompt-1430"></a>
<dl><dt><code>set prompt </code><var>newprompt</var><dd>Directs <span class="sc">gdb</span> to use <var>newprompt</var> as its prompt string henceforth.
<p><a name="index-show-prompt-1431"></a><br><dt><code>show prompt</code><dd>Prints a line of the form: &lsquo;<samp><span class="samp">Gdb's prompt is: </span><var>your-prompt</var></samp>&rsquo;
</dl>
</body></html>