diff options
author | Fred Fish <fnf@specifix.com> | 1992-11-16 19:25:35 +0000 |
---|---|---|
committer | Fred Fish <fnf@specifix.com> | 1992-11-16 19:25:35 +0000 |
commit | 19cfe25d9010c84f8e8f973acf0587ec92489126 (patch) | |
tree | bb49061e07108729ab0445ec53e1a9b90433ec8f | |
parent | 45a655b0b67e5f21ee23119cc34bf7125965e59d (diff) | |
download | gdb-19cfe25d9010c84f8e8f973acf0587ec92489126.zip gdb-19cfe25d9010c84f8e8f973acf0587ec92489126.tar.gz gdb-19cfe25d9010c84f8e8f973acf0587ec92489126.tar.bz2 |
First cut at sanitizing away the chill stuff.
-rw-r--r-- | gdb/.Sanitize | 42 | ||||
-rw-r--r-- | gdb/ChangeLog | 50 | ||||
-rw-r--r-- | gdb/Makefile.in | 4 | ||||
-rw-r--r-- | gdb/dwarfread.c | 2 | ||||
-rw-r--r-- | gdb/gdbtypes.h | 4 | ||||
-rw-r--r-- | gdb/language.c | 28 | ||||
-rw-r--r-- | gdb/language.h | 2 |
7 files changed, 99 insertions, 33 deletions
diff --git a/gdb/.Sanitize b/gdb/.Sanitize index b4f07e2..0c0cb68 100644 --- a/gdb/.Sanitize +++ b/gdb/.Sanitize @@ -15,6 +15,10 @@ Do-first: +if ( echo $* | grep keep\-chill > /dev/null ) ; then + keep_these_too="ch-exp.y" +fi + # All files listed between the "Things-to-keep:" line and the # "Files-to-sed:" line will be kept. All other files will be removed. # Directories listed in this section will have their own Sanitize @@ -52,7 +56,6 @@ buildsym.c buildsym.h c-exp.y call-cmds.h -ch-exp.y coffread.c command.c command.h @@ -358,4 +361,41 @@ xm-vaxult.h Do-last: +echo Thawing away the \"chill\"... + +# Don't try to clean directories here, as the 'mv' command will fail. +# Also, grep fails on NFS mounted directories. +if ( echo $* | grep keep\-chill > /dev/null ) ; then + for i in * ; do + if test ! -d $i && (grep sanitize-chill $i > /dev/null) ; then + echo Keeping chill stuff in $i + fi + done +else + for i in * ; do + if test ! -d $i && (grep sanitize-chill $i > /dev/null) ; then + echo Thawing the \"chill\" out of $i... + cp $i new + sed '/start\-sanitize\-chill/,/end-\sanitize\-chill/d' < $i > new + if [ -n "${safe}" -a ! -f .Recover/$i ] ; then + echo Caching $i in .Recover... + mv $i .Recover + fi + mv new $i + fi + done + echo Thawing the \"chill\" out of Makefile.in... + cp Makefile.in new + sed -e 's/\$\{srcdir\}/ch-exp.y//g' \ + -e 's/ch-exp.y//g' \ + -e 's/ch-exp.tab.c//g' \ + -e 's/ch-exp.tab.o//g' \ + ' < Makefile.in > new + if [ -n "${safe}" -a ! -f .Recover/Makefile.in ] ; then + echo Caching Makefile.in in .Recover... + mv Makefile.in .Recover + fi + mv new Makefile.in +fi + # End of file. diff --git a/gdb/ChangeLog b/gdb/ChangeLog index fd10cdc..093222e 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -3,18 +3,9 @@ Sun Nov 15 09:22:09 1992 Fred Fish (fnf@cygnus.com) * Makefile.in (VERSION): Bump to 4.7.2 * symtab.c (find_pc_symtab): Fix return of random value to caller. - * Makefile.in (SFILES_MAINDIR): Add ch-exp.y. - * Makefile.in (YYFILES): Add ch-exp.tab.c. - * Makefile.in (YYOBJ): Add ch-exp.tab.o. - * Makefile.in (saber_gdb): Add unload of ch-exp.y and load - of ch-exp.tab.c. - * Makefile.in (distclean): Add target ch-exp.tab.c. - * Makefile.in (realclean): Add rm of ch-exp.tab.c. * Makefile.in (c-exp.tab.c, m2-exp.tab.c): Add dependency on Makefile since it contains sed patterns used in generation. Add sed pattern to also delete #include of any malloc.h. - * Makefile.in (ch-exp.tab.o, ch-exp.tab.c): New targets. - * ch-exp.y: New expression parser, for GNU-Chill. * c-exp.y, expr.c, expression.h, language.c, m2-exp.y, parser-defs.h, valarith.c, valops.c, value.h: Remap macros and function names to conform to K&R terminology with respect to @@ -35,36 +26,47 @@ Sun Nov 15 09:22:09 1992 Fred Fish (fnf@cygnus.com) value_lognot() => value_complement() * c-exp.y (c_op_print_tab): Add explicit empty terminator. * m2-exp.y (m2_op_print_tab): Add explicit empty terminator. + * i387-tdep.c (sys/dir.h): Remove, appears to be unnecessary + and is nonexistant in some SVR4 based systems. + * language.c (DEFAULT_ALLOCSIZE): Change from 3 => 4. + * m2-exp.y (number_sign, modblock): Make static, #ifdef out + unused modblock. + * m2-exp.y (ANDAND): Rename to LOGICAL_AND. + * source.c (source_info): Fix minor nits, print "1 line" rather + than "1 lines", and "language is <lang>". + * valarith.c (value_binop): Handle TYPE_CODE_BOOL as well + as TYPE_CODE_INT and TYPE_CODE_FLOAT. + * valprint.c (val_print): Print TYPE_CODE_BOOL type values as + "TRUE" or "FALSE". + * values.c (value_from_longest): Handle TYPE_CODE_BOOL. + **** start-sanitize-chill **** + * ch-exp.y: New expression parser, for GNU-Chill. * defs.h (enum language): Add language_chill. * dwarfread.c (set_cu_language): Add LANG_CHILL case and make LANG_MODULA2 a recognized language. - * eval.c (evaluate_subexp): Add OP_BOOL case. - * expprint.c (print_subexp): Add OP_BOOL case. * gdbtypes.h (enum_typecode): Note TYPE_CODE_BOOL used for Chill as well as Modula-2. * gdbtypes.y (builtin_type_chill_bool, builtin_type_chill_long, builtin_type_chill_ulong, builtin_type_chill_real): Add. - * i387-tdep.c (sys/dir.h): Remove, appears to be unnecessary - and is nonexistant in some SVR4 based systems. - * language.c (DEFAULT_ALLOCSIZE): Change from 3 => 4. * language.c (set_language_command): Add chill. * language.c (binop_result_type, integral_type, character_type, boolean_type, structured_type, value_true, binop_type_check): Add language_chill cases. * language.h (_LANG_chill): Define. - * m2-exp.y (number_sign, modblock): Make static, #ifdef out - unused modblock. - * m2-exp.y (ANDAND): Rename to LOGICAL_AND. - * source.c (source_info): Fix minor nits, print "1 line" rather - than "1 lines", and "language is <lang>". * symfile.c (deduce_language_from_filename): Recognize the filename extensions ".chill", ".c186", and ".c286" for Chill. - * valarith.c (value_binop): Handle TYPE_CODE_BOOL as well - as TYPE_CODE_INT and TYPE_CODE_FLOAT. - * valprint.c (val_print): Print TYPE_CODE_BOOL type values as - "TRUE" or "FALSE". * valprint.c (typedef_print): Add case for language_chill. - * values.c (value_from_longest): Handle TYPE_CODE_BOOL. + * Makefile.in (SFILES_MAINDIR): Add ch-exp.y. + * Makefile.in (YYFILES): Add ch-exp.tab.c. + * Makefile.in (YYOBJ): Add ch-exp.tab.o. + * Makefile.in (saber_gdb): Add unload of ch-exp.y and load + of ch-exp.tab.c. + * Makefile.in (distclean): Add target ch-exp.tab.c. + * Makefile.in (realclean): Add rm of ch-exp.tab.c. + * Makefile.in (ch-exp.tab.o, ch-exp.tab.c): New targets. + * eval.c (evaluate_subexp): Add OP_BOOL case. + * expprint.c (print_subexp): Add OP_BOOL case. + **** end-sanitize-chill **** Fri Nov 13 20:24:10 1992 Stu Grossman (grossman at cygnus.com) diff --git a/gdb/Makefile.in b/gdb/Makefile.in index e1d7916..ff7bc92 100644 --- a/gdb/Makefile.in +++ b/gdb/Makefile.in @@ -700,13 +700,14 @@ c-exp.tab.c: $(srcdir)/c-exp.y Makefile < y.tab.c > c-exp.tab.c -rm y.tab.c +# start-sanitize-chill # ch-exp.tab.c is generated in target dir from ch-exp.y if it doesn't exist # in srcdir, then compiled in target dir to ch-exp.tab.o. # Remove bogus decls for malloc/realloc/free which conflict with everything # else. ch-exp.tab.o: ch-exp.tab.c ch-exp.tab.c: $(srcdir)/ch-exp.y Makefile - @echo 'Expect 4 shift/reduce conflicts.' + @echo 'Expect rules never reduced, and lots of reduce/reduce conflicts.' ${YACC} $(srcdir)/ch-exp.y -sed -e '/extern.*malloc/d' \ -e '/extern.*realloc/d' \ @@ -716,6 +717,7 @@ ch-exp.tab.c: $(srcdir)/ch-exp.y Makefile -e 's/realloc/xrealloc/g' \ < y.tab.c > ch-exp.tab.c -rm y.tab.c +# end-sanitize-chill # m2-exp.tab.c is generated in target dir from m2-exp.y if it doesn't exist # in srcdir, then compiled in target dir to m2-exp.tab.o. diff --git a/gdb/dwarfread.c b/gdb/dwarfread.c index d9bd3f4..60360e4 100644 --- a/gdb/dwarfread.c +++ b/gdb/dwarfread.c @@ -486,9 +486,11 @@ set_cu_language (dip) case LANG_C_PLUS_PLUS: cu_language = language_cplus; break; + /* start-sanitize-chill */ case LANG_CHILL: cu_language = language_chill; break; + /* end-sanitize-chill */ case LANG_MODULA2: cu_language = language_m2; break; diff --git a/gdb/gdbtypes.h b/gdb/gdbtypes.h index 23c4644..0018336 100644 --- a/gdb/gdbtypes.h +++ b/gdb/gdbtypes.h @@ -80,7 +80,7 @@ enum type_code /* Modula-2 */ TYPE_CODE_CHAR, /* *real* character type */ - TYPE_CODE_BOOL /* Builtin Modula-2/Chill BOOLEAN */ + TYPE_CODE_BOOL /* Builtin BOOLEAN type */ }; /* For now allow source to use TYPE_CODE_CLASS for C++ classes, as an @@ -489,12 +489,14 @@ extern struct type *builtin_type_m2_card; extern struct type *builtin_type_m2_real; extern struct type *builtin_type_m2_bool; +/* start-sanitize-chill /* Chill types */ extern struct type *builtin_type_chill_bool; extern struct type *builtin_type_chill_long; extern struct type *builtin_type_chill_ulong; extern struct type *builtin_type_chill_real; +/* end-sanitize-chill /* LONG_LONG is defined if the host has "long long". */ diff --git a/gdb/language.c b/gdb/language.c index 0fb0796..afe0832 100644 --- a/gdb/language.c +++ b/gdb/language.c @@ -161,12 +161,14 @@ set_language_command (ignore, from_tty) /* FIXME -- do this from the list, with HELP. */ if (!language || !language[0]) { - printf("The currently understood settings are:\n\n\ -local or auto Automatic setting based on source file\n\ -c Use the C language\n\ -c++ Use the C++ language\n\ -chill Use the Chill language\n\ -modula-2 Use the Modula-2 language\n"); + printf("The currently understood settings are:\n\n"); + printf ("local or auto Automatic setting based on source file\n"); + printf ("c Use the C language\n"); + printf ("c++ Use the C++ language\n"); + /* start-sanitize-chill */ + printf ("chill Use the Chill language\n"); + /* end-sanitize-chill */ + printf ("modula-2 Use the Modula-2 language\n"); /* Restore the silly string. */ set_language(current_language->la_language); return; @@ -458,8 +460,10 @@ binop_result_type(v1,v2) not needed. */ return l1 > l2 ? VALUE_TYPE(v1) : VALUE_TYPE(v2); break; + /* start-sanitize-chill */ case language_chill: error ("Missing Chill support in function binop_result_check.");/*FIXME*/ + /* end-sanitize-chill */ } abort(); return (struct type *)0; /* For lint */ @@ -608,8 +612,10 @@ integral_type (type) (TYPE_CODE(type) != TYPE_CODE_ENUM) ? 0 : 1; case language_m2: return TYPE_CODE(type) != TYPE_CODE_INT ? 0 : 1; + /* start-sanitize-chill */ case language_chill: error ("Missing Chill support in function integral_type."); /*FIXME*/ + /* end-sanitize-chill */ default: error ("Language not supported."); } @@ -645,8 +651,10 @@ character_type (type) return (TYPE_CODE(type) == TYPE_CODE_INT) && TYPE_LENGTH(type) == sizeof(char) ? 1 : 0; + /* start-sanitize-chill */ case language_chill: error ("Missing Chill support in function character_type."); /*FIXME*/ + /* end-sanitize-chill */ default: return (0); } @@ -659,7 +667,9 @@ boolean_type (type) { switch(current_language->la_language) { + /* start-sanitize-chill */ case language_chill: + /* end-sanitize-chill */ case language_m2: return TYPE_CODE(type) != TYPE_CODE_BOOL ? 0 : 1; @@ -704,8 +714,10 @@ structured_type(type) return (TYPE_CODE(type) == TYPE_CODE_STRUCT) || (TYPE_CODE(type) == TYPE_CODE_SET) || (TYPE_CODE(type) == TYPE_CODE_ARRAY); + /* start-sanitize-chill */ case language_chill: error ("Missing Chill support in function structured_type."); /*FIXME*/ + /* end-sanitize-chill */ default: return (0); } @@ -750,8 +762,10 @@ value_true(val) return 0; /* BOOLEAN with value FALSE */ break; + /* start-sanitize-chill */ case language_chill: error ("Missing Chill support in function value_type."); /*FIXME*/ + /* end-sanitize-chill */ default: error ("Language not supported."); @@ -914,10 +928,12 @@ binop_type_check(arg1,arg2,op) } #endif +/* start-sanitize-chill */ #ifdef _LANG_chill case language_chill: error ("Missing Chill support in function binop_type_check.");/*FIXME*/ #endif +/* end-sanitize-chill */ } } diff --git a/gdb/language.h b/gdb/language.h index 9fd39b2..ec8c539 100644 --- a/gdb/language.h +++ b/gdb/language.h @@ -32,7 +32,9 @@ struct value; /* #include "lang_def.h" */ #define _LANG_c #define _LANG_m2 +/* start-sanitize-chill */ #define _LANG_chill +/* end-sanitize-chill */ /* range_mode == range_mode_auto: range_check set automatically to default of language. |