gdb/
[deliverable/binutils-gdb.git] / gdb / tui / tui-layout.c
index 75edde4dbcb018702766fe4db05b4506084e6abe..209817f814e5a91f1d5804152dd91f9d492aed20 100644 (file)
@@ -1,7 +1,6 @@
 /* TUI layout window management.
 
-   Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2007, 2008, 2009
-   Free Software Foundation, Inc.
+   Copyright (C) 1998-2004, 2007-2012 Free Software Foundation, Inc.
 
    Contributed by Hewlett-Packard Company.
 
@@ -21,6 +20,7 @@
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include "defs.h"
+#include "arch-utils.h"
 #include "command.h"
 #include "symtab.h"
 #include "frame.h"
@@ -467,8 +467,10 @@ tui_set_layout_for_display_command (const char *layout_name)
                 up this code.  - edie epstein  */
              if (subset_compare (buf_ptr, TUI_FLOAT_REGS_NAME))
                {
-                 if (TUI_DATA_WIN->detail.data_display_info.regs_display_type != TUI_SFLOAT_REGS
-                     && TUI_DATA_WIN->detail.data_display_info.regs_display_type != TUI_DFLOAT_REGS)
+                 if (TUI_DATA_WIN->detail.data_display_info.regs_display_type
+                     != TUI_SFLOAT_REGS
+                     && TUI_DATA_WIN->detail.data_display_info.regs_display_type
+                     != TUI_DFLOAT_REGS)
                    dpy_type = TUI_SFLOAT_REGS;
                  else
                    dpy_type =
@@ -483,10 +485,10 @@ tui_set_layout_for_display_command (const char *layout_name)
                dpy_type = TUI_SPECIAL_REGS;
              else if (TUI_DATA_WIN)
                {
-                 if (TUI_DATA_WIN->detail.data_display_info.regs_display_type !=
-                     TUI_UNDEFINED_REGS)
-                   dpy_type =
-                     TUI_DATA_WIN->detail.data_display_info.regs_display_type;
+                 if (TUI_DATA_WIN->detail.data_display_info.regs_display_type
+                     != TUI_UNDEFINED_REGS)
+                   dpy_type
+                     TUI_DATA_WIN->detail.data_display_info.regs_display_type;
                  else
                    dpy_type = TUI_GENERAL_REGS;
                }
@@ -522,7 +524,7 @@ static void
 extract_display_start_addr (struct gdbarch **gdbarch_p, CORE_ADDR *addr_p)
 {
   enum tui_layout_type cur_layout = tui_current_layout ();
-  struct gdbarch *gdbarch = NULL;
+  struct gdbarch *gdbarch = get_current_arch ();
   CORE_ADDR addr;
   CORE_ADDR pc;
   struct symtab_and_line cursal = get_current_source_symtab_and_line ();
This page took 0.025121 seconds and 4 git commands to generate.