[pushed] Remove unused declaration and macros

Message ID 20250112133643.3284759-1-tom@tromey.com
State New
Headers
Series [pushed] Remove unused declaration and macros |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_gdb_build--master-arm fail Patch failed to apply
linaro-tcwg-bot/tcwg_gdb_build--master-aarch64 fail Patch failed to apply

Commit Message

Tom Tromey Jan. 12, 2025, 1:36 p.m. UTC
  event-top.h declares the_prompts, but it is never defined.  It's a
leftover from some ancient refactoring.

Similarly, top.c defines a few prompt-related macros, but these are
unused.

This patch removes these.
---
 gdb/event-top.h | 1 -
 gdb/top.c       | 4 ----
 2 files changed, 5 deletions(-)
  

Patch

diff --git a/gdb/event-top.h b/gdb/event-top.h
index c1e2edafda9..57f86f92ce0 100644
--- a/gdb/event-top.h
+++ b/gdb/event-top.h
@@ -130,7 +130,6 @@  extern void async_enable_stdin (void);
 
 extern bool set_editing_cmd_var;
 extern bool exec_done_display_p;
-extern struct prompts the_prompts;
 extern void (*after_char_processing_hook) (void);
 extern int call_stdin_event_handler_again_p;
 extern void gdb_readline_no_editing_callback (void *client_data);
diff --git a/gdb/top.c b/gdb/top.c
index bcaf4dc6a55..f855afe3f15 100644
--- a/gdb/top.c
+++ b/gdb/top.c
@@ -85,10 +85,6 @@ 
 
 extern void initialize_all_files (void);
 
-#define PROMPT(X) the_prompts.prompt_stack[the_prompts.top + X].prompt
-#define PREFIX(X) the_prompts.prompt_stack[the_prompts.top + X].prefix
-#define SUFFIX(X) the_prompts.prompt_stack[the_prompts.top + X].suffix
-
 /* Default command line prompt.  This is overridden in some configs.  */
 
 #ifndef DEFAULT_PROMPT