daily update
[deliverable/binutils-gdb.git] / gdb / mi / mi-cmd-stack.c
index a7a5a17b6ec70c8484c705fd3f11bc8e472fcef2..af01966825b83071783515d2d9a757dbe2fb3959 100644 (file)
@@ -1,12 +1,13 @@
 /* MI Command Set - stack commands.
-   Copyright 2000, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+   Copyright (C) 2000, 2002, 2003, 2004, 2005, 2007
+   Free Software Foundation, Inc.
    Contributed by Cygnus Solutions (a Red Hat company).
 
    This file is part of GDB.
 
    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
-   the Free Software Foundation; either version 2 of the License, or
+   the Free Software Foundation; either version 3 of the License, or
    (at your option) any later version.
 
    This program is distributed in the hope that it will be useful,
@@ -15,9 +16,7 @@
    GNU General Public License for more details.
 
    You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 59 Temple Place - Suite 330,
-   Boston, MA 02111-1307, USA.  */
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include "defs.h"
 #include "target.h"
@@ -88,8 +87,6 @@ mi_cmd_stack_list_frames (char *command, char **argv, int argc)
     }
 
   do_cleanups (cleanup_stack);
-  if (i < frame_high)
-    error (_("mi_cmd_stack_list_frames: Not enough frames in stack."));
 
   return MI_CMD_DONE;
 }
@@ -207,8 +204,6 @@ mi_cmd_stack_list_args (char *command, char **argv, int argc)
     }
 
   do_cleanups (cleanup_stack_args);
-  if (i < frame_high)
-    error (_("mi_cmd_stack_list_args: Not enough frames in stack."));
 
   return MI_CMD_DONE;
 }
@@ -278,6 +273,7 @@ list_args_or_locals (int locals, int values, struct frame_info *fi)
            {
              struct cleanup *cleanup_tuple = NULL;
              struct symbol *sym2;
+             struct value *val;
              if (values != PRINT_NO_VALUES)
                cleanup_tuple =
                  make_cleanup_ui_out_tuple_begin_end (uiout, NULL);
@@ -300,13 +296,17 @@ list_args_or_locals (int locals, int values, struct frame_info *fi)
                      && TYPE_CODE (type) != TYPE_CODE_STRUCT
                      && TYPE_CODE (type) != TYPE_CODE_UNION)
                    {
-                     print_variable_value (sym2, fi, stb->stream);
+                     val = read_var_value (sym2, fi);
+                     common_val_print
+                       (val, stb->stream, 0, 1, 0, Val_no_prettyprint);
                      ui_out_field_stream (uiout, "value", stb);
                    }
                  do_cleanups (cleanup_tuple);
                  break;
                case PRINT_ALL_VALUES:
-                 print_variable_value (sym2, fi, stb->stream);
+                 val = read_var_value (sym2, fi);
+                 common_val_print
+                   (val, stb->stream, 0, 1, 0, Val_no_prettyprint);
                  ui_out_field_stream (uiout, "value", stb);
                  do_cleanups (cleanup_tuple);
                  break;
This page took 0.027164 seconds and 4 git commands to generate.