aboutsummaryrefslogtreecommitdiff
path: root/gdb/top.h
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2016-06-21 01:11:51 +0100
committerPedro Alves <palves@redhat.com>2016-06-21 01:11:51 +0100
commitdbf30ca3f5fec91671b37592f1a6644a2c36f67a (patch)
tree73f8bfedce01e0127c2f7794eacc6d24943d9304 /gdb/top.h
parentb2d86570b316c347384c4ba9bb3933ed5e807fca (diff)
downloadbinutils-dbf30ca3f5fec91671b37592f1a6644a2c36f67a.zip
binutils-dbf30ca3f5fec91671b37592f1a6644a2c36f67a.tar.gz
binutils-dbf30ca3f5fec91671b37592f1a6644a2c36f67a.tar.bz2
Make gdb_in_secondary_prompt_p() be per UI
gdb/ChangeLog: 2016-06-21 Pedro Alves <palves@redhat.com> * top.c (gdb_secondary_prompt_depth): Delete. (gdb_in_secondary_prompt_p): Add ui parameter. Use it. (gdb_readline_wrapper_cleanup, gdb_readline_wrapper): Adjust to per-UI gdb_secondary_prompt_depth. * top.h (struct ui) <secondary_prompt_depth>: New field.
Diffstat (limited to 'gdb/top.h')
-rw-r--r--gdb/top.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/gdb/top.h b/gdb/top.h
index 009fdb7..2aa4408 100644
--- a/gdb/top.h
+++ b/gdb/top.h
@@ -73,6 +73,10 @@ struct ui
"start" -ex "next"') are processed. */
int async;
+ /* The number of nested readline secondary prompts that are
+ currently active. */
+ int secondary_prompt_depth;
+
/* stdio stream that command input is being read from. Set to stdin
normally. Set by source_command to the file we are sourcing.
Set to NULL if we are executing a user-defined command or
@@ -190,9 +194,10 @@ extern char *get_prompt (void);
by gdb for its command prompt. */
extern void set_prompt (const char *s);
-/* Return 1 if the current input handler is a secondary prompt, 0 otherwise. */
+/* Return 1 if UI's current input handler is a secondary prompt, 0
+ otherwise. */
-extern int gdb_in_secondary_prompt_p (void);
+extern int gdb_in_secondary_prompt_p (struct ui *ui);
/* From random places. */
extern int readnow_symbol_files;