From 5b4d668a82e8e56c1d7c94624e7773e3ec292602 Mon Sep 17 00:00:00 2001 From: Per Bothner Date: Sat, 30 Sep 1995 23:36:40 +0000 Subject: * scm-lang.c: Moved Scheme value printing code to ... * scm-valprint.c: ... this new file. Also major improvements in support for printing SCM values. * scm-lang.h: New file. * scm-tags.h: New file. * Makefile.in: Note new scm-valprint.{c,o}. --- gdb/scm-lang.h | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 gdb/scm-lang.h (limited to 'gdb/scm-lang.h') diff --git a/gdb/scm-lang.h b/gdb/scm-lang.h new file mode 100644 index 0000000..2f3f451 --- /dev/null +++ b/gdb/scm-lang.h @@ -0,0 +1,44 @@ +#define SICP +#include "scm-tags.h" +#undef SCM_NCELLP +#define SCM_NCELLP(x) ((SCM_SIZE-1) & (int)(x)) +#define SCM_ITAG8_DATA(X) ((X)>>8) +#define SCM_ICHR(x) ((unsigned char)SCM_ITAG8_DATA(x)) +#define SCM_ICHRP(x) (SCM_ITAG8(x) == scm_tc8_char) +#define scm_tc8_char 0xf4 +#define SCM_IFLAGP(n) ((0x87 & (int)(n))==4) +#define SCM_ISYMNUM(n) ((int)((n)>>9)) +#define SCM_ISYMCHARS(n) (scm_isymnames[SCM_ISYMNUM(n)]) +#define SCM_ILOCP(n) ((0xff & (int)(n))==0xfc) +#define SCM_ITAG8(X) ((int)(X) & 0xff) +#define SCM_TYP7(x) (0x7f & (int)SCM_CAR(x)) +#define SCM_LENGTH(x) (((unsigned long)SCM_CAR(x))>>8) +#define SCM_NCONSP(x) (1 & (int)SCM_CAR(x)) +#define SCM_NECONSP(x) (SCM_NCONSP(x) && (1 != SCM_TYP3(x))) +#define SCM_CAR(x) scm_get_field (x, 0) +#define SCM_CDR(x) scm_get_field (x, 1) +#define SCM_VELTS(x) ((SCM *)SCM_CDR(x)) +#define SCM_CLOSCAR(x) (SCM_CAR(x)-scm_tc3_closure) +#define SCM_CODE(x) SCM_CAR(SCM_CLOSCAR (x)) + +#ifdef __STDC__ /* Forward decls for prototypes */ +struct value; +#endif + +extern int scm_value_print PARAMS ((struct value *, GDB_FILE*, + int, enum val_prettyprint)); + +extern int scm_val_print PARAMS ((struct type*, char*, CORE_ADDR, GDB_FILE*, + int, int, int, enum val_prettyprint)); + +extern LONGEST scm_get_field PARAMS ((LONGEST, int)); + +extern int scm_scmval_print PARAMS ((LONGEST, GDB_FILE *, + int, int, int, enum val_prettyprint)); + +extern int is_scmvalue_type PARAMS ((struct type*)); + +extern void scm_printchar PARAMS ((int, GDB_FILE*)); + +struct type *SCM_TYPE; + -- cgit v1.1