* gas/mips/mips.exp (run_dump_test_arch): Check for the presence
[deliverable/binutils-gdb.git] / gdb / scm-exp.c
index 14aeabd1a45f1c414ce56d8cb78974ff85d3662f..69eb249fc8ff738cf5073f382db9f828cda72b49 100644 (file)
@@ -1,11 +1,13 @@
 /* Scheme/Guile language support routines for GDB, the GNU debugger.
-   Copyright 1995, 1996, 2000 Free Software Foundation, Inc.
+
+   Copyright (C) 1995, 1996, 2000, 2003, 2005, 2008, 2009, 2010
+   Free Software Foundation, Inc.
 
    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,
@@ -14,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 "symtab.h"
@@ -112,6 +112,7 @@ scm_istring2number (char *str, int len, int radix)
 #if 0
   SCM res;
 #endif
+
   if (len == 1)
     if (*str == '+' || *str == '-')    /* Catches lone `+' and `-' for speed */
       return SCM_BOOL_F;
@@ -237,7 +238,8 @@ scm_read_token (int c, int weird)
 static int
 scm_skip_ws (void)
 {
-  register int c;
+  int c;
+
   while (1)
     switch ((c = *lexptr++))
       {
@@ -272,6 +274,7 @@ scm_lreadparen (int skipping)
   for (;;)
     {
       int c = scm_skip_ws ();
+
       if (')' == c || ']' == c)
        return;
       --lexptr;
@@ -287,6 +290,7 @@ scm_lreadr (int skipping)
   int c, j;
   struct stoken str;
   LONGEST svalue = 0;
+
 tryagain:
   c = *lexptr++;
   switch (c)
@@ -308,11 +312,13 @@ tryagain:
       scm_lreadr (skipping);
       if (!skipping)
        {
-         value_ptr val = scm_evaluate_string (str.ptr, lexptr - str.ptr);
-         if (!is_scmvalue_type (VALUE_TYPE (val)))
+         struct value *val = scm_evaluate_string (str.ptr, lexptr - str.ptr);
+
+         if (!is_scmvalue_type (value_type (val)))
            error ("quoted scm form yields non-SCM value");
-         svalue = extract_signed_integer (VALUE_CONTENTS (val),
-                                          TYPE_LENGTH (VALUE_TYPE (val)));
+         svalue = extract_signed_integer (value_contents (val),
+                                          TYPE_LENGTH (value_type (val)),
+                                          gdbarch_byte_order (parse_gdbarch));
          goto handle_immediate;
        }
       return;
@@ -470,7 +476,7 @@ handle_immediate:
   if (!skipping)
     {
       write_exp_elt_opcode (OP_LONG);
-      write_exp_elt_type (builtin_type_scm);
+      write_exp_elt_type (builtin_scm_type (parse_gdbarch)->builtin_scm);
       write_exp_elt_longcst (svalue);
       write_exp_elt_opcode (OP_LONG);
     }
@@ -480,6 +486,7 @@ int
 scm_parse (void)
 {
   char *start;
+
   while (*lexptr == ' ')
     lexptr++;
   start = lexptr;
This page took 0.024006 seconds and 4 git commands to generate.