@@ -666,10 +666,6 @@ extern void (*deprecated_show_load_progress) (const char *section,
unsigned long section_size,
unsigned long total_sent,
unsigned long total_size);
-extern void (*deprecated_print_frame_info_listing_hook) (struct symtab * s,
- int line,
- int stopline,
- int noerror);
extern int (*deprecated_query_hook) (const char *, va_list)
ATTRIBUTE_FPTR_PRINTF(1,0);
@@ -388,7 +388,6 @@ interp_exec (struct interp *interp, const char *command_str)
void
clear_interpreter_hooks (void)
{
- deprecated_print_frame_info_listing_hook = 0;
/*print_frame_more_info_hook = 0; */
deprecated_query_hook = 0;
deprecated_error_begin_hook = 0;
@@ -48,6 +48,13 @@
#include "cli/cli-utils.h"
#include "objfiles.h"
+#ifdef TUI
+#include "tui/tui.h"
+#define TUI_ACTIVE tui_active
+#else
+#define TUI_ACTIVE 0
+#endif
+
#include "safe-ctype.h"
#include "symfile.h"
#include "extension.h"
@@ -889,34 +896,19 @@ print_frame_info (struct frame_info *frame, int print_level,
if (annotation_level)
done = identify_source_line (sal.symtab, sal.line, mid_statement,
get_frame_pc (frame));
- if (!done)
+ if (!done && !TUI_ACTIVE)
{
- if (deprecated_print_frame_info_listing_hook)
- deprecated_print_frame_info_listing_hook (sal.symtab,
- sal.line,
- sal.line + 1, 0);
- else
- {
- struct value_print_options opts;
-
- get_user_print_options (&opts);
- /* We used to do this earlier, but that is clearly
- wrong. This function is used by many different
- parts of gdb, including normal_stop in infrun.c,
- which uses this to print out the current PC
- when we stepi/nexti into the middle of a source
- line. Only the command line really wants this
- behavior. Other UIs probably would like the
- ability to decide for themselves if it is desired. */
- if (opts.addressprint && mid_statement)
- {
- uiout->field_core_addr ("addr",
- gdbarch, get_frame_pc (frame));
- uiout->text ("\t");
- }
+ struct value_print_options opts;
- print_source_lines (sal.symtab, sal.line, sal.line + 1, 0);
+ get_user_print_options (&opts);
+ if (opts.addressprint && mid_statement)
+ {
+ uiout->field_core_addr ("addr",
+ gdbarch, get_frame_pc (frame));
+ uiout->text ("\t");
}
+
+ print_source_lines (sal.symtab, sal.line, sal.line + 1, 0);
}
/* If disassemble-next-line is set to on and there is line debug
@@ -184,12 +184,6 @@ char *lim_at_start;
/* Hooks for alternate command interfaces. */
-/* Called from print_frame_info to list the line we stopped in. */
-
-void (*deprecated_print_frame_info_listing_hook) (struct symtab * s,
- int line,
- int stopline,
- int noerror);
/* Replaces most of query. */
int (*deprecated_query_hook) (const char *, va_list);
@@ -160,17 +160,6 @@ tui_refresh_frame_and_register_information (int registers_too_p)
do_cleanups (old_chain);
}
-/* Dummy callback for deprecated_print_frame_info_listing_hook which is called
- from print_frame_info. */
-
-static void
-tui_dummy_print_frame_info_listing_hook (struct symtab *s,
- int line,
- int stopline,
- int noerror)
-{
-}
-
/* Perform all necessary cleanups regarding our module's inferior data
that is required after the inferior INF just exited. */
@@ -219,13 +208,6 @@ static struct observer *tui_register_changed_observer;
void
tui_install_hooks (void)
{
- /* If this hook is not set to something then print_frame_info will
- assume that the CLI, not the TUI, is active, and will print the frame info
- for us in such a way that we are not prepared to handle. This hook is
- otherwise effectively obsolete. */
- deprecated_print_frame_info_listing_hook
- = tui_dummy_print_frame_info_listing_hook;
-
/* Install the event hooks. */
tui_bp_created_observer
= observer_attach_breakpoint_created (tui_event_create_breakpoint);
@@ -247,7 +229,6 @@ tui_install_hooks (void)
void
tui_remove_hooks (void)
{
- deprecated_print_frame_info_listing_hook = 0;
deprecated_query_hook = 0;
/* Remove our observers. */
observer_detach_breakpoint_created (tui_bp_created_observer);