VM: Define ASM_MUL on ARM only if SMULL instruction is supported.
[bpt/guile.git] / libguile / gdbint.c
index 4ec9ad4..7a0ebc9 100644 (file)
@@ -1,20 +1,21 @@
 /* GDB interface for Guile
- * Copyright (C) 1996,1997,1999,2000,2001,2002,2004
+ * Copyright (C) 1996,1997,1999,2000,2001,2002,2004,2009,2011,2012
  * Free Software Foundation, Inc.
  *
  * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 3 of
+ * the License, or (at your option) any later version.
  *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  * Lesser General Public License for more details.
  *
  * You should have received a copy of the GNU Lesser General Public
  * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA
  */
 
 #ifdef HAVE_CONFIG_H
@@ -165,7 +166,7 @@ gdb_read (char *str)
        }
     }
   gdb_result = ans;
-  /* Protect answer from future GC */
+  /* Protect answer from future GC (FIXME: still needed with BDW-GC?) */
   if (SCM_NIMP (ans))
     scm_permanent_object (ans);
 exit:
@@ -189,8 +190,7 @@ gdb_eval (SCM exp)
     }
   SCM_BEGIN_FOREIGN_BLOCK;
   {
-    SCM env = scm_top_level_env (SCM_TOP_LEVEL_LOOKUP_CLOSURE);
-    gdb_result = scm_permanent_object (scm_i_eval_x (exp, env));
+    gdb_result = scm_permanent_object (scm_primitive_eval (exp));
   }
   SCM_END_FOREIGN_BLOCK;
   return 0;
@@ -234,8 +234,7 @@ gdb_binding (SCM name, SCM value)
     }
   SCM_BEGIN_FOREIGN_BLOCK;
   {
-    SCM var = scm_sym2var (name, SCM_TOP_LEVEL_LOOKUP_CLOSURE, SCM_BOOL_T);
-    SCM_VARIABLE_SET (var, value);
+    scm_define (name, value);
   }
   SCM_END_FOREIGN_BLOCK;
   return 0;
@@ -248,15 +247,13 @@ scm_init_gdbint ()
   SCM port;
 
   scm_print_carefully_p = 0;
-  
-  port = scm_mkstrport (SCM_INUM0,
-                       scm_c_make_string (0, SCM_UNDEFINED),
+
+  port = scm_mkstrport (SCM_INUM0, SCM_BOOL_F,
                        SCM_OPN | SCM_WRTNG,
                        s);
   gdb_output_port = scm_permanent_object (port);
-  
-  port = scm_mkstrport (SCM_INUM0,
-                       scm_c_make_string (0, SCM_UNDEFINED),
+
+  port = scm_mkstrport (SCM_INUM0, SCM_BOOL_F,
                        SCM_OPN | SCM_RDNG | SCM_WRTNG,
                        s);
   gdb_input_port = scm_permanent_object (port);