gdb: Remove register class specific layout names.
authorAndrew Burgess <andrew.burgess@embecosm.com>
Wed, 20 May 2015 21:35:07 +0000 (23:35 +0200)
committerAndrew Burgess <andrew.burgess@embecosm.com>
Thu, 21 May 2015 18:47:24 +0000 (20:47 +0200)
The layout command supports the layout names $FREGS, $GREGS, $SREGS,
and $REGS. The intention of these layout names was to display the tui
register window with a specific set of registers.

First, these layout names no longer work, and haven't for a while, using
any of them will just result in switching to the general register view.

Second there is already the command 'tui reg GROUP' command to set the
displayed register set to GROUP, so making the layout command also
control the register set feels like unnecessary overloading of the
layout command.

This commit removes all code relating to supporting the register set
specific names from the layout command.  Afterwards the user can select
an available layout using the layout command, and control the choice of
register set using the 'tui reg GROUP' command.

gdb/ChangeLog:

* tui/tui-layout.c (tui_set_layout): Remove
tui_register_display_type parameter.  Remove all checking of this
parameter, and reindent function.  Update header comment.
(tui_set_layout_for_display_command): Rename to...
(tui_set_layout_by_name): ...this, and don't check for different
register class types, don't pass a tui_register_display_type to
tui_set_layout.  Update header comment.
(layout_names): Remove register set specific names.
* tui/tui-layout.h (tui_set_layout): Remove
tui_register_display_type parameter.
* tui/tui.c (tui_rl_change_windows): Don't pass a
tui_register_display_type to tui_set_layout.
(tui_rl_delete_other_windows): Likewise.
(tui_enable): Likewise.
* tui/tui-data.h (TUI_FLOAT_REGS_NAME): Remove.
(TUI_FLOAT_REGS_NAME_LOWER): Remove.
(TUI_GENERAL_REGS_NAME): Remove.
(TUI_GENERAL_REGS_NAME_LOWER): Remove.
(TUI_SPECIAL_REGS_NAME): Remove.
(TUI_SPECIAL_REGS_NAME_LOWER): Remove.
(TUI_GENERAL_SPECIAL_REGS_NAME): Remove.
(TUI_GENERAL_SPECIAL_REGS_NAME_LOWER): Remove.
(enum tui_register_display_type): Remove.
(struct tui_layout_def): Remove regs_display_type and
float_regs_display_type fields.
(struct tui_data_info): Remove regs_display_type field.
(tui_layout_command): Use new name for
tui_set_layout_for_display_command.
* tui/tui-data.c (layout_def): Don't initialise removed fields.
(tui_clear_win_detail): Don't initialise removed fields of
win_info.
* tui/tui-regs.c (tui_show_registers): Use new name for
tui_set_layout_for_display_command.
* tui/tui.h (tui_set_layout_for_display_command): Rename
declaration to...
(tui_set_layout_by_name): ...this.
* printcmd.c (display_command): Remove tui related layout call,
and reindent.

gdb/ChangeLog
gdb/printcmd.c
gdb/tui/tui-data.c
gdb/tui/tui-data.h
gdb/tui/tui-layout.c
gdb/tui/tui-layout.h
gdb/tui/tui-regs.c
gdb/tui/tui.c
gdb/tui/tui.h

index 28d6b7188b25da9c35685256bba9fe2554dcd689..5957824e06104a11062412acb6dc7f2e212515c9 100644 (file)
@@ -1,3 +1,44 @@
+2015-05-21  Andrew Burgess  <andrew.burgess@embecosm.com>
+
+       * tui/tui-layout.c (tui_set_layout): Remove
+       tui_register_display_type parameter.  Remove all checking of this
+       parameter, and reindent function.  Update header comment.
+       (tui_set_layout_for_display_command): Rename to...
+       (tui_set_layout_by_name): ...this, and don't check for different
+       register class types, don't pass a tui_register_display_type to
+       tui_set_layout.  Update header comment.
+       (layout_names): Remove register set specific names.
+       * tui/tui-layout.h (tui_set_layout): Remove
+       tui_register_display_type parameter.
+       * tui/tui.c (tui_rl_change_windows): Don't pass a
+       tui_register_display_type to tui_set_layout.
+       (tui_rl_delete_other_windows): Likewise.
+       (tui_enable): Likewise.
+       * tui/tui-data.h (TUI_FLOAT_REGS_NAME): Remove.
+       (TUI_FLOAT_REGS_NAME_LOWER): Remove.
+       (TUI_GENERAL_REGS_NAME): Remove.
+       (TUI_GENERAL_REGS_NAME_LOWER): Remove.
+       (TUI_SPECIAL_REGS_NAME): Remove.
+       (TUI_SPECIAL_REGS_NAME_LOWER): Remove.
+       (TUI_GENERAL_SPECIAL_REGS_NAME): Remove.
+       (TUI_GENERAL_SPECIAL_REGS_NAME_LOWER): Remove.
+       (enum tui_register_display_type): Remove.
+       (struct tui_layout_def): Remove regs_display_type and
+       float_regs_display_type fields.
+       (struct tui_data_info): Remove regs_display_type field.
+       (tui_layout_command): Use new name for
+       tui_set_layout_for_display_command.
+       * tui/tui-data.c (layout_def): Don't initialise removed fields.
+       (tui_clear_win_detail): Don't initialise removed fields of
+       win_info.
+       * tui/tui-regs.c (tui_show_registers): Use new name for
+       tui_set_layout_for_display_command.
+       * tui/tui.h (tui_set_layout_for_display_command): Rename
+       declaration to...
+       (tui_set_layout_by_name): ...this.
+       * printcmd.c (display_command): Remove tui related layout call,
+       and reindent.
+
 2015-05-20  Joel Brobecker  <brobecker@adacore.com>
 
        * infrun.c (handle_inferior_event_1): Renames handle_inferior_event.
index 0ae402fc0a9b4949dd0949a49b3291c001ba89d5..a739a892e7c88d2f31df55d7bf7b9ae00bb76bba 100644 (file)
@@ -1506,61 +1506,50 @@ display_command (char *arg, int from_tty)
   struct format_data fmt;
   struct expression *expr;
   struct display *newobj;
-  int display_it = 1;
   const char *exp = arg;
 
-#if defined(TUI)
-  /* NOTE: cagney/2003-02-13 The `tui_active' was previously
-     `tui_version'.  */
-  if (tui_active && exp != NULL && *exp == '$')
-    display_it = (tui_set_layout_for_display_command (exp) == TUI_FAILURE);
-#endif
-
-  if (display_it)
+  if (exp == 0)
     {
-      if (exp == 0)
-       {
-         do_displays ();
-         return;
-       }
+      do_displays ();
+      return;
+    }
 
-      if (*exp == '/')
-       {
-         exp++;
-         fmt = decode_format (&exp, 0, 0);
-         if (fmt.size && fmt.format == 0)
-           fmt.format = 'x';
-         if (fmt.format == 'i' || fmt.format == 's')
-           fmt.size = 'b';
-       }
-      else
-       {
-         fmt.format = 0;
-         fmt.size = 0;
-         fmt.count = 0;
-         fmt.raw = 0;
-       }
+  if (*exp == '/')
+    {
+      exp++;
+      fmt = decode_format (&exp, 0, 0);
+      if (fmt.size && fmt.format == 0)
+       fmt.format = 'x';
+      if (fmt.format == 'i' || fmt.format == 's')
+       fmt.size = 'b';
+    }
+  else
+    {
+      fmt.format = 0;
+      fmt.size = 0;
+      fmt.count = 0;
+      fmt.raw = 0;
+    }
 
-      innermost_block = NULL;
-      expr = parse_expression (exp);
+  innermost_block = NULL;
+  expr = parse_expression (exp);
 
-      newobj = (struct display *) xmalloc (sizeof (struct display));
+  newobj = (struct display *) xmalloc (sizeof (struct display));
 
-      newobj->exp_string = xstrdup (exp);
-      newobj->exp = expr;
-      newobj->block = innermost_block;
-      newobj->pspace = current_program_space;
-      newobj->next = display_chain;
-      newobj->number = ++display_number;
-      newobj->format = fmt;
-      newobj->enabled_p = 1;
-      display_chain = newobj;
+  newobj->exp_string = xstrdup (exp);
+  newobj->exp = expr;
+  newobj->block = innermost_block;
+  newobj->pspace = current_program_space;
+  newobj->next = display_chain;
+  newobj->number = ++display_number;
+  newobj->format = fmt;
+  newobj->enabled_p = 1;
+  display_chain = newobj;
 
-      if (from_tty)
-       do_one_display (newobj);
+  if (from_tty)
+    do_one_display (newobj);
 
-      dont_repeat ();
-    }
+  dont_repeat ();
 }
 
 static void
index ffd80d5912b2fb00a47614afe6c69f01c411ccb4..ed42c8d9b4e0d7b8ca7fd7924c6f500d53c388e1 100644 (file)
@@ -44,9 +44,7 @@ static int default_tab_len = DEFAULT_TAB_LEN;
 static struct tui_win_info *win_with_focus = (struct tui_win_info *) NULL;
 static struct tui_layout_def layout_def = {
   SRC_WIN,                     /* DISPLAY_MODE */
-  FALSE,                       /* SPLIT */
-  TUI_UNDEFINED_REGS,          /* REGS_DISPLAY_TYPE */
-  TUI_SFLOAT_REGS};            /* FLOAT_REGS_DISPLAY_TYPE */
+  FALSE};                      /* SPLIT */
 
 static int win_resized = FALSE;
 
@@ -224,8 +222,6 @@ tui_clear_win_detail (struct tui_win_info *win_info)
          win_info->detail.data_display_info.regs_content =
            (tui_win_content) NULL;
          win_info->detail.data_display_info.regs_content_count = 0;
-         win_info->detail.data_display_info.regs_display_type =
-           TUI_UNDEFINED_REGS;
          win_info->detail.data_display_info.regs_column_count = 1;
          win_info->detail.data_display_info.display_regs = FALSE;
          break;
@@ -544,8 +540,6 @@ init_win_info (struct tui_win_info *win_info)
       win_info->detail.data_display_info.data_content_count = 0;
       win_info->detail.data_display_info.regs_content = (tui_win_content) NULL;
       win_info->detail.data_display_info.regs_content_count = 0;
-      win_info->detail.data_display_info.regs_display_type =
-       TUI_UNDEFINED_REGS;
       win_info->detail.data_display_info.regs_column_count = 1;
       win_info->detail.data_display_info.display_regs = FALSE;
       win_info->detail.data_display_info.current_group = 0;
@@ -745,8 +739,6 @@ tui_free_window (struct tui_win_info *win_info)
          win_info->detail.data_display_info.data_content =
            (tui_win_content) NULL;
          win_info->detail.data_display_info.data_content_count = 0;
-         win_info->detail.data_display_info.regs_display_type =
-           TUI_UNDEFINED_REGS;
          win_info->detail.data_display_info.regs_column_count = 1;
          win_info->detail.data_display_info.display_regs = FALSE;
          win_info->generic.content = NULL;
index 7651efd6cca100871bf02cf3d12334857ec8295a..05263e318f58d9d9a74825de43379b7368b9e2ae 100644 (file)
@@ -92,15 +92,6 @@ struct tui_gen_win_info
 #define MAX_TARGET_WIDTH  10
 #define MAX_PID_WIDTH     19
 
-#define TUI_FLOAT_REGS_NAME                  "$FREGS"
-#define TUI_FLOAT_REGS_NAME_LOWER            "$fregs"
-#define TUI_GENERAL_REGS_NAME                "$GREGS"
-#define TUI_GENERAL_REGS_NAME_LOWER          "$gregs"
-#define TUI_SPECIAL_REGS_NAME                "$SREGS"
-#define TUI_SPECIAL_REGS_NAME_LOWER          "$sregs"
-#define TUI_GENERAL_SPECIAL_REGS_NAME        "$REGS"
-#define TUI_GENERAL_SPECIAL_REGS_NAME_LOWER  "$regs"
-
 /* Scroll direction enum.  */
 enum tui_scroll_direction
 {
@@ -139,17 +130,6 @@ enum tui_data_type
   TUI_STRUCT
 };
 
-/* Types of register displays.  */
-enum tui_register_display_type
-{
-  TUI_UNDEFINED_REGS,
-  TUI_GENERAL_REGS,
-  TUI_SFLOAT_REGS,
-  TUI_DFLOAT_REGS,
-  TUI_SPECIAL_REGS,
-  TUI_GENERAL_AND_SPECIAL_REGS
-};
-
 enum tui_line_or_address_kind
 {
   LOA_LINE,
@@ -172,8 +152,6 @@ struct tui_layout_def
 {
   enum tui_win_type display_mode;
   int split;
-  enum tui_register_display_type regs_display_type;
-  enum tui_register_display_type float_regs_display_type;
 };
 
 /* Elements in the Source/Disassembly Window.  */
@@ -263,7 +241,6 @@ struct tui_data_info
   int data_content_count;
   tui_win_content regs_content;        /* Start of regs display content.  */
   int regs_content_count;
-  enum tui_register_display_type regs_display_type;
   int regs_column_count;
   int display_regs;            /* Should regs be displayed at all?  */
   struct reggroup *current_group;
index 4c25d43d0002459f87fcf3062a8926b5afc5f785..3a2be9b2f1bebdc3051597dc82ed6dfb10eaa627 100644 (file)
@@ -122,18 +122,13 @@ show_layout (enum tui_layout_type layout)
 
 
 /* Function to set the layout to SRC_COMMAND, DISASSEM_COMMAND,
-   SRC_DISASSEM_COMMAND, SRC_DATA_COMMAND, or DISASSEM_DATA_COMMAND.
-   If the layout is SRC_DATA_COMMAND, DISASSEM_DATA_COMMAND, or
-   UNDEFINED_LAYOUT, then the data window is populated according to
-   regs_display_type.  */
+   SRC_DISASSEM_COMMAND, SRC_DATA_COMMAND, or DISASSEM_DATA_COMMAND.  */
 enum tui_status
-tui_set_layout (enum tui_layout_type layout_type,
-               enum tui_register_display_type regs_display_type)
+tui_set_layout (enum tui_layout_type layout_type)
 {
   enum tui_status status = TUI_SUCCESS;
 
-  if (layout_type != UNDEFINED_LAYOUT 
-      || regs_display_type != TUI_UNDEFINED_REGS)
+  if (layout_type != UNDEFINED_LAYOUT)
     {
       enum tui_layout_type cur_layout = tui_current_layout (),
        new_layout = UNDEFINED_LAYOUT;
@@ -145,113 +140,98 @@ tui_set_layout (enum tui_layout_type layout_type,
 
       extract_display_start_addr (&gdbarch, &addr);
 
-      if (layout_type == UNDEFINED_LAYOUT
-         && regs_display_type != TUI_UNDEFINED_REGS)
-       {
-         if (cur_layout == SRC_DISASSEM_COMMAND)
-           new_layout = DISASSEM_DATA_COMMAND;
-         else if (cur_layout == SRC_COMMAND 
-                  || cur_layout == SRC_DATA_COMMAND)
-           new_layout = SRC_DATA_COMMAND;
-         else if (cur_layout == DISASSEM_COMMAND 
-                  || cur_layout == DISASSEM_DATA_COMMAND)
-           new_layout = DISASSEM_DATA_COMMAND;
-       }
-      else
-       new_layout = layout_type;
+      new_layout = layout_type;
 
-      regs_populate = (new_layout == SRC_DATA_COMMAND 
-                      || new_layout == DISASSEM_DATA_COMMAND 
-                      || regs_display_type != TUI_UNDEFINED_REGS);
-      if (new_layout != cur_layout
-         || regs_display_type != TUI_UNDEFINED_REGS)
+      regs_populate = (new_layout == SRC_DATA_COMMAND
+                      || new_layout == DISASSEM_DATA_COMMAND);
+      if (new_layout != cur_layout)
        {
-         if (new_layout != cur_layout)
-           {
-             show_layout (new_layout);
+         show_layout (new_layout);
 
-             /* Now determine where focus should be.  */
-             if (win_with_focus != TUI_CMD_WIN)
+         /* Now determine where focus should be.  */
+         if (win_with_focus != TUI_CMD_WIN)
+           {
+             switch (new_layout)
                {
-                 switch (new_layout)
-                   {
-                   case SRC_COMMAND:
-                     tui_set_win_focus_to (TUI_SRC_WIN);
-                     layout_def->display_mode = SRC_WIN;
-                     layout_def->split = FALSE;
-                     break;
-                   case DISASSEM_COMMAND:
-                     /* The previous layout was not showing code.
-                        This can happen if there is no source
-                        available:
-
-                        1. if the source file is in another dir OR
-                        2. if target was compiled without -g
-                        We still want to show the assembly though!  */
-
-                     tui_get_begin_asm_address (&gdbarch, &addr);
-                     tui_set_win_focus_to (TUI_DISASM_WIN);
-                     layout_def->display_mode = DISASSEM_WIN;
-                     layout_def->split = FALSE;
-                     break;
-                   case SRC_DISASSEM_COMMAND:
-                     /* The previous layout was not showing code.
-                        This can happen if there is no source
-                        available:
-
-                        1. if the source file is in another dir OR
-                        2. if target was compiled without -g
-                        We still want to show the assembly though!  */
-
-                     tui_get_begin_asm_address (&gdbarch, &addr);
-                     if (win_with_focus == TUI_SRC_WIN)
-                       tui_set_win_focus_to (TUI_SRC_WIN);
-                     else
-                       tui_set_win_focus_to (TUI_DISASM_WIN);
-                     layout_def->split = TRUE;
-                     break;
-                   case SRC_DATA_COMMAND:
-                     if (win_with_focus != TUI_DATA_WIN)
-                       tui_set_win_focus_to (TUI_SRC_WIN);
-                     else
-                       tui_set_win_focus_to (TUI_DATA_WIN);
-                     layout_def->display_mode = SRC_WIN;
-                     layout_def->split = FALSE;
-                     break;
-                   case DISASSEM_DATA_COMMAND:
-                     /* The previous layout was not showing code.
-                        This can happen if there is no source
-                        available:
-
-                        1. if the source file is in another dir OR
-                        2. if target was compiled without -g
-                        We still want to show the assembly though!  */
-
-                     tui_get_begin_asm_address (&gdbarch, &addr);
-                     if (win_with_focus != TUI_DATA_WIN)
-                       tui_set_win_focus_to (TUI_DISASM_WIN);
-                     else
-                       tui_set_win_focus_to (TUI_DATA_WIN);
-                     layout_def->display_mode = DISASSEM_WIN;
-                     layout_def->split = FALSE;
-                     break;
-                   default:
-                     break;
-                   }
+               case SRC_COMMAND:
+                 tui_set_win_focus_to (TUI_SRC_WIN);
+                 layout_def->display_mode = SRC_WIN;
+                 layout_def->split = FALSE;
+                 break;
+               case DISASSEM_COMMAND:
+                 /* The previous layout was not showing code.
+                    This can happen if there is no source
+                    available:
+
+                    1. if the source file is in another dir OR
+                    2. if target was compiled without -g
+                    We still want to show the assembly though!  */
+
+                 tui_get_begin_asm_address (&gdbarch, &addr);
+                 tui_set_win_focus_to (TUI_DISASM_WIN);
+                 layout_def->display_mode = DISASSEM_WIN;
+                 layout_def->split = FALSE;
+                 break;
+               case SRC_DISASSEM_COMMAND:
+                 /* The previous layout was not showing code.
+                    This can happen if there is no source
+                    available:
+
+                    1. if the source file is in another dir OR
+                    2. if target was compiled without -g
+                    We still want to show the assembly though!  */
+
+                 tui_get_begin_asm_address (&gdbarch, &addr);
+                 if (win_with_focus == TUI_SRC_WIN)
+                   tui_set_win_focus_to (TUI_SRC_WIN);
+                 else
+                   tui_set_win_focus_to (TUI_DISASM_WIN);
+                 layout_def->split = TRUE;
+                 break;
+               case SRC_DATA_COMMAND:
+                 if (win_with_focus != TUI_DATA_WIN)
+                   tui_set_win_focus_to (TUI_SRC_WIN);
+                 else
+                   tui_set_win_focus_to (TUI_DATA_WIN);
+                 layout_def->display_mode = SRC_WIN;
+                 layout_def->split = FALSE;
+                 break;
+               case DISASSEM_DATA_COMMAND:
+                 /* The previous layout was not showing code.
+                    This can happen if there is no source
+                    available:
+
+                    1. if the source file is in another dir OR
+                    2. if target was compiled without -g
+                    We still want to show the assembly though!  */
+
+                 tui_get_begin_asm_address (&gdbarch, &addr);
+                 if (win_with_focus != TUI_DATA_WIN)
+                   tui_set_win_focus_to (TUI_DISASM_WIN);
+                 else
+                   tui_set_win_focus_to (TUI_DATA_WIN);
+                 layout_def->display_mode = DISASSEM_WIN;
+                 layout_def->split = FALSE;
+                 break;
+               default:
+                 break;
                }
-             /*
-              * Now update the window content.
-              */
-             if (!regs_populate 
-                 && (new_layout == SRC_DATA_COMMAND 
-                     || new_layout == DISASSEM_DATA_COMMAND))
-               tui_display_all_data ();
-
-             tui_update_source_windows_with_addr (gdbarch, addr);
            }
+         /*
+          * Now update the window content.
+          */
+         if (!regs_populate
+             && (new_layout == SRC_DATA_COMMAND
+                 || new_layout == DISASSEM_DATA_COMMAND))
+           tui_display_all_data ();
+
+         tui_update_source_windows_with_addr (gdbarch, addr);
+
          if (regs_populate)
            {
-              tui_show_registers (TUI_DATA_WIN->detail.data_display_info.current_group);
+             struct reggroup *group =
+               TUI_DATA_WIN->detail.data_display_info.current_group;
+             tui_show_registers (group);
            }
        }
     }
@@ -370,7 +350,6 @@ tui_default_win_viewport_height (enum tui_win_type type,
   return h;
 }
 
-
 /* Function to initialize gdb commands, for tui window layout
    manipulation.  */
 
@@ -401,10 +380,10 @@ Layout names are:\n\
 **************************/
 
 
-/* Function to set the layout to SRC, ASM, SPLIT, NEXT, PREV, DATA,
-   REGS, $REGS, $GREGS, $FREGS, $SREGS.  */
+/* Function to set the layout to SRC, ASM, SPLIT, NEXT, PREV, DATA, or
+   REGS. */
 enum tui_status
-tui_set_layout_for_display_command (const char *layout_name)
+tui_set_layout_by_name (const char *layout_name)
 {
   enum tui_status status = TUI_SUCCESS;
 
@@ -413,7 +392,6 @@ tui_set_layout_for_display_command (const char *layout_name)
       int i;
       char *buf_ptr;
       enum tui_layout_type new_layout = UNDEFINED_LAYOUT;
-      enum tui_register_display_type dpy_type = TUI_UNDEFINED_REGS;
       enum tui_layout_type cur_layout = tui_current_layout ();
 
       buf_ptr = (char *) xstrdup (layout_name);
@@ -421,8 +399,7 @@ tui_set_layout_for_display_command (const char *layout_name)
        buf_ptr[i] = toupper (buf_ptr[i]);
 
       /* First check for ambiguous input.  */
-      if (strlen (buf_ptr) <= 1 
-         && (*buf_ptr == 'S' || *buf_ptr == '$'))
+      if (strlen (buf_ptr) <= 1 && *buf_ptr == 'S')
        {
          warning (_("Ambiguous command input."));
          status = TUI_FAILURE;
@@ -435,59 +412,13 @@ tui_set_layout_for_display_command (const char *layout_name)
            new_layout = DISASSEM_COMMAND;
          else if (subset_compare (buf_ptr, "SPLIT"))
            new_layout = SRC_DISASSEM_COMMAND;
-         else if (subset_compare (buf_ptr, "REGS") 
-                  || subset_compare (buf_ptr, TUI_GENERAL_SPECIAL_REGS_NAME)
-                  || subset_compare (buf_ptr, TUI_GENERAL_REGS_NAME)
-                  || subset_compare (buf_ptr, TUI_FLOAT_REGS_NAME)
-                  || subset_compare (buf_ptr, TUI_SPECIAL_REGS_NAME))
+         else if (subset_compare (buf_ptr, "REGS"))
            {
-             if (cur_layout == SRC_COMMAND 
+             if (cur_layout == SRC_COMMAND
                  || cur_layout == SRC_DATA_COMMAND)
                new_layout = SRC_DATA_COMMAND;
              else
                new_layout = DISASSEM_DATA_COMMAND;
-
-             /* Could ifdef out the following code. when compile with
-                -z, there are null pointer references that cause a
-                core dump if 'layout regs' is the first layout
-                command issued by the user. HP has asked us to hook
-                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)
-                   dpy_type = TUI_SFLOAT_REGS;
-                 else
-                   dpy_type =
-                     TUI_DATA_WIN->detail.data_display_info.regs_display_type;
-               }
-             else if (subset_compare (buf_ptr,
-                                     TUI_GENERAL_SPECIAL_REGS_NAME))
-               dpy_type = TUI_GENERAL_AND_SPECIAL_REGS;
-             else if (subset_compare (buf_ptr, TUI_GENERAL_REGS_NAME))
-               dpy_type = TUI_GENERAL_REGS;
-             else if (subset_compare (buf_ptr, TUI_SPECIAL_REGS_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;
-                 else
-                   dpy_type = TUI_GENERAL_REGS;
-               }
-
-             /* End of potential ifdef.
-              */
-
-             /* If ifdefed out code above, then assume that the user
-                wishes to display the general purpose registers .
-             */
-
-             /* dpy_type = TUI_GENERAL_REGS; */
            }
          else if (subset_compare (buf_ptr, "NEXT"))
            new_layout = next_layout ();
@@ -496,7 +427,7 @@ tui_set_layout_for_display_command (const char *layout_name)
          else
            status = TUI_FAILURE;
 
-         tui_set_layout (new_layout, dpy_type);
+         tui_set_layout (new_layout);
        }
       xfree (buf_ptr);
     }
@@ -549,7 +480,7 @@ tui_layout_command (char *arg, int from_tty)
   tui_enable ();
 
   /* Switch to the selected layout.  */
-  if (tui_set_layout_for_display_command (arg) != TUI_SUCCESS)
+  if (tui_set_layout_by_name (arg) != TUI_SUCCESS)
     warning (_("Invalid layout specified.\n%s"), LAYOUT_USAGE);
 
 }
index 6dedb7d752c8735068d854a9ac69deb65fa8c063..623d254cd8d0ac9e184e7bba6f7f1e81d2411e13 100644 (file)
@@ -30,7 +30,6 @@ extern int tui_default_win_height (enum tui_win_type,
                                   enum tui_layout_type);
 extern int tui_default_win_viewport_height (enum tui_win_type,
                                            enum tui_layout_type);
-extern enum tui_status tui_set_layout (enum tui_layout_type,
-                                      enum tui_register_display_type);
+extern enum tui_status tui_set_layout (enum tui_layout_type);
 
 #endif /*TUI_LAYOUT_H */
index 61918f82a9891e49a87f6dca7b33bbc8655263b9..903c7c63ff4e389d2a10f623787ee02bc58c1304 100644 (file)
@@ -139,7 +139,7 @@ tui_show_registers (struct reggroup *group)
   /* Make sure the register window is visible.  If not, select an
      appropriate layout.  */
   if (TUI_DATA_WIN == NULL || !TUI_DATA_WIN->generic.is_visible)
-    tui_set_layout_for_display_command (DATA_NAME);
+    tui_set_layout_by_name (DATA_NAME);
 
   display_info = &TUI_DATA_WIN->detail.data_display_info;
   if (group == 0)
index b04e106e5c474eeae101a4b9c44a5f6b8cc914db..308e7ae28b3302b8cfcbabb1d396461373719d24 100644 (file)
@@ -150,7 +150,6 @@ tui_rl_change_windows (int notused1, int notused2)
   if (tui_active)
     {
       enum tui_layout_type new_layout;
-      enum tui_register_display_type regs_type = TUI_UNDEFINED_REGS;
 
       new_layout = tui_current_layout ();
 
@@ -182,7 +181,7 @@ tui_rl_change_windows (int notused1, int notused2)
          new_layout = SRC_COMMAND;
          break;
        }
-      tui_set_layout (new_layout, regs_type);
+      tui_set_layout (new_layout);
     }
   return 0;
 }
@@ -198,7 +197,6 @@ tui_rl_delete_other_windows (int notused1, int notused2)
   if (tui_active)
     {
       enum tui_layout_type new_layout;
-      enum tui_register_display_type regs_type = TUI_UNDEFINED_REGS;
 
       new_layout = tui_current_layout ();
 
@@ -217,7 +215,7 @@ tui_rl_delete_other_windows (int notused1, int notused2)
          new_layout = DISASSEM_COMMAND;
          break;
        }
-      tui_set_layout (new_layout, regs_type);
+      tui_set_layout (new_layout);
     }
   return 0;
 }
@@ -464,7 +462,7 @@ tui_enable (void)
       def_prog_mode ();
 
       tui_show_frame_info (0);
-      tui_set_layout (SRC_COMMAND, TUI_UNDEFINED_REGS);
+      tui_set_layout (SRC_COMMAND);
       tui_set_win_focus_to (TUI_SRC_WIN);
       keypad (TUI_CMD_WIN->generic.handle, TRUE);
       wrefresh (TUI_CMD_WIN->generic.handle);
index 2ce5705576ab66825307bf480cb07359711c0651..59bb7c901fee7ab4325f2f00dbf32f2c05f1be3f 100644 (file)
@@ -96,6 +96,6 @@ extern void tui_show_source (const char *fullname, int line);
 extern struct ui_out *tui_out_new (struct ui_file *stream);
 
 /* tui-layout.c */
-extern enum tui_status tui_set_layout_for_display_command (const char *);
+extern enum tui_status tui_set_layout_by_name (const char *);
 
 #endif