- test -z "$xemacs_initted" && XEmacsInit
- obj=$[*(void**)(&$1)]
- test "$obj" = "(nil)" && obj="0x0"
- if test $dbg_USE_MINIMAL_TAGBITS = 1; then
- if test $[(int)($obj & 1)] = 1; then
- # It's an int
- val=$[(long)(((unsigned long long)$obj) >> 1)]
- type=$dbg_Lisp_Type_Int
+ if test -z "$xemacs_initted"; then XEmacsInit; fi;
+ if test $dbg_USE_UNION_TYPE = 1; then
+ # Repeat after me... dbx sux, dbx sux, dbx sux...
+ # Allow both `pobj Qnil' and `pobj 0x82746834' to work
+ case $(whatis $1) in
+ *Lisp_Object*) obj="$[(unsigned long)(($1).i)]";;
+ *) obj="$[(unsigned long)($1)]";;
+ esac
+ else
+ obj="$[(unsigned long)($1)]";
+ fi
+ if test $[(int)($obj & 1)] = 1; then
+ # It's an int
+ val=$[(long)(((unsigned long long)$obj) >> 1)]
+ type=$Lisp_Type_Int
+ else
+ type=$[(int)(((void*)$obj) & $dbg_typemask)]
+ if test $type = $Lisp_Type_Char; then
+ val=$[(void*)(long)(((unsigned long long)($obj & $dbg_valmask)) >> $dbg_gctypebits)]