summaryrefslogtreecommitdiff
path: root/gdb/tui
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/tui')
-rw-r--r--gdb/tui/ChangeLog28
-rw-r--r--gdb/tui/tui-hooks.c29
-rw-r--r--gdb/tui/tui.c27
-rw-r--r--gdb/tui/tuiCommand.c23
-rw-r--r--gdb/tui/tuiData.c21
-rw-r--r--gdb/tui/tuiDataWin.c21
-rw-r--r--gdb/tui/tuiDisassem.c30
-rw-r--r--gdb/tui/tuiGeneralWin.c21
-rw-r--r--gdb/tui/tuiIO.c29
-rw-r--r--gdb/tui/tuiLayout.c27
-rw-r--r--gdb/tui/tuiRegs.c27
-rw-r--r--gdb/tui/tuiSource.c28
-rw-r--r--gdb/tui/tuiSourceWin.c28
-rw-r--r--gdb/tui/tuiStack.c35
-rw-r--r--gdb/tui/tuiWin.c36
15 files changed, 156 insertions, 254 deletions
diff --git a/gdb/tui/ChangeLog b/gdb/tui/ChangeLog
index f44f9aa9a48..9ab34614aa0 100644
--- a/gdb/tui/ChangeLog
+++ b/gdb/tui/ChangeLog
@@ -1,3 +1,31 @@
+2003-06-22 Daniel Jacobowitz <drow@mvista.com>
+
+ * tui-hooks.c: Update include order.
+ * tui.c: Likewise.
+ * tuiCommand.c: Likewise.
+ * tuiData.c: Likewise.
+ * tuiDataWin.c: Likewise.
+ * tuiDisassem.c: Likewise.
+ * tuiGeneralWin.c: Likewise.
+ * tuiIO.c: Likewise.
+ * tuiLayout.c: Likewise.
+ * tuiRegs.c: Likewise.
+ * tuiSource.c: Likewise.
+ * tuiSourceWin.c: Likewise.
+ * tuiStack.c: Likewise.
+ * tuiWin.c: Likewise.
+
+2003-06-12 Andreas Schwab <schwab@suse.de>
+
+ * tuiSource.c (tuiVerticalSourceScroll): Use get_frame_pc.
+ * tuiSourceWin.c (tuiHorizontalSourceScroll): Likewise.
+ * tuiStack.c (tui_get_function_from_frame): Likewise.
+ (tuiShowFrameInfo): Likewise.
+ * tuiWin.c (_makeVisibleWithNewHeight): Likewise.
+ * tui-hooks.c (tui_selected_frame_level_changed_hook): Likewise.
+ * tuiDisassem.c (tuiVerticalDisassemScroll): Likewise.
+ Include "disasm.h".
+
2003-05-08 Andrew Cagney <cagney@redhat.com>
* tuiRegs.c: Use MAX_REGISTER_SIZE instead of
diff --git a/gdb/tui/tui-hooks.c b/gdb/tui/tui-hooks.c
index db6c3f666bf..e00ba857773 100644
--- a/gdb/tui/tui-hooks.c
+++ b/gdb/tui/tui-hooks.c
@@ -1,6 +1,6 @@
/* GDB hooks for TUI.
- Copyright 2001, 2002 Free Software Foundation, Inc.
+ Copyright 2001, 2002, 2003 Free Software Foundation, Inc.
This file is part of GDB.
@@ -19,23 +19,6 @@
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-/* FIXME: cagney/2002-02-28: The GDB coding standard indicates that
- "defs.h" should be included first. Unfortunatly some systems
- (currently Debian GNU/Linux) include the <stdbool.h> via <curses.h>
- and they clash with "bfd.h"'s definiton of true/false. The correct
- fix is to remove true/false from "bfd.h", however, until that
- happens, hack around it by including "config.h" and <curses.h>
- first. */
-
-#include "config.h"
-#ifdef HAVE_NCURSES_H
-#include <ncurses.h>
-#else
-#ifdef HAVE_CURSES_H
-#include <curses.h>
-#endif
-#endif
-
#include "defs.h"
#include "symtab.h"
#include "inferior.h"
@@ -66,6 +49,14 @@
#include "tuiDataWin.h"
#include "tuiSourceWin.h"
+#ifdef HAVE_NCURSES_H
+#include <ncurses.h>
+#else
+#ifdef HAVE_CURSES_H
+#include <curses.h>
+#endif
+#endif
+
int tui_target_has_run = 0;
static void (* tui_target_new_objfile_chain) (struct objfile*);
@@ -250,7 +241,7 @@ tui_selected_frame_level_changed_hook (int level)
{
struct symtab *s;
- s = find_pc_symtab (fi->pc);
+ s = find_pc_symtab (get_frame_pc (fi));
/* elz: this if here fixes the problem with the pc not being displayed
in the tui asm layout, with no debug symbols. The value of s
would be 0 here, and select_source_symtab would abort the
diff --git a/gdb/tui/tui.c b/gdb/tui/tui.c
index 517cf461cc5..7e665d58a79 100644
--- a/gdb/tui/tui.c
+++ b/gdb/tui/tui.c
@@ -1,6 +1,6 @@
/* General functions for the WDB TUI.
- Copyright 1998, 1999, 2000, 2001, 2002 Free Software Foundation,
+ Copyright 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation,
Inc.
Contributed by Hewlett-Packard Company.
@@ -22,23 +22,6 @@
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-/* FIXME: cagney/2002-02-28: The GDB coding standard indicates that
- "defs.h" should be included first. Unfortunatly some systems
- (currently Debian GNU/Linux) include the <stdbool.h> via <curses.h>
- and they clash with "bfd.h"'s definiton of true/false. The correct
- fix is to remove true/false from "bfd.h", however, until that
- happens, hack around it by including "config.h" and <curses.h>
- first. */
-
-#include "config.h"
-#ifdef HAVE_NCURSES_H
-#include <ncurses.h>
-#else
-#ifdef HAVE_CURSES_H
-#include <curses.h>
-#endif
-#endif
-
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
@@ -70,6 +53,14 @@
#include "symtab.h"
#include "source.h"
+#ifdef HAVE_NCURSES_H
+#include <ncurses.h>
+#else
+#ifdef HAVE_CURSES_H
+#include <curses.h>
+#endif
+#endif
+
/* Tells whether the TUI is active or not. */
int tui_active = 0;
static int tui_finish_init = 1;
diff --git a/gdb/tui/tuiCommand.c b/gdb/tui/tuiCommand.c
index ca3d5318ea9..675b34c5443 100644
--- a/gdb/tui/tuiCommand.c
+++ b/gdb/tui/tuiCommand.c
@@ -1,6 +1,6 @@
/* Specific command window processing.
- Copyright 1998, 1999, 2000, 2001, 2002 Free Software Foundation,
+ Copyright 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation,
Inc.
Contributed by Hewlett-Packard Company.
@@ -22,15 +22,13 @@
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-/* FIXME: cagney/2002-02-28: The GDB coding standard indicates that
- "defs.h" should be included first. Unfortunatly some systems
- (currently Debian GNU/Linux) include the <stdbool.h> via <curses.h>
- and they clash with "bfd.h"'s definiton of true/false. The correct
- fix is to remove true/false from "bfd.h", however, until that
- happens, hack around it by including "config.h" and <curses.h>
- first. */
+#include "defs.h"
+#include <ctype.h>
+#include "tui.h"
+#include "tuiData.h"
+#include "tuiWin.h"
+#include "tuiIO.h"
-#include "config.h"
#ifdef HAVE_NCURSES_H
#include <ncurses.h>
#else
@@ -39,13 +37,6 @@
#endif
#endif
-#include "defs.h"
-#include <ctype.h>
-#include "tui.h"
-#include "tuiData.h"
-#include "tuiWin.h"
-#include "tuiIO.h"
-
/*****************************************
** STATIC LOCAL FUNCTIONS FORWARD DECLS **
diff --git a/gdb/tui/tuiData.c b/gdb/tui/tuiData.c
index 225583ea70c..5acc33cc67d 100644
--- a/gdb/tui/tuiData.c
+++ b/gdb/tui/tuiData.c
@@ -1,6 +1,6 @@
/* TUI data manipulation routines.
- Copyright 1998, 1999, 2000, 2001, 2002 Free Software Foundation,
+ Copyright 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation,
Inc.
Contributed by Hewlett-Packard Company.
@@ -22,15 +22,12 @@
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-/* FIXME: cagney/2002-02-28: The GDB coding standard indicates that
- "defs.h" should be included first. Unfortunatly some systems
- (currently Debian GNU/Linux) include the <stdbool.h> via <curses.h>
- and they clash with "bfd.h"'s definiton of true/false. The correct
- fix is to remove true/false from "bfd.h", however, until that
- happens, hack around it by including "config.h" and <curses.h>
- first. */
+#include "defs.h"
+#include "symtab.h"
+#include "tui.h"
+#include "tuiData.h"
+#include "tuiGeneralWin.h"
-#include "config.h"
#ifdef HAVE_NCURSES_H
#include <ncurses.h>
#else
@@ -39,12 +36,6 @@
#endif
#endif
-#include "defs.h"
-#include "symtab.h"
-#include "tui.h"
-#include "tuiData.h"
-#include "tuiGeneralWin.h"
-
/****************************
** GLOBAL DECLARATIONS
****************************/
diff --git a/gdb/tui/tuiDataWin.c b/gdb/tui/tuiDataWin.c
index e729afc7f72..f3bedd2d6b9 100644
--- a/gdb/tui/tuiDataWin.c
+++ b/gdb/tui/tuiDataWin.c
@@ -1,6 +1,6 @@
/* Data/register window display.
- Copyright 1998, 1999, 2000, 2001, 2002 Free Software Foundation,
+ Copyright 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation,
Inc.
Contributed by Hewlett-Packard Company.
@@ -22,15 +22,12 @@
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-/* FIXME: cagney/2002-02-28: The GDB coding standard indicates that
- "defs.h" should be included first. Unfortunatly some systems
- (currently Debian GNU/Linux) include the <stdbool.h> via <curses.h>
- and they clash with "bfd.h"'s definiton of true/false. The correct
- fix is to remove true/false from "bfd.h", however, until that
- happens, hack around it by including "config.h" and <curses.h>
- first. */
+#include "defs.h"
+#include "tui.h"
+#include "tuiData.h"
+#include "tuiGeneralWin.h"
+#include "tuiRegs.h"
-#include "config.h"
#ifdef HAVE_NCURSES_H
#include <ncurses.h>
#else
@@ -39,12 +36,6 @@
#endif
#endif
-#include "defs.h"
-#include "tui.h"
-#include "tuiData.h"
-#include "tuiGeneralWin.h"
-#include "tuiRegs.h"
-
/*****************************************
** STATIC LOCAL FUNCTIONS FORWARD DECLS **
diff --git a/gdb/tui/tuiDisassem.c b/gdb/tui/tuiDisassem.c
index 0ddf32c1b99..e36c5df521b 100644
--- a/gdb/tui/tuiDisassem.c
+++ b/gdb/tui/tuiDisassem.c
@@ -1,6 +1,6 @@
/* Disassembly display.
- Copyright 1998, 1999, 2000, 2001, 2002 Free Software Foundation,
+ Copyright 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation,
Inc.
Contributed by Hewlett-Packard Company.
@@ -22,29 +22,13 @@
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-/* FIXME: cagney/2002-02-28: The GDB coding standard indicates that
- "defs.h" should be included first. Unfortunatly some systems
- (currently Debian GNU/Linux) include the <stdbool.h> via <curses.h>
- and they clash with "bfd.h"'s definiton of true/false. The correct
- fix is to remove true/false from "bfd.h", however, until that
- happens, hack around it by including "config.h" and <curses.h>
- first. */
-
-#include "config.h"
-#ifdef HAVE_NCURSES_H
-#include <ncurses.h>
-#else
-#ifdef HAVE_CURSES_H
-#include <curses.h>
-#endif
-#endif
-
#include "defs.h"
#include "symtab.h"
#include "breakpoint.h"
#include "frame.h"
#include "value.h"
#include "source.h"
+#include "disasm.h"
#include "tui.h"
#include "tuiData.h"
@@ -54,6 +38,14 @@
#include "tuiStack.h"
#include "tui-file.h"
+#ifdef HAVE_NCURSES_H
+#include <ncurses.h>
+#else
+#ifdef HAVE_CURSES_H
+#include <curses.h>
+#endif
+#endif
+
struct tui_asm_line
{
CORE_ADDR addr;
@@ -408,7 +400,7 @@ tuiVerticalDisassemScroll (TuiScrollDirection scrollDirection,
content = (TuiWinContent) disassemWin->generic.content;
if (cursal.symtab == (struct symtab *) NULL)
- s = find_pc_symtab (deprecated_selected_frame->pc);
+ s = find_pc_symtab (get_frame_pc (deprecated_selected_frame));
else
s = cursal.symtab;
diff --git a/gdb/tui/tuiGeneralWin.c b/gdb/tui/tuiGeneralWin.c
index e250ca2ac78..42faf756284 100644
--- a/gdb/tui/tuiGeneralWin.c
+++ b/gdb/tui/tuiGeneralWin.c
@@ -1,6 +1,6 @@
/* General window behavior.
- Copyright 1998, 1999, 2000, 2001, 2002 Free Software Foundation,
+ Copyright 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation,
Inc.
Contributed by Hewlett-Packard Company.
@@ -22,15 +22,12 @@
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-/* FIXME: cagney/2002-02-28: The GDB coding standard indicates that
- "defs.h" should be included first. Unfortunatly some systems
- (currently Debian GNU/Linux) include the <stdbool.h> via <curses.h>
- and they clash with "bfd.h"'s definiton of true/false. The correct
- fix is to remove true/false from "bfd.h", however, until that
- happens, hack around it by including "config.h" and <curses.h>
- first. */
+#include "defs.h"
+#include "tui.h"
+#include "tuiData.h"
+#include "tuiGeneralWin.h"
+#include "tuiWin.h"
-#include "config.h"
#ifdef HAVE_NCURSES_H
#include <ncurses.h>
#else
@@ -39,12 +36,6 @@
#endif
#endif
-#include "defs.h"
-#include "tui.h"
-#include "tuiData.h"
-#include "tuiGeneralWin.h"
-#include "tuiWin.h"
-
/***********************
** PUBLIC FUNCTIONS
***********************/
diff --git a/gdb/tui/tuiIO.c b/gdb/tui/tuiIO.c
index f53cef39d23..1a8bbc2037a 100644
--- a/gdb/tui/tuiIO.c
+++ b/gdb/tui/tuiIO.c
@@ -1,6 +1,6 @@
/* TUI support I/O functions.
- Copyright 1998, 1999, 2000, 2001, 2002 Free Software Foundation,
+ Copyright 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation,
Inc.
Contributed by Hewlett-Packard Company.
@@ -22,24 +22,6 @@
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-/* FIXME: cagney/2002-02-28: The GDB coding standard indicates that
- "defs.h" should be included first. Unfortunatly some systems
- (currently Debian GNU/Linux) include the <stdbool.h> via <curses.h>
- and they clash with "bfd.h"'s definiton of true/false. The correct
- fix is to remove true/false from "bfd.h", however, until that
- happens, hack around it by including "config.h" and <curses.h>
- first. */
-
-#include "config.h"
-#ifdef HAVE_NCURSES_H
-#include <ncurses.h>
-#else
-#ifdef HAVE_CURSES_H
-#include <curses.h>
-#endif
-#endif
-
-#include <stdio.h>
#include "defs.h"
#include "terminal.h"
#include "target.h"
@@ -59,6 +41,15 @@
#include "cli-out.h"
#include <fcntl.h>
#include <signal.h>
+#include <stdio.h>
+
+#ifdef HAVE_NCURSES_H
+#include <ncurses.h>
+#else
+#ifdef HAVE_CURSES_H
+#include <curses.h>
+#endif
+#endif
/* Use definition from readline 4.3. */
#undef CTRL_CHAR
diff --git a/gdb/tui/tuiLayout.c b/gdb/tui/tuiLayout.c
index cddbd14342f..b79bfcb8c28 100644
--- a/gdb/tui/tuiLayout.c
+++ b/gdb/tui/tuiLayout.c
@@ -1,6 +1,6 @@
/* TUI layout window management.
- Copyright 1998, 1999, 2000, 2001, 2002 Free Software Foundation,
+ Copyright 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation,
Inc.
Contributed by Hewlett-Packard Company.
@@ -22,23 +22,6 @@
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-/* FIXME: cagney/2002-02-28: The GDB coding standard indicates that
- "defs.h" should be included first. Unfortunatly some systems
- (currently Debian GNU/Linux) include the <stdbool.h> via <curses.h>
- and they clash with "bfd.h"'s definiton of true/false. The correct
- fix is to remove true/false from "bfd.h", however, until that
- happens, hack around it by including "config.h" and <curses.h>
- first. */
-
-#include "config.h"
-#ifdef HAVE_NCURSES_H
-#include <ncurses.h>
-#else
-#ifdef HAVE_CURSES_H
-#include <curses.h>
-#endif
-#endif
-
#include "defs.h"
#include "command.h"
#include "symtab.h"
@@ -56,6 +39,14 @@
#include "tuiSourceWin.h"
#include "tuiDisassem.h"
+#ifdef HAVE_NCURSES_H
+#include <ncurses.h>
+#else
+#ifdef HAVE_CURSES_H
+#include <curses.h>
+#endif
+#endif
+
/*******************************
** Static Local Decls
********************************/
diff --git a/gdb/tui/tuiRegs.c b/gdb/tui/tuiRegs.c
index 61b933444da..9f0b1a4d845 100644
--- a/gdb/tui/tuiRegs.c
+++ b/gdb/tui/tuiRegs.c
@@ -1,6 +1,6 @@
/* TUI display registers in window.
- Copyright 1998, 1999, 2000, 2001, 2002 Free Software Foundation,
+ Copyright 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation,
Inc.
Contributed by Hewlett-Packard Company.
@@ -22,23 +22,6 @@
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-/* FIXME: cagney/2002-02-28: The GDB coding standard indicates that
- "defs.h" should be included first. Unfortunatly some systems
- (currently Debian GNU/Linux) include the <stdbool.h> via <curses.h>
- and they clash with "bfd.h"'s definiton of true/false. The correct
- fix is to remove true/false from "bfd.h", however, until that
- happens, hack around it by including "config.h" and <curses.h>
- first. */
-
-#include "config.h"
-#ifdef HAVE_NCURSES_H
-#include <ncurses.h>
-#else
-#ifdef HAVE_CURSES_H
-#include <curses.h>
-#endif
-#endif
-
#include "defs.h"
#include "tui.h"
#include "tuiData.h"
@@ -55,6 +38,14 @@
#include "tuiGeneralWin.h"
#include "tui-file.h"
+#ifdef HAVE_NCURSES_H
+#include <ncurses.h>
+#else
+#ifdef HAVE_CURSES_H
+#include <curses.h>
+#endif
+#endif
+
/*****************************************
** LOCAL DEFINITIONS **
******************************************/
diff --git a/gdb/tui/tuiSource.c b/gdb/tui/tuiSource.c
index ceccd64532e..6428130d780 100644
--- a/gdb/tui/tuiSource.c
+++ b/gdb/tui/tuiSource.c
@@ -1,6 +1,6 @@
/* TUI display source window.
- Copyright 1998, 1999, 2000, 2001, 2002 Free Software Foundation,
+ Copyright 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation,
Inc.
Contributed by Hewlett-Packard Company.
@@ -22,23 +22,6 @@
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-/* FIXME: cagney/2002-02-28: The GDB coding standard indicates that
- "defs.h" should be included first. Unfortunatly some systems
- (currently Debian GNU/Linux) include the <stdbool.h> via <curses.h>
- and they clash with "bfd.h"'s definiton of true/false. The correct
- fix is to remove true/false from "bfd.h", however, until that
- happens, hack around it by including "config.h" and <curses.h>
- first. */
-
-#include "config.h"
-#ifdef HAVE_NCURSES_H
-#include <ncurses.h>
-#else
-#ifdef HAVE_CURSES_H
-#include <curses.h>
-#endif
-#endif
-
#include "defs.h"
#include <ctype.h>
#include "symtab.h"
@@ -53,6 +36,13 @@
#include "tuiSourceWin.h"
#include "tuiSource.h"
+#ifdef HAVE_NCURSES_H
+#include <ncurses.h>
+#else
+#ifdef HAVE_CURSES_H
+#include <curses.h>
+#endif
+#endif
/* Function to display source in the source window. */
TuiStatus
@@ -340,7 +330,7 @@ tuiVerticalSourceScroll (TuiScrollDirection scrollDirection,
struct symtab_and_line cursal = get_current_source_symtab_and_line ();
if (cursal.symtab == (struct symtab *) NULL)
- s = find_pc_symtab (deprecated_selected_frame->pc);
+ s = find_pc_symtab (get_frame_pc (deprecated_selected_frame));
else
s = cursal.symtab;
diff --git a/gdb/tui/tuiSourceWin.c b/gdb/tui/tuiSourceWin.c
index ae844ce7029..cf5a0793f65 100644
--- a/gdb/tui/tuiSourceWin.c
+++ b/gdb/tui/tuiSourceWin.c
@@ -1,6 +1,6 @@
/* TUI display source/assembly window.
- Copyright 1998, 1999, 2000, 2001, 2002 Free Software Foundation,
+ Copyright 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation,
Inc.
Contributed by Hewlett-Packard Company.
@@ -22,23 +22,6 @@
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-/* FIXME: cagney/2002-02-28: The GDB coding standard indicates that
- "defs.h" should be included first. Unfortunatly some systems
- (currently Debian GNU/Linux) include the <stdbool.h> via <curses.h>
- and they clash with "bfd.h"'s definiton of true/false. The correct
- fix is to remove true/false from "bfd.h", however, until that
- happens, hack around it by including "config.h" and <curses.h>
- first. */
-
-#include "config.h"
-#ifdef HAVE_NCURSES_H
-#include <ncurses.h>
-#else
-#ifdef HAVE_CURSES_H
-#include <curses.h>
-#endif
-#endif
-
#include "defs.h"
#include <ctype.h>
#include "symtab.h"
@@ -56,6 +39,13 @@
#include "tuiSource.h"
#include "tuiDisassem.h"
+#ifdef HAVE_NCURSES_H
+#include <ncurses.h>
+#else
+#ifdef HAVE_CURSES_H
+#include <curses.h>
+#endif
+#endif
/* Function to display the "main" routine. */
void
@@ -355,7 +345,7 @@ tuiHorizontalSourceScroll (TuiWinInfoPtr winInfo,
struct symtab_and_line cursal = get_current_source_symtab_and_line ();
if (cursal.symtab == (struct symtab *) NULL)
- s = find_pc_symtab (deprecated_selected_frame->pc);
+ s = find_pc_symtab (get_frame_pc (deprecated_selected_frame));
else
s = cursal.symtab;
diff --git a/gdb/tui/tuiStack.c b/gdb/tui/tuiStack.c
index 69a6b6c662f..a6ad07af1c3 100644
--- a/gdb/tui/tuiStack.c
+++ b/gdb/tui/tuiStack.c
@@ -1,6 +1,6 @@
/* TUI display locator.
- Copyright 1998, 1999, 2000, 2001, 2002 Free Software Foundation,
+ Copyright 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation,
Inc.
Contributed by Hewlett-Packard Company.
@@ -22,23 +22,6 @@
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-/* FIXME: cagney/2002-02-28: The GDB coding standard indicates that
- "defs.h" should be included first. Unfortunatly some systems
- (currently Debian GNU/Linux) include the <stdbool.h> via <curses.h>
- and they clash with "bfd.h"'s definiton of true/false. The correct
- fix is to remove true/false from "bfd.h", however, until that
- happens, hack around it by including "config.h" and <curses.h>
- first. */
-
-#include "config.h"
-#ifdef HAVE_NCURSES_H
-#include <ncurses.h>
-#else
-#ifdef HAVE_CURSES_H
-#include <curses.h>
-#endif
-#endif
-
#include "defs.h"
#include "symtab.h"
#include "breakpoint.h"
@@ -56,6 +39,13 @@
#include "tuiSourceWin.h"
#include "tui-file.h"
+#ifdef HAVE_NCURSES_H
+#include <ncurses.h>
+#else
+#ifdef HAVE_CURSES_H
+#include <curses.h>
+#endif
+#endif
/* Get a printable name for the function at the address.
The symbol name is demangled if demangling is turned on.
@@ -233,7 +223,7 @@ tui_get_function_from_frame (struct frame_info *fi)
struct ui_file *stream = tui_sfileopen (256);
char *p;
- print_address_symbolic (fi->pc, stream, demangle, "");
+ print_address_symbolic (get_frame_pc (fi), stream, demangle, "");
p = tui_file_get_strbuf (stream);
/* Use simple heuristics to isolate the function name. The symbol can
@@ -356,7 +346,7 @@ tuiShowFrameInfo (struct frame_info *fi)
tui_set_locator_info (sal.symtab == 0 ? "??" : sal.symtab->filename,
tui_get_function_from_frame (fi),
sal.line,
- fi->pc);
+ get_frame_pc (fi));
tuiShowLocatorContent ();
startLine = 0;
for (i = 0; i < (sourceWindows ())->count; i++)
@@ -374,10 +364,11 @@ tuiShowFrameInfo (struct frame_info *fi)
}
else
{
- if (find_pc_partial_function (fi->pc, (char **) NULL, &low, (CORE_ADDR) NULL) == 0)
+ if (find_pc_partial_function (get_frame_pc (fi), (char **) NULL,
+ &low, (CORE_ADDR) NULL) == 0)
error ("No function contains program counter for selected frame.\n");
else
- low = tuiGetLowDisassemblyAddress (low, fi->pc);
+ low = tuiGetLowDisassemblyAddress (low, get_frame_pc (fi));
}
if (winInfo == srcWin)
diff --git a/gdb/tui/tuiWin.c b/gdb/tui/tuiWin.c
index 9ad82f57a65..ecd4920601b 100644
--- a/gdb/tui/tuiWin.c
+++ b/gdb/tui/tuiWin.c
@@ -1,6 +1,6 @@
/* TUI window generic functions.
- Copyright 1998, 1999, 2000, 2001, 2002 Free Software Foundation,
+ Copyright 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation,
Inc.
Contributed by Hewlett-Packard Company.
@@ -27,26 +27,6 @@
Author: Susan B. Macchia */
-/* FIXME: cagney/2002-02-28: The GDB coding standard indicates that
- "defs.h" should be included first. Unfortunatly some systems
- (currently Debian GNU/Linux) include the <stdbool.h> via <curses.h>
- and they clash with "bfd.h"'s definiton of true/false. The correct
- fix is to remove true/false from "bfd.h", however, until that
- happens, hack around it by including "config.h" and <curses.h>
- first. */
-
-#include "config.h"
-#ifdef HAVE_NCURSES_H
-#include <ncurses.h>
-#else
-#ifdef HAVE_CURSES_H
-#include <curses.h>
-#endif
-#endif
-
-#include <string.h>
-#include <ctype.h>
-#include <readline/readline.h>
#include "defs.h"
#include "command.h"
#include "symtab.h"
@@ -66,6 +46,18 @@
#include "tuiSourceWin.h"
#include "tuiDataWin.h"
+#ifdef HAVE_NCURSES_H
+#include <ncurses.h>
+#else
+#ifdef HAVE_CURSES_H
+#include <curses.h>
+#endif
+#endif
+
+#include <string.h>
+#include <ctype.h>
+#include <readline/readline.h>
+
/*******************************
** Static Local Decls
********************************/
@@ -1406,7 +1398,7 @@ _makeVisibleWithNewHeight (TuiWinInfoPtr winInfo)
struct symtab_and_line cursal = get_current_source_symtab_and_line ();
- s = find_pc_symtab (deprecated_selected_frame->pc);
+ s = find_pc_symtab (get_frame_pc (deprecated_selected_frame));
if (winInfo->generic.type == SRC_WIN)
line.lineNo = cursal.line;
else