/* Scheme/Guile language support routines for GDB, the GNU debugger.
- Copyright (C) 1995, 1996, 2000, 2003, 2005, 2008, 2009
+ Copyright (C) 1995, 1996, 2000, 2003, 2005, 2008, 2009, 2010
Free Software Foundation, Inc.
This file is part of GDB.
#if 0
SCM res;
#endif
+
if (len == 1)
if (*str == '+' || *str == '-') /* Catches lone `+' and `-' for speed */
return SCM_BOOL_F;
scm_skip_ws (void)
{
int c;
+
while (1)
switch ((c = *lexptr++))
{
for (;;)
{
int c = scm_skip_ws ();
+
if (')' == c || ']' == c)
return;
--lexptr;
int c, j;
struct stoken str;
LONGEST svalue = 0;
+
tryagain:
c = *lexptr++;
switch (c)
if (!skipping)
{
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)));
+ TYPE_LENGTH (value_type (val)),
+ gdbarch_byte_order (parse_gdbarch));
goto handle_immediate;
}
return;
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);
}
scm_parse (void)
{
char *start;
+
while (*lexptr == ' ')
lexptr++;
start = lexptr;