Fix cast in TUI_DISASM_WIN
authorTom Tromey <tom@tromey.com>
Sat, 22 Feb 2020 18:48:26 +0000 (11:48 -0700)
committerTom Tromey <tom@tromey.com>
Sat, 22 Feb 2020 19:57:25 +0000 (12:57 -0700)
I noticed that the TUI_DISASM_WIN macro cast the disassembly window to
a base type, rather than its correct type.  This patch fixes this
oversight.

2020-02-22  Tom Tromey  <tom@tromey.com>

* tui/tui-data.h (TUI_DISASM_WIN): Cast to tui_disasm_window.

Change-Id: Ied3dbac9ef3dc48ceb9e0850fe4ada3c316dd769

gdb/ChangeLog
gdb/tui/tui-data.h

index f45b740cb7a06c6b3b141454466831541a18e4b4..1f604f76ee858e66f40e3f6c278f495691a6fffe 100644 (file)
@@ -1,3 +1,7 @@
+2020-02-22  Tom Tromey  <tom@tromey.com>
+
+       * tui/tui-data.h (TUI_DISASM_WIN): Cast to tui_disasm_window.
+
 2020-02-22  Tom Tromey  <tom@tromey.com>
 
        * tui/tui-win.c (_initialize_tui_win): Add usage text.
index 60c588ed1544843b7d9acf0520b05fe7eb487953..2dc73b963da0f62735c326e1219a3cfe974f70ac 100644 (file)
@@ -29,6 +29,7 @@
 struct tui_cmd_window;
 struct tui_source_window_base;
 struct tui_source_window;
+struct tui_disasm_window;
 
 /* A deleter that calls delwin.  */
 struct curses_deleter
@@ -229,7 +230,7 @@ public:
 extern struct tui_win_info *tui_win_list[MAX_MAJOR_WINDOWS];
 
 #define TUI_SRC_WIN     ((tui_source_window *) tui_win_list[SRC_WIN])
-#define TUI_DISASM_WIN ((tui_source_window_base *) tui_win_list[DISASSEM_WIN])
+#define TUI_DISASM_WIN ((tui_disasm_window *) tui_win_list[DISASSEM_WIN])
 #define TUI_DATA_WIN    ((tui_data_window *) tui_win_list[DATA_WIN])
 #define TUI_CMD_WIN     ((tui_cmd_window *) tui_win_list[CMD_WIN])