From dbf30ca3f5fec91671b37592f1a6644a2c36f67a Mon Sep 17 00:00:00 2001 From: Pedro Alves Date: Tue, 21 Jun 2016 01:11:51 +0100 Subject: Make gdb_in_secondary_prompt_p() be per UI gdb/ChangeLog: 2016-06-21 Pedro Alves * 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) : New field. --- gdb/top.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'gdb/top.h') 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; -- cgit v1.1