2010-05-17 Michael Snyder <msnyder@vmware.com>
[deliverable/binutils-gdb.git] / gdb / cli / cli-setshow.c
index c1dafb4b320d0b7edffa0721aa4eb1db172cee0d..37f7918ef6ff6284f36706d7d31caaa34d3a41d8 100644 (file)
@@ -21,6 +21,7 @@
 #include "value.h"
 #include <ctype.h>
 #include "gdb_string.h"
+#include "arch-utils.h"
 
 #include "ui-out.h"
 
@@ -39,6 +40,7 @@ parse_auto_binary_operation (const char *arg)
   if (arg != NULL && *arg != '\0')
     {
       int length = strlen (arg);
+
       while (isspace (arg[length - 1]) && length > 0)
        length--;
       if (strncmp (arg, "on", length) == 0
@@ -152,7 +154,7 @@ do_setshow_command (char *arg, int from_tty, struct cmd_list_element *c)
                       right before a newline.  */
                    if (*p == 0)
                      break;
-                   ch = parse_escape (&p);
+                   ch = parse_escape (get_current_arch (), &p);
                    if (ch == 0)
                      break;    /* C loses */
                    else if (ch > 0)
@@ -194,6 +196,7 @@ do_setshow_command (char *arg, int from_tty, struct cmd_list_element *c)
          {
            /* Clear trailing whitespace of filename.  */
            char *ptr = arg + strlen (arg) - 1;
+
            while (ptr >= arg && (*ptr == ' ' || *ptr == '\t'))
              ptr--;
            *(ptr + 1) = '\0';
@@ -216,6 +219,7 @@ do_setshow_command (char *arg, int from_tty, struct cmd_list_element *c)
        case var_integer:
          {
            unsigned int val;
+
            if (arg == NULL)
              error_no_arg (_("integer to set it to."));
            val = parse_and_eval_long (arg);
@@ -250,6 +254,7 @@ do_setshow_command (char *arg, int from_tty, struct cmd_list_element *c)
              {
                char *msg;
                int msg_len = 0;
+
                for (i = 0; c->enums[i]; i++)
                  msg_len += strlen (c->enums[i]) + 2;
 
@@ -384,6 +389,7 @@ do_setshow_command (char *arg, int from_tty, struct cmd_list_element *c)
       else
        {
          char *value = ui_file_xstrdup (stb->stream, NULL);
+
          make_cleanup (xfree, value);
          if (c->show_value_func != NULL)
            c->show_value_func (gdb_stdout, from_tty, c, value);
@@ -416,6 +422,7 @@ cmd_show_list (struct cmd_list_element *list, int from_tty, char *prefix)
          struct cleanup *optionlist_chain
            = make_cleanup_ui_out_tuple_begin_end (uiout, "optionlist");
          char *new_prefix = strstr (list->prefixname, "show ") + 5;
+
          if (ui_out_is_mi_like_p (uiout))
            ui_out_field_string (uiout, "prefix", new_prefix);
          cmd_show_list (*list->prefixlist, from_tty, new_prefix);
@@ -426,6 +433,7 @@ cmd_show_list (struct cmd_list_element *list, int from_tty, char *prefix)
        {
          struct cleanup *option_chain
            = make_cleanup_ui_out_tuple_begin_end (uiout, "option");
+
          ui_out_text (uiout, prefix);
          ui_out_field_string (uiout, "name", list->name);
          ui_out_text (uiout, ":  ");
This page took 0.025499 seconds and 4 git commands to generate.