summaryrefslogtreecommitdiff
path: root/gdb/top.h
diff options
context:
space:
mode:
authorpmuldoon <pmuldoon>2011-07-22 09:22:49 +0000
committerpmuldoon <pmuldoon>2011-07-22 09:22:49 +0000
commitb002038111ddbace065011955f98fe50e8d0e794 (patch)
tree1399d09e186d330ec09c8b50a5c6efcba0665dc7 /gdb/top.h
parent7b0ba7e2d409d1864af5b32aa904895b1b0813d4 (diff)
downloadgdb-b002038111ddbace065011955f98fe50e8d0e794.tar.gz
2011-07-22 Phil Muldoon <pmuldoon@redhat.com>
* event-top.c (cli_command_loop): Use get_prompt, get_suffix, get_prefix. (display_gdb_prompt): Likewise. (change_annotation_level): Likewise. (push_prompt): Likewise. (pop_prompt): Likewise. (handle_stop_sig): Use get_prompt with a level. * top.c (command_loop): Use get_prompt with a level. (set_async_annotation_level): Use set_prompt with a level. (get_prefix): New function. (set_prefix): Ditto. (set_suffix): Ditto. (get_suffix): Ditto. (get_prompt): Accept a level argument. (set_prompt): Accept a level argument. Free old prompts. Set new_async_prompt if level is 0. (init_main): Use set_prompt with a level. Do not set new_async_prompt. * event-top.h (PROMPT, SUFFIX, PREFIX): Move to top.c * top.h: Declare set_suffix, get_suffix, set_prefix, get_prefix. Modify set_prompt, get_prompt to account for levels. * tui/tui-interp.c (tui_command_loop): Use get_prompt with a level * python/python.c (before_prompt_hook): Use set_prompt.
Diffstat (limited to 'gdb/top.h')
-rw-r--r--gdb/top.h20
1 files changed, 18 insertions, 2 deletions
diff --git a/gdb/top.h b/gdb/top.h
index 24ec2f20c51..3c1ec1493de 100644
--- a/gdb/top.h
+++ b/gdb/top.h
@@ -51,11 +51,27 @@ extern struct cleanup *prepare_execute_command (void);
/* This function returns a pointer to the string that is used
by gdb for its command prompt. */
-extern char *get_prompt (void);
+extern char *get_prompt (int);
/* This function copies the specified string into the string that
is used by gdb for its command prompt. */
-extern void set_prompt (const char *);
+extern void set_prompt (const char *, int level);
+
+/* This function returns a pointer to the string that is used
+ by gdb for its command prompt prefix. */
+extern char *get_prefix (int);
+
+/* This function copies the specified string into the string that
+ is used by gdb for its command prompt prefix. */
+extern void set_prefix (const char *, int);
+
+/* This function returns a pointer to the string that is used
+ by gdb for its command prompt suffix. */
+extern char *get_suffix (int);
+
+/* This function copies the specified string into the string that
+ is used by gdb for its command prompt suffix. */
+extern void set_suffix (const char *, int);
/* From random places. */
extern int readnow_symbol_files;