gdb indicates its readiness to read a command by printing a string
called the prompt. This string is normally ‘(gdb)’. You
can change the prompt string with the
set prompt command. For
instance, when debugging gdb with gdb, it is useful to change
the prompt in one of the gdb sessions so that you can always tell
which one you are talking to.
set prompt 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.
Versions of gdb that ship with Python scripting enabled have prompt extensions. The commands for interacting with these extensions are:
set extended-prompt Current working directory: \w (gdb)
Note that when an extended-prompt is set, it takes control of the prompt_hook hook. See prompt_hook, for further information.
set extended-prompt, are replaced with the corresponding strings each time the prompt is displayed.