comparison src/alloc.c @ 337:fbbf69b4e8a7 r21-0-66

Import from CVS: tag r21-0-66
author cvs
date Mon, 13 Aug 2007 10:51:02 +0200
parents 19dcec799385
children 8bec6624d99b
comparison
equal deleted inserted replaced
336:fe0a93612022 337:fbbf69b4e8a7
634 return imp == type || imp == type + 1; 634 return imp == type || imp == type + 1;
635 #endif 635 #endif
636 } 636 }
637 637
638 638
639 /**********************************************************************/ 639 /************************************************************************/
640 /* Debugger support */ 640 /* Debugger support */
641 /**********************************************************************/ 641 /************************************************************************/
642 /* Give gdb/dbx enough information to decode Lisp Objects. 642 /* Give gdb/dbx enough information to decode Lisp Objects. We make
643 We make sure certain symbols are defined, so gdb doesn't complain 643 sure certain symbols are always defined, so gdb doesn't complain
644 about expressions in src/gdbinit. Values are randomly chosen. 644 about expressions in src/gdbinit. See src/gdbinit or src/dbxrc to
645 See src/gdbinit or src/dbxrc to see how this is used. */ 645 see how this is used. */
646 646
647 enum dbg_constants
648 {
649 #ifdef USE_MINIMAL_TAGBITS 647 #ifdef USE_MINIMAL_TAGBITS
650 dbg_valmask = (EMACS_INT) (((1UL << VALBITS) - 1) << GCBITS), 648 EMACS_UINT dbg_valmask = ((1UL << VALBITS) - 1) << GCBITS;
651 dbg_typemask = (EMACS_INT) ((1UL << GCTYPEBITS) - 1), 649 EMACS_UINT dbg_typemask = (1UL << GCTYPEBITS) - 1;
652 dbg_USE_MINIMAL_TAGBITS = 1, 650 unsigned char dbg_USE_MINIMAL_TAGBITS = 1;
653 dbg_Lisp_Type_Int = 100, 651 unsigned char Lisp_Type_Int = 100;
654 #else /* ! USE_MIMIMAL_TAGBITS */ 652 #else
655 dbg_valmask = (EMACS_INT) ((1UL << VALBITS) - 1), 653 EMACS_UINT dbg_valmask = (1UL << VALBITS) - 1;
656 dbg_typemask = (EMACS_INT) (((1UL << GCTYPEBITS) - 1) << (VALBITS + GCMARKBITS)), 654 EMACS_UINT dbg_typemask = ((1UL << GCTYPEBITS) - 1) << (VALBITS + GCMARKBITS);
657 dbg_USE_MINIMAL_TAGBITS = 0, 655 unsigned char dbg_USE_MINIMAL_TAGBITS = 0;
658 dbg_Lisp_Type_Int = Lisp_Type_Int, 656 #endif
659 #endif /* ! USE_MIMIMAL_TAGBITS */ 657
658 #ifdef USE_UNION_TYPE
659 unsigned char dbg_USE_UNION_TYPE = 1;
660 #else
661 unsigned char dbg_USE_UNION_TYPE = 0;
662 #endif
663
660 #ifdef USE_INDEXED_LRECORD_IMPLEMENTATION 664 #ifdef USE_INDEXED_LRECORD_IMPLEMENTATION
661 dbg_USE_INDEXED_LRECORD_IMPLEMENTATION = 1, 665 unsigned char dbg_USE_INDEXED_LRECORD_IMPLEMENTATION = 1;
662 #else 666 #else
663 dbg_USE_INDEXED_LRECORD_IMPLEMENTATION = 0, 667 unsigned char dbg_USE_INDEXED_LRECORD_IMPLEMENTATION = 0;
664 #endif 668 #endif
665 dbg_Lisp_Type_Char = Lisp_Type_Char, 669
666 dbg_Lisp_Type_Record = Lisp_Type_Record,
667 #ifdef LRECORD_CONS 670 #ifdef LRECORD_CONS
668 dbg_Lisp_Type_Cons = 101, 671 unsigned char Lisp_Type_Cons = 101;
669 #else 672 #else
670 dbg_Lisp_Type_Cons = Lisp_Type_Cons, 673 unsigned char lrecord_cons;
671 lrecord_cons = 201, 674 #endif
672 #endif 675
673 #ifdef LRECORD_STRING 676 #ifdef LRECORD_STRING
674 dbg_Lisp_Type_String = 102, 677 unsigned char Lisp_Type_String = 102;
675 #else 678 #else
676 dbg_Lisp_Type_String = Lisp_Type_String, 679 unsigned char lrecord_string;
677 lrecord_string = 202, 680 #endif
678 #endif 681
679 #ifdef LRECORD_VECTOR 682 #ifdef LRECORD_VECTOR
680 dbg_Lisp_Type_Vector = 103, 683 unsigned char Lisp_Type_Vector = 103;
681 #else 684 #else
682 dbg_Lisp_Type_Vector = Lisp_Type_Vector, 685 unsigned char lrecord_vector;
683 lrecord_vector = 203, 686 #endif
684 #endif 687
685 #ifdef LRECORD_SYMBOL 688 #ifdef LRECORD_SYMBOL
686 dbg_Lisp_Type_Symbol = 104, 689 unsigned char Lisp_Type_Symbol = 104;
687 #else 690 #else
688 dbg_Lisp_Type_Symbol = Lisp_Type_Symbol, 691 unsigned char lrecord_symbol;
689 lrecord_symbol = 204, 692 #endif
690 #endif 693
691 #ifndef MULE 694 #ifndef MULE
692 lrecord_char_table_entry = 205, 695 unsigned char lrecord_char_table_entry;
693 lrecord_charset = 206, 696 unsigned char lrecord_charset;
694 lrecord_coding_system = 207, 697 #ifndef FILE_CODING
695 #endif 698 unsigned char lrecord_coding_system;
699 #endif
700 #endif
701
696 #ifndef HAVE_TOOLBARS 702 #ifndef HAVE_TOOLBARS
697 lrecord_toolbar_button = 208, 703 unsigned char lrecord_toolbar_button;
698 #endif 704 #endif
699 #ifndef HAVE_TOOLTALK 705
700 lrecord_tooltalk_message = 210, 706 #ifndef TOOLTALK
701 lrecord_tooltalk_pattern = 211, 707 unsigned char lrecord_tooltalk_message;
702 #endif 708 unsigned char lrecord_tooltalk_pattern;
709 #endif
710
703 #ifndef HAVE_DATABASE 711 #ifndef HAVE_DATABASE
704 lrecord_database = 212, 712 unsigned char lrecord_database;
705 #endif 713 #endif
706 dbg_valbits = VALBITS, 714
707 dbg_gctypebits = GCTYPEBITS 715 unsigned char dbg_valbits = VALBITS;
708 /* If we don't have an actual object of this enum, pgcc (and perhaps 716 unsigned char dbg_gctypebits = GCTYPEBITS;
709 other compilers) might optimize away the entire type declaration :-( */ 717
710 } dbg_dummy; 718 /* Macros turned into functions for ease of debugging.
719 Debuggers don't know about macros! */
720 int dbg_eq (Lisp_Object obj1, Lisp_Object obj2);
721 int
722 dbg_eq (Lisp_Object obj1, Lisp_Object obj2)
723 {
724 return EQ (obj1, obj2);
725 }
711 726
712 727
713 /**********************************************************************/ 728 /**********************************************************************/
714 /* Fixed-size type macros */ 729 /* Fixed-size type macros */
715 /**********************************************************************/ 730 /**********************************************************************/
4312 Vdoc_directory = Qnil; 4327 Vdoc_directory = Qnil;
4313 Vconfigure_info_directory = Qnil; 4328 Vconfigure_info_directory = Qnil;
4314 Vexec_path = Qnil; 4329 Vexec_path = Qnil;
4315 Vload_path = Qnil; 4330 Vload_path = Qnil;
4316 /* Vdump_load_path = Qnil; */ 4331 /* Vdump_load_path = Qnil; */
4332 /* Release hash tables for locate_file */
4333 Fset (intern ("early-package-load-path"), Qnil);
4334 Fset (intern ("late-package-load-path"), Qnil);
4335 Fset (intern ("last-package-load-path"), Qnil);
4317 uncache_home_directory(); 4336 uncache_home_directory();
4318 4337
4319 #if defined(LOADHIST) && !(defined(LOADHIST_DUMPED) || \ 4338 #if defined(LOADHIST) && !(defined(LOADHIST_DUMPED) || \
4320 defined(LOADHIST_BUILTIN)) 4339 defined(LOADHIST_BUILTIN))
4321 Vload_history = Qnil; 4340 Vload_history = Qnil;