OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-src/] [gdb-6.8/] [pre-binutils-2.20.1-sync/] [gdb/] [cli/] [cli-setshow.c] - Diff between revs 157 and 223

Go to most recent revision | Only display areas with differences | Details | Blame | View Log

Rev 157 Rev 223
/* Handle set and show GDB commands.
/* Handle set and show GDB commands.
 
 
   Copyright (c) 2000, 2001, 2002, 2003, 2007, 2008
   Copyright (c) 2000, 2001, 2002, 2003, 2007, 2008
   Free Software Foundation, Inc.
   Free Software Foundation, Inc.
 
 
   This program is free software; you can redistribute it and/or modify
   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation; either version 3 of the License, or
   the Free Software Foundation; either version 3 of the License, or
   (at your option) any later version.
   (at your option) any later version.
 
 
   This program is distributed in the hope that it will be useful,
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.
   GNU General Public License for more details.
 
 
   You should have received a copy of the GNU General Public License
   You should have received a copy of the GNU General Public License
   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 
#include "defs.h"
#include "defs.h"
#include "readline/tilde.h"
#include "readline/tilde.h"
#include "value.h"
#include "value.h"
#include <ctype.h>
#include <ctype.h>
#include "gdb_string.h"
#include "gdb_string.h"
 
 
#include "ui-out.h"
#include "ui-out.h"
 
 
#include "cli/cli-decode.h"
#include "cli/cli-decode.h"
#include "cli/cli-cmds.h"
#include "cli/cli-cmds.h"
#include "cli/cli-setshow.h"
#include "cli/cli-setshow.h"
 
 
/* Prototypes for local functions */
/* Prototypes for local functions */
 
 
static int parse_binary_operation (char *);
static int parse_binary_operation (char *);
 
 


static enum auto_boolean
static enum auto_boolean
parse_auto_binary_operation (const char *arg)
parse_auto_binary_operation (const char *arg)
{
{
  if (arg != NULL && *arg != '\0')
  if (arg != NULL && *arg != '\0')
    {
    {
      int length = strlen (arg);
      int length = strlen (arg);
      while (isspace (arg[length - 1]) && length > 0)
      while (isspace (arg[length - 1]) && length > 0)
        length--;
        length--;
      if (strncmp (arg, "on", length) == 0
      if (strncmp (arg, "on", length) == 0
          || strncmp (arg, "1", length) == 0
          || strncmp (arg, "1", length) == 0
          || strncmp (arg, "yes", length) == 0
          || strncmp (arg, "yes", length) == 0
          || strncmp (arg, "enable", length) == 0)
          || strncmp (arg, "enable", length) == 0)
        return AUTO_BOOLEAN_TRUE;
        return AUTO_BOOLEAN_TRUE;
      else if (strncmp (arg, "off", length) == 0
      else if (strncmp (arg, "off", length) == 0
               || strncmp (arg, "0", length) == 0
               || strncmp (arg, "0", length) == 0
               || strncmp (arg, "no", length) == 0
               || strncmp (arg, "no", length) == 0
               || strncmp (arg, "disable", length) == 0)
               || strncmp (arg, "disable", length) == 0)
        return AUTO_BOOLEAN_FALSE;
        return AUTO_BOOLEAN_FALSE;
      else if (strncmp (arg, "auto", length) == 0
      else if (strncmp (arg, "auto", length) == 0
               || (strncmp (arg, "-1", length) == 0 && length > 1))
               || (strncmp (arg, "-1", length) == 0 && length > 1))
        return AUTO_BOOLEAN_AUTO;
        return AUTO_BOOLEAN_AUTO;
    }
    }
  error (_("\"on\", \"off\" or \"auto\" expected."));
  error (_("\"on\", \"off\" or \"auto\" expected."));
  return AUTO_BOOLEAN_AUTO; /* pacify GCC */
  return AUTO_BOOLEAN_AUTO; /* pacify GCC */
}
}
 
 
static int
static int
parse_binary_operation (char *arg)
parse_binary_operation (char *arg)
{
{
  int length;
  int length;
 
 
  if (!arg || !*arg)
  if (!arg || !*arg)
    return 1;
    return 1;
 
 
  length = strlen (arg);
  length = strlen (arg);
 
 
  while (arg[length - 1] == ' ' || arg[length - 1] == '\t')
  while (arg[length - 1] == ' ' || arg[length - 1] == '\t')
    length--;
    length--;
 
 
  if (strncmp (arg, "on", length) == 0
  if (strncmp (arg, "on", length) == 0
      || strncmp (arg, "1", length) == 0
      || strncmp (arg, "1", length) == 0
      || strncmp (arg, "yes", length) == 0
      || strncmp (arg, "yes", length) == 0
      || strncmp (arg, "enable", length) == 0)
      || strncmp (arg, "enable", length) == 0)
    return 1;
    return 1;
  else if (strncmp (arg, "off", length) == 0
  else if (strncmp (arg, "off", length) == 0
           || strncmp (arg, "0", length) == 0
           || strncmp (arg, "0", length) == 0
           || strncmp (arg, "no", length) == 0
           || strncmp (arg, "no", length) == 0
           || strncmp (arg, "disable", length) == 0)
           || strncmp (arg, "disable", length) == 0)
    return 0;
    return 0;
  else
  else
    {
    {
      error (_("\"on\" or \"off\" expected."));
      error (_("\"on\" or \"off\" expected."));
      return 0;
      return 0;
    }
    }
}
}


void
void
deprecated_show_value_hack (struct ui_file *ignore_file,
deprecated_show_value_hack (struct ui_file *ignore_file,
                            int ignore_from_tty,
                            int ignore_from_tty,
                            struct cmd_list_element *c,
                            struct cmd_list_element *c,
                            const char *value)
                            const char *value)
{
{
  /* If there's no command or value, don't try to print it out.  */
  /* If there's no command or value, don't try to print it out.  */
  if (c == NULL || value == NULL)
  if (c == NULL || value == NULL)
    return;
    return;
  /* Print doc minus "show" at start.  */
  /* Print doc minus "show" at start.  */
  print_doc_line (gdb_stdout, c->doc + 5);
  print_doc_line (gdb_stdout, c->doc + 5);
  switch (c->var_type)
  switch (c->var_type)
    {
    {
    case var_string:
    case var_string:
    case var_string_noescape:
    case var_string_noescape:
    case var_optional_filename:
    case var_optional_filename:
    case var_filename:
    case var_filename:
    case var_enum:
    case var_enum:
      printf_filtered ((" is \"%s\".\n"), value);
      printf_filtered ((" is \"%s\".\n"), value);
      break;
      break;
    default:
    default:
      printf_filtered ((" is %s.\n"), value);
      printf_filtered ((" is %s.\n"), value);
      break;
      break;
    }
    }
}
}
 
 
/* Do a "set" or "show" command.  ARG is NULL if no argument, or the text
/* Do a "set" or "show" command.  ARG is NULL if no argument, or the text
   of the argument, and FROM_TTY is nonzero if this command is being entered
   of the argument, and FROM_TTY is nonzero if this command is being entered
   directly by the user (i.e. these are just like any other
   directly by the user (i.e. these are just like any other
   command).  C is the command list element for the command.  */
   command).  C is the command list element for the command.  */
 
 
void
void
do_setshow_command (char *arg, int from_tty, struct cmd_list_element *c)
do_setshow_command (char *arg, int from_tty, struct cmd_list_element *c)
{
{
  if (c->type == set_cmd)
  if (c->type == set_cmd)
    {
    {
      switch (c->var_type)
      switch (c->var_type)
        {
        {
        case var_string:
        case var_string:
          {
          {
            char *new;
            char *new;
            char *p;
            char *p;
            char *q;
            char *q;
            int ch;
            int ch;
 
 
            if (arg == NULL)
            if (arg == NULL)
              arg = "";
              arg = "";
            new = (char *) xmalloc (strlen (arg) + 2);
            new = (char *) xmalloc (strlen (arg) + 2);
            p = arg;
            p = arg;
            q = new;
            q = new;
            while ((ch = *p++) != '\000')
            while ((ch = *p++) != '\000')
              {
              {
                if (ch == '\\')
                if (ch == '\\')
                  {
                  {
                    /* \ at end of argument is used after spaces
                    /* \ at end of argument is used after spaces
                       so they won't be lost.  */
                       so they won't be lost.  */
                    /* This is obsolete now that we no longer strip
                    /* This is obsolete now that we no longer strip
                       trailing whitespace and actually, the backslash
                       trailing whitespace and actually, the backslash
                       didn't get here in my test, readline or
                       didn't get here in my test, readline or
                       something did something funky with a backslash
                       something did something funky with a backslash
                       right before a newline.  */
                       right before a newline.  */
                    if (*p == 0)
                    if (*p == 0)
                      break;
                      break;
                    ch = parse_escape (&p);
                    ch = parse_escape (&p);
                    if (ch == 0)
                    if (ch == 0)
                      break;    /* C loses */
                      break;    /* C loses */
                    else if (ch > 0)
                    else if (ch > 0)
                      *q++ = ch;
                      *q++ = ch;
                  }
                  }
                else
                else
                  *q++ = ch;
                  *q++ = ch;
              }
              }
#if 0
#if 0
            if (*(p - 1) != '\\')
            if (*(p - 1) != '\\')
              *q++ = ' ';
              *q++ = ' ';
#endif
#endif
            *q++ = '\0';
            *q++ = '\0';
            new = (char *) xrealloc (new, q - new);
            new = (char *) xrealloc (new, q - new);
            if (*(char **) c->var != NULL)
            if (*(char **) c->var != NULL)
              xfree (*(char **) c->var);
              xfree (*(char **) c->var);
            *(char **) c->var = new;
            *(char **) c->var = new;
          }
          }
          break;
          break;
        case var_string_noescape:
        case var_string_noescape:
          if (arg == NULL)
          if (arg == NULL)
            arg = "";
            arg = "";
          if (*(char **) c->var != NULL)
          if (*(char **) c->var != NULL)
            xfree (*(char **) c->var);
            xfree (*(char **) c->var);
          *(char **) c->var = savestring (arg, strlen (arg));
          *(char **) c->var = savestring (arg, strlen (arg));
          break;
          break;
        case var_optional_filename:
        case var_optional_filename:
          if (arg == NULL)
          if (arg == NULL)
            arg = "";
            arg = "";
          if (*(char **) c->var != NULL)
          if (*(char **) c->var != NULL)
            xfree (*(char **) c->var);
            xfree (*(char **) c->var);
          *(char **) c->var = savestring (arg, strlen (arg));
          *(char **) c->var = savestring (arg, strlen (arg));
          break;
          break;
        case var_filename:
        case var_filename:
          if (arg == NULL)
          if (arg == NULL)
            error_no_arg (_("filename to set it to."));
            error_no_arg (_("filename to set it to."));
          if (*(char **) c->var != NULL)
          if (*(char **) c->var != NULL)
            xfree (*(char **) c->var);
            xfree (*(char **) c->var);
          {
          {
            /* Clear trailing whitespace of filename.  */
            /* Clear trailing whitespace of filename.  */
            char *ptr = arg + strlen (arg) - 1;
            char *ptr = arg + strlen (arg) - 1;
            while (ptr >= arg && (*ptr == ' ' || *ptr == '\t'))
            while (ptr >= arg && (*ptr == ' ' || *ptr == '\t'))
              ptr--;
              ptr--;
            *(ptr + 1) = '\0';
            *(ptr + 1) = '\0';
          }
          }
          *(char **) c->var = tilde_expand (arg);
          *(char **) c->var = tilde_expand (arg);
          break;
          break;
        case var_boolean:
        case var_boolean:
          *(int *) c->var = parse_binary_operation (arg);
          *(int *) c->var = parse_binary_operation (arg);
          break;
          break;
        case var_auto_boolean:
        case var_auto_boolean:
          *(enum auto_boolean *) c->var = parse_auto_binary_operation (arg);
          *(enum auto_boolean *) c->var = parse_auto_binary_operation (arg);
          break;
          break;
        case var_uinteger:
        case var_uinteger:
          if (arg == NULL)
          if (arg == NULL)
            error_no_arg (_("integer to set it to."));
            error_no_arg (_("integer to set it to."));
          *(unsigned int *) c->var = parse_and_eval_long (arg);
          *(unsigned int *) c->var = parse_and_eval_long (arg);
          if (*(unsigned int *) c->var == 0)
          if (*(unsigned int *) c->var == 0)
            *(unsigned int *) c->var = UINT_MAX;
            *(unsigned int *) c->var = UINT_MAX;
          break;
          break;
        case var_integer:
        case var_integer:
          {
          {
            unsigned int val;
            unsigned int val;
            if (arg == NULL)
            if (arg == NULL)
              error_no_arg (_("integer to set it to."));
              error_no_arg (_("integer to set it to."));
            val = parse_and_eval_long (arg);
            val = parse_and_eval_long (arg);
            if (val == 0)
            if (val == 0)
              *(int *) c->var = INT_MAX;
              *(int *) c->var = INT_MAX;
            else if (val >= INT_MAX)
            else if (val >= INT_MAX)
              error (_("integer %u out of range"), val);
              error (_("integer %u out of range"), val);
            else
            else
              *(int *) c->var = val;
              *(int *) c->var = val;
            break;
            break;
          }
          }
        case var_zinteger:
        case var_zinteger:
          if (arg == NULL)
          if (arg == NULL)
            error_no_arg (_("integer to set it to."));
            error_no_arg (_("integer to set it to."));
          *(int *) c->var = parse_and_eval_long (arg);
          *(int *) c->var = parse_and_eval_long (arg);
          break;
          break;
        case var_enum:
        case var_enum:
          {
          {
            int i;
            int i;
            int len;
            int len;
            int nmatches;
            int nmatches;
            const char *match = NULL;
            const char *match = NULL;
            char *p;
            char *p;
 
 
            /* if no argument was supplied, print an informative error message */
            /* if no argument was supplied, print an informative error message */
            if (arg == NULL)
            if (arg == NULL)
              {
              {
                char *msg;
                char *msg;
                int msg_len = 0;
                int msg_len = 0;
                for (i = 0; c->enums[i]; i++)
                for (i = 0; c->enums[i]; i++)
                  msg_len += strlen (c->enums[i]) + 2;
                  msg_len += strlen (c->enums[i]) + 2;
 
 
                msg = xmalloc (msg_len);
                msg = xmalloc (msg_len);
                *msg = '\0';
                *msg = '\0';
                make_cleanup (xfree, msg);
                make_cleanup (xfree, msg);
 
 
                for (i = 0; c->enums[i]; i++)
                for (i = 0; c->enums[i]; i++)
                  {
                  {
                    if (i != 0)
                    if (i != 0)
                      strcat (msg, ", ");
                      strcat (msg, ", ");
                    strcat (msg, c->enums[i]);
                    strcat (msg, c->enums[i]);
                  }
                  }
                error (_("Requires an argument. Valid arguments are %s."), msg);
                error (_("Requires an argument. Valid arguments are %s."), msg);
              }
              }
 
 
            p = strchr (arg, ' ');
            p = strchr (arg, ' ');
 
 
            if (p)
            if (p)
              len = p - arg;
              len = p - arg;
            else
            else
              len = strlen (arg);
              len = strlen (arg);
 
 
            nmatches = 0;
            nmatches = 0;
            for (i = 0; c->enums[i]; i++)
            for (i = 0; c->enums[i]; i++)
              if (strncmp (arg, c->enums[i], len) == 0)
              if (strncmp (arg, c->enums[i], len) == 0)
                {
                {
                  if (c->enums[i][len] == '\0')
                  if (c->enums[i][len] == '\0')
                    {
                    {
                      match = c->enums[i];
                      match = c->enums[i];
                      nmatches = 1;
                      nmatches = 1;
                      break; /* exact match. */
                      break; /* exact match. */
                    }
                    }
                  else
                  else
                    {
                    {
                      match = c->enums[i];
                      match = c->enums[i];
                      nmatches++;
                      nmatches++;
                    }
                    }
                }
                }
 
 
            if (nmatches <= 0)
            if (nmatches <= 0)
              error (_("Undefined item: \"%s\"."), arg);
              error (_("Undefined item: \"%s\"."), arg);
 
 
            if (nmatches > 1)
            if (nmatches > 1)
              error (_("Ambiguous item \"%s\"."), arg);
              error (_("Ambiguous item \"%s\"."), arg);
 
 
            *(const char **) c->var = match;
            *(const char **) c->var = match;
          }
          }
          break;
          break;
        default:
        default:
          error (_("gdb internal error: bad var_type in do_setshow_command"));
          error (_("gdb internal error: bad var_type in do_setshow_command"));
        }
        }
    }
    }
  else if (c->type == show_cmd)
  else if (c->type == show_cmd)
    {
    {
      struct cleanup *old_chain;
      struct cleanup *old_chain;
      struct ui_stream *stb;
      struct ui_stream *stb;
 
 
      stb = ui_out_stream_new (uiout);
      stb = ui_out_stream_new (uiout);
      old_chain = make_cleanup_ui_out_stream_delete (stb);
      old_chain = make_cleanup_ui_out_stream_delete (stb);
 
 
      /* Possibly call the pre hook.  */
      /* Possibly call the pre hook.  */
      if (c->pre_show_hook)
      if (c->pre_show_hook)
        (c->pre_show_hook) (c);
        (c->pre_show_hook) (c);
 
 
      switch (c->var_type)
      switch (c->var_type)
        {
        {
        case var_string:
        case var_string:
          if (*(char **) c->var)
          if (*(char **) c->var)
            fputstr_filtered (*(char **) c->var, '"', stb->stream);
            fputstr_filtered (*(char **) c->var, '"', stb->stream);
          break;
          break;
        case var_string_noescape:
        case var_string_noescape:
        case var_optional_filename:
        case var_optional_filename:
        case var_filename:
        case var_filename:
        case var_enum:
        case var_enum:
          if (*(char **) c->var)
          if (*(char **) c->var)
            fputs_filtered (*(char **) c->var, stb->stream);
            fputs_filtered (*(char **) c->var, stb->stream);
          break;
          break;
        case var_boolean:
        case var_boolean:
          fputs_filtered (*(int *) c->var ? "on" : "off", stb->stream);
          fputs_filtered (*(int *) c->var ? "on" : "off", stb->stream);
          break;
          break;
        case var_auto_boolean:
        case var_auto_boolean:
          switch (*(enum auto_boolean*) c->var)
          switch (*(enum auto_boolean*) c->var)
            {
            {
            case AUTO_BOOLEAN_TRUE:
            case AUTO_BOOLEAN_TRUE:
              fputs_filtered ("on", stb->stream);
              fputs_filtered ("on", stb->stream);
              break;
              break;
            case AUTO_BOOLEAN_FALSE:
            case AUTO_BOOLEAN_FALSE:
              fputs_filtered ("off", stb->stream);
              fputs_filtered ("off", stb->stream);
              break;
              break;
            case AUTO_BOOLEAN_AUTO:
            case AUTO_BOOLEAN_AUTO:
              fputs_filtered ("auto", stb->stream);
              fputs_filtered ("auto", stb->stream);
              break;
              break;
            default:
            default:
              internal_error (__FILE__, __LINE__,
              internal_error (__FILE__, __LINE__,
                              _("do_setshow_command: invalid var_auto_boolean"));
                              _("do_setshow_command: invalid var_auto_boolean"));
              break;
              break;
            }
            }
          break;
          break;
        case var_uinteger:
        case var_uinteger:
          if (*(unsigned int *) c->var == UINT_MAX)
          if (*(unsigned int *) c->var == UINT_MAX)
            {
            {
              fputs_filtered ("unlimited", stb->stream);
              fputs_filtered ("unlimited", stb->stream);
              break;
              break;
            }
            }
          /* else fall through */
          /* else fall through */
        case var_zinteger:
        case var_zinteger:
          fprintf_filtered (stb->stream, "%u", *(unsigned int *) c->var);
          fprintf_filtered (stb->stream, "%u", *(unsigned int *) c->var);
          break;
          break;
        case var_integer:
        case var_integer:
          if (*(int *) c->var == INT_MAX)
          if (*(int *) c->var == INT_MAX)
            {
            {
              fputs_filtered ("unlimited", stb->stream);
              fputs_filtered ("unlimited", stb->stream);
            }
            }
          else
          else
            fprintf_filtered (stb->stream, "%d", *(int *) c->var);
            fprintf_filtered (stb->stream, "%d", *(int *) c->var);
          break;
          break;
 
 
        default:
        default:
          error (_("gdb internal error: bad var_type in do_setshow_command"));
          error (_("gdb internal error: bad var_type in do_setshow_command"));
        }
        }
 
 
 
 
      /* FIXME: cagney/2005-02-10: Need to split this in half: code to
      /* FIXME: cagney/2005-02-10: Need to split this in half: code to
         convert the value into a string (esentially the above); and
         convert the value into a string (esentially the above); and
         code to print the value out.  For the latter there should be
         code to print the value out.  For the latter there should be
         MI and CLI specific versions.  */
         MI and CLI specific versions.  */
 
 
      if (ui_out_is_mi_like_p (uiout))
      if (ui_out_is_mi_like_p (uiout))
        ui_out_field_stream (uiout, "value", stb);
        ui_out_field_stream (uiout, "value", stb);
      else
      else
        {
        {
          long length;
          long length;
          char *value = ui_file_xstrdup (stb->stream, &length);
          char *value = ui_file_xstrdup (stb->stream, &length);
          make_cleanup (xfree, value);
          make_cleanup (xfree, value);
          if (c->show_value_func != NULL)
          if (c->show_value_func != NULL)
            c->show_value_func (gdb_stdout, from_tty, c, value);
            c->show_value_func (gdb_stdout, from_tty, c, value);
          else
          else
            deprecated_show_value_hack (gdb_stdout, from_tty, c, value);
            deprecated_show_value_hack (gdb_stdout, from_tty, c, value);
        }
        }
      do_cleanups (old_chain);
      do_cleanups (old_chain);
    }
    }
  else
  else
    error (_("gdb internal error: bad cmd_type in do_setshow_command"));
    error (_("gdb internal error: bad cmd_type in do_setshow_command"));
  c->func (c, NULL, from_tty);
  c->func (c, NULL, from_tty);
  if (c->type == set_cmd && deprecated_set_hook)
  if (c->type == set_cmd && deprecated_set_hook)
    deprecated_set_hook (c);
    deprecated_set_hook (c);
}
}
 
 
/* Show all the settings in a list of show commands.  */
/* Show all the settings in a list of show commands.  */
 
 
void
void
cmd_show_list (struct cmd_list_element *list, int from_tty, char *prefix)
cmd_show_list (struct cmd_list_element *list, int from_tty, char *prefix)
{
{
  struct cleanup *showlist_chain;
  struct cleanup *showlist_chain;
 
 
  showlist_chain = make_cleanup_ui_out_tuple_begin_end (uiout, "showlist");
  showlist_chain = make_cleanup_ui_out_tuple_begin_end (uiout, "showlist");
  for (; list != NULL; list = list->next)
  for (; list != NULL; list = list->next)
    {
    {
      /* If we find a prefix, run its list, prefixing our output by its
      /* If we find a prefix, run its list, prefixing our output by its
         prefix (with "show " skipped).  */
         prefix (with "show " skipped).  */
      if (list->prefixlist && !list->abbrev_flag)
      if (list->prefixlist && !list->abbrev_flag)
        {
        {
          struct cleanup *optionlist_chain
          struct cleanup *optionlist_chain
            = make_cleanup_ui_out_tuple_begin_end (uiout, "optionlist");
            = make_cleanup_ui_out_tuple_begin_end (uiout, "optionlist");
          char *new_prefix = strstr (list->prefixname, "show ") + 5;
          char *new_prefix = strstr (list->prefixname, "show ") + 5;
          if (ui_out_is_mi_like_p (uiout))
          if (ui_out_is_mi_like_p (uiout))
            ui_out_field_string (uiout, "prefix", new_prefix);
            ui_out_field_string (uiout, "prefix", new_prefix);
          cmd_show_list (*list->prefixlist, from_tty, new_prefix);
          cmd_show_list (*list->prefixlist, from_tty, new_prefix);
          /* Close the tuple.  */
          /* Close the tuple.  */
          do_cleanups (optionlist_chain);
          do_cleanups (optionlist_chain);
        }
        }
      else
      else
        {
        {
          struct cleanup *option_chain
          struct cleanup *option_chain
            = make_cleanup_ui_out_tuple_begin_end (uiout, "option");
            = make_cleanup_ui_out_tuple_begin_end (uiout, "option");
          ui_out_text (uiout, prefix);
          ui_out_text (uiout, prefix);
          ui_out_field_string (uiout, "name", list->name);
          ui_out_field_string (uiout, "name", list->name);
          ui_out_text (uiout, ":  ");
          ui_out_text (uiout, ":  ");
          if (list->type == show_cmd)
          if (list->type == show_cmd)
            do_setshow_command ((char *) NULL, from_tty, list);
            do_setshow_command ((char *) NULL, from_tty, list);
          else
          else
            cmd_func (list, NULL, from_tty);
            cmd_func (list, NULL, from_tty);
          /* Close the tuple.  */
          /* Close the tuple.  */
          do_cleanups (option_chain);
          do_cleanups (option_chain);
        }
        }
    }
    }
  /* Close the tuple.  */
  /* Close the tuple.  */
  do_cleanups (showlist_chain);
  do_cleanups (showlist_chain);
}
}
 
 
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.