2 * File types.c - datatype handling stuff for internal debugger.
4 * Copyright (C) 1997, Eric Youngdale.
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 * Note: This really doesn't do much at the moment, but it forms the framework
21 * upon which full support for datatype handling will eventually be built.
28 #include <sys/types.h>
37 #include "wine/debug.h"
39 WINE_DEFAULT_DEBUG_CHANNEL(winedbg
);
41 #define NR_TYPE_HASH 521
44 static const int DEBUG_maxchar
= 1024;
48 struct en_values
* next
;
57 struct datatype
* type
;
65 struct datatype
* next
;
72 const char * output_format
;
78 unsigned short bitoff
;
80 struct datatype
* basetype
;
85 struct datatype
* pointsto
;
89 struct datatype
* rettype
;
95 struct datatype
* basictype
;
100 struct member
* members
;
104 struct en_values
* members
;
110 * All of the types that have been defined so far.
112 static struct datatype
* type_hash_table
[NR_TYPE_HASH
+ 1];
113 static struct datatype
* pointer_types
= NULL
;
114 static struct datatype
* basic_types
[DT_BASIC_LAST
];
116 static unsigned int type_hash( const char * name
)
118 unsigned int hash
= 0;
126 hash
= (hash
<< 4) + *p
++;
128 if( (tmp
= (hash
& 0xf0000000)) )
134 return hash
% NR_TYPE_HASH
;
138 static struct datatype
*
139 DEBUG_InitBasic(int type
, const char * name
, int size
, int b_signed
,
140 const char * output_format
)
144 struct datatype
* dt
;
145 dt
= (struct datatype
*) DBG_alloc(sizeof(struct datatype
));
151 hash
= type_hash(name
);
160 dt
->next
= type_hash_table
[hash
];
161 type_hash_table
[hash
] = dt
;
162 dt
->un
.basic
.basic_type
= type
;
163 dt
->un
.basic
.basic_size
= size
;
164 dt
->un
.basic
.b_signed
= b_signed
;
165 dt
->un
.basic
.output_format
= output_format
;
166 basic_types
[type
] = dt
;
174 DEBUG_LookupDataType(enum debug_type xtype
, int hash
, const char * typename
)
176 struct datatype
* dt
= NULL
;
178 if( typename
!= NULL
)
180 for( dt
= type_hash_table
[hash
]; dt
; dt
= dt
->next
)
182 if( xtype
!= dt
->type
|| dt
->name
== NULL
183 || dt
->name
[0] != typename
[0])
188 if( strcmp(dt
->name
, typename
) == 0 )
199 DEBUG_GetBasicType(enum debug_type_basic basic
)
201 if (basic
== 0 || basic
>= DT_BASIC_LAST
)
205 return basic_types
[basic
];
209 DEBUG_NewDataType(enum debug_type xtype
, const char * typename
)
211 struct datatype
* dt
= NULL
;
215 * The last bucket is special, and is used to hold typeless names.
217 if( typename
== NULL
)
223 hash
= type_hash(typename
);
226 dt
= DEBUG_LookupDataType(xtype
, hash
, typename
);
230 dt
= (struct datatype
*) DBG_alloc(sizeof(struct datatype
));
234 memset(dt
, 0, sizeof(*dt
));
237 if( typename
!= NULL
)
239 dt
->name
= DBG_strdup(typename
);
245 if( xtype
== DT_POINTER
)
247 dt
->next
= pointer_types
;
252 dt
->next
= type_hash_table
[hash
];
253 type_hash_table
[hash
] = dt
;
262 DEBUG_FindOrMakePointerType(struct datatype
* reftype
)
264 struct datatype
* dt
= NULL
;
266 if( reftype
!= NULL
)
268 for( dt
= pointer_types
; dt
; dt
= dt
->next
)
270 if( dt
->type
!= DT_POINTER
)
275 if( dt
->un
.pointer
.pointsto
== reftype
)
284 dt
= (struct datatype
*) DBG_alloc(sizeof(struct datatype
));
288 dt
->type
= DT_POINTER
;
289 dt
->un
.pointer
.pointsto
= reftype
;
290 dt
->next
= pointer_types
;
299 DEBUG_InitTypes(void)
301 static int beenhere
= 0;
303 if( beenhere
++ != 0 )
309 * Initialize a few builtin types.
312 DEBUG_InitBasic(DT_BASIC_INT
,"int",4,1,"%d");
313 DEBUG_InitBasic(DT_BASIC_CHAR
,"char",1,1,"'%c'");
314 DEBUG_InitBasic(DT_BASIC_LONGINT
,"long int",4,1,"%d");
315 DEBUG_InitBasic(DT_BASIC_UINT
,"unsigned int",4,0,"%d");
316 DEBUG_InitBasic(DT_BASIC_ULONGINT
,"long unsigned int",4,0,"%d");
317 DEBUG_InitBasic(DT_BASIC_LONGLONGINT
,"long long int",8,1,"%ld");
318 DEBUG_InitBasic(DT_BASIC_ULONGLONGINT
,"long long unsigned int",8,0,"%ld");
319 DEBUG_InitBasic(DT_BASIC_SHORTINT
,"short int",2,1,"%d");
320 DEBUG_InitBasic(DT_BASIC_USHORTINT
,"short unsigned int",2,0,"%d");
321 DEBUG_InitBasic(DT_BASIC_SCHAR
,"signed char",1,1,"'%c'");
322 DEBUG_InitBasic(DT_BASIC_UCHAR
,"unsigned char",1,0,"'%c'");
323 DEBUG_InitBasic(DT_BASIC_FLOAT
,"float",4,0,"%f");
324 DEBUG_InitBasic(DT_BASIC_DOUBLE
,"long double",12,0,NULL
);
325 DEBUG_InitBasic(DT_BASIC_LONGDOUBLE
,"double",8,0,"%lf");
326 DEBUG_InitBasic(DT_BASIC_CMPLX_INT
,"complex int",8,1,NULL
);
327 DEBUG_InitBasic(DT_BASIC_CMPLX_FLOAT
,"complex float",8,0,NULL
);
328 DEBUG_InitBasic(DT_BASIC_CMPLX_DOUBLE
,"complex double",16,0,NULL
);
329 DEBUG_InitBasic(DT_BASIC_CMPLX_LONGDOUBLE
,"complex long double",24,0,NULL
);
330 DEBUG_InitBasic(DT_BASIC_VOID
,"void",0,0,NULL
);
331 DEBUG_InitBasic(DT_BASIC_BOOL1
,NULL
,1,0,"%B");
332 DEBUG_InitBasic(DT_BASIC_BOOL2
,NULL
,2,0,"%B");
333 DEBUG_InitBasic(DT_BASIC_BOOL4
,NULL
,4,0,"%B");
335 basic_types
[DT_BASIC_STRING
] = DEBUG_NewDataType(DT_POINTER
, NULL
);
336 DEBUG_SetPointerType(basic_types
[DT_BASIC_STRING
], basic_types
[DT_BASIC_CHAR
]);
339 * Special version of int used with constants of various kinds.
341 DEBUG_InitBasic(DT_BASIC_CONST_INT
,NULL
,4,1,"%d");
344 * Now initialize the builtins for codeview.
346 DEBUG_InitCVDataTypes();
348 DEBUG_InitBasic(DT_BASIC_CONTEXT
,NULL
,4,0,"%R");
352 DEBUG_GetExprValue(const DBG_VALUE
* _value
, const char** format
)
356 struct datatype
* type2
= NULL
;
357 struct en_values
* e
;
358 const char * def_format
= "0x%x";
359 DBG_VALUE value
= *_value
;
361 assert(_value
->cookie
== DV_TARGET
|| _value
->cookie
== DV_HOST
);
364 /* FIXME? I don't quite get this...
365 * if this is wrong, value.addr shall be linearized
368 assert(value
.type
!= NULL
);
370 switch (value
.type
->type
) {
373 if (value
.type
->un
.basic
.basic_size
> sizeof(rtn
)) {
374 WINE_ERR("Size too large (%d)\n", value
.type
->un
.basic
.basic_size
);
377 /* FIXME: following code implies i386 byte ordering */
378 if (_value
->cookie
== DV_TARGET
) {
379 if (!DEBUG_READ_MEM_VERBOSE((void*)value
.addr
.off
, &rtn
,
380 value
.type
->un
.basic
.basic_size
))
383 memcpy(&rtn
, (void*)value
.addr
.off
, value
.type
->un
.basic
.basic_size
);
386 if ( (value
.type
->un
.basic
.b_signed
)
387 && ((value
.type
->un
.basic
.basic_size
& 3) != 0)
388 && ((rtn
>> (value
.type
->un
.basic
.basic_size
* 8 - 1)) != 0)) {
389 rtn
= rtn
| ((-1) << (value
.type
->un
.basic
.basic_size
* 8));
391 /* float type has to be promoted as a double */
392 if (value
.type
->un
.basic
.basic_type
== DT_BASIC_FLOAT
) {
395 memcpy(&f
, &rtn
, sizeof(f
));
397 memcpy(&rtn
, &d
, sizeof(rtn
));
399 if (value
.type
->un
.basic
.output_format
!= NULL
) {
400 def_format
= value
.type
->un
.basic
.output_format
;
404 * Check for single character prints that are out of range.
406 if ( value
.type
->un
.basic
.basic_size
== 1
407 && strcmp(def_format
, "'%c'") == 0
408 && ((rtn
< 0x20) || (rtn
> 0x80))) {
413 if (_value
->cookie
== DV_TARGET
) {
414 if (!DEBUG_READ_MEM_VERBOSE((void*)value
.addr
.off
, &rtn2
, sizeof(void*)))
417 rtn2
= *(unsigned int*)(value
.addr
.off
);
420 type2
= value
.type
->un
.pointer
.pointsto
;
423 def_format
= "Internal symbol error: unable to access memory location 0x%08x";
428 if (type2
->type
== DT_BASIC
&& type2
->un
.basic
.basic_size
== 1) {
429 if (_value
->cookie
== DV_TARGET
) {
431 def_format
= "\"%S\"";
432 /* FIXME: assuming little endian */
433 if (!DEBUG_READ_MEM_VERBOSE((void*)rtn2
, &ch
, 1))
436 def_format
= "\"%s\"";
439 def_format
= "0x%8.8x";
445 assert(_value
->cookie
== DV_TARGET
);
446 if (!DEBUG_READ_MEM_VERBOSE((void*)value
.addr
.off
, &rtn2
, sizeof(rtn2
)))
449 def_format
= "0x%8.8x";
452 assert(_value
->cookie
== DV_TARGET
);
453 if (!DEBUG_READ_MEM_VERBOSE((void*)value
.addr
.off
, &rtn2
, sizeof(rtn2
)))
457 for (e
= value
.type
->un
.enumeration
.members
; e
; e
= e
->next
) {
458 if (e
->value
== rtn
) {
471 if (format
!= NULL
) {
472 *format
= def_format
;
478 DEBUG_TypeDerefPointer(const DBG_VALUE
*value
, struct datatype
** newtype
)
480 DBG_ADDR addr
= value
->addr
;
483 assert(value
->cookie
== DV_TARGET
|| value
->cookie
== DV_HOST
);
488 * Make sure that this really makes sense.
490 if( value
->type
->type
!= DT_POINTER
)
493 if (value
->cookie
== DV_TARGET
) {
494 if (!DEBUG_READ_MEM((void*)value
->addr
.off
, &val
, sizeof(val
)))
497 val
= *(unsigned int*)value
->addr
.off
;
500 *newtype
= value
->type
->un
.pointer
.pointsto
;
502 return DEBUG_ToLinear(&addr
); /* FIXME: is this right (or "better") ? */
506 DEBUG_FindStructElement(DBG_VALUE
* value
, const char * ele_name
, int * tmpbuf
)
511 assert(value
->cookie
== DV_TARGET
|| value
->cookie
== DV_HOST
);
514 * Make sure that this really makes sense.
516 if( value
->type
->type
!= DT_STRUCT
)
522 for(m
= value
->type
->un
.structure
.members
; m
; m
= m
->next
)
524 if( strcmp(m
->name
, ele_name
) == 0 )
526 value
->type
= m
->type
;
527 if( (m
->offset
& 7) != 0 || (m
->size
& 7) != 0)
530 * Bitfield operation. We have to extract the field and store
531 * it in a temporary buffer so that we get it all right.
533 *tmpbuf
= ((*(int* ) (value
->addr
.off
+ (m
->offset
>> 3))) >> (m
->offset
& 7));
534 value
->addr
.off
= (int) tmpbuf
;
536 mask
= 0xffffffff << (m
->size
);
539 * OK, now we have the correct part of the number.
540 * Check to see whether the basic type is signed or not, and if so,
541 * we need to sign extend the number.
543 if( m
->type
->type
== DT_BASIC
&& m
->type
->un
.basic
.b_signed
!= 0
544 && (*tmpbuf
& (1 << (m
->size
- 1))) != 0 )
551 value
->addr
.off
+= (m
->offset
>> 3);
562 DEBUG_SetStructSize(struct datatype
* dt
, int size
)
564 assert(dt
->type
== DT_STRUCT
);
566 if( dt
->un
.structure
.members
!= NULL
)
571 dt
->un
.structure
.size
= size
;
572 dt
->un
.structure
.members
= NULL
;
578 DEBUG_CopyFieldlist(struct datatype
* dt
, struct datatype
* dt2
)
580 if (!(dt
->type
== dt2
->type
&& ((dt
->type
== DT_STRUCT
) || (dt
->type
== DT_ENUM
)))) {
581 DEBUG_Printf("Error: Copyfield list mismatch (%d<>%d): ", dt
->type
, dt2
->type
);
582 DEBUG_PrintTypeCast(dt
);
584 DEBUG_PrintTypeCast(dt2
);
589 if( dt
->type
== DT_STRUCT
)
591 dt
->un
.structure
.members
= dt2
->un
.structure
.members
;
595 dt
->un
.enumeration
.members
= dt2
->un
.enumeration
.members
;
602 DEBUG_AddStructElement(struct datatype
* dt
, char * name
, struct datatype
* type
,
603 int offset
, int size
)
606 struct member
* last
;
607 struct en_values
* e
;
609 if( dt
->type
== DT_STRUCT
)
611 for(last
= dt
->un
.structure
.members
; last
; last
= last
->next
)
613 if( (last
->name
[0] == name
[0])
614 && (strcmp(last
->name
, name
) == 0) )
618 if( last
->next
== NULL
)
623 m
= (struct member
*) DBG_alloc(sizeof(struct member
));
629 m
->name
= DBG_strdup(name
);
635 m
->next
= dt
->un
.structure
.members
;
636 dt
->un
.structure
.members
= m
;
644 * If the base type is bitfield, then adjust the offsets here so that we
645 * are able to look things up without lots of falter-all.
647 if( type
&& type
->type
== DT_BITFIELD
)
649 m
->offset
+= m
->type
->un
.bitfield
.bitoff
;
650 m
->size
= m
->type
->un
.bitfield
.nbits
;
651 m
->type
= m
->type
->un
.bitfield
.basetype
;
654 else if( dt
->type
== DT_ENUM
)
656 e
= (struct en_values
*) DBG_alloc(sizeof(struct en_values
));
662 e
->name
= DBG_strdup(name
);
664 e
->next
= dt
->un
.enumeration
.members
;
665 dt
->un
.enumeration
.members
= e
;
675 DEBUG_GetPointerType(struct datatype
* dt
)
677 if( dt
->type
== DT_POINTER
)
679 return dt
->un
.pointer
.pointsto
;
686 DEBUG_SetPointerType(struct datatype
* dt
, struct datatype
* dt2
)
691 dt
->un
.pointer
.pointsto
= dt2
;
694 dt
->un
.funct
.rettype
= dt2
;
704 DEBUG_SetArrayParams(struct datatype
* dt
, int min
, int max
, struct datatype
* dt2
)
706 assert(dt
->type
== DT_ARRAY
);
707 dt
->un
.array
.start
= min
;
708 dt
->un
.array
.end
= max
;
709 dt
->un
.array
.basictype
= dt2
;
715 DEBUG_SetBitfieldParams(struct datatype
* dt
, int offset
, int nbits
,
716 struct datatype
* dt2
)
718 assert(dt
->type
== DT_BITFIELD
);
719 dt
->un
.bitfield
.bitoff
= offset
;
720 dt
->un
.bitfield
.nbits
= nbits
;
721 dt
->un
.bitfield
.basetype
= dt2
;
726 int DEBUG_GetObjectSize(struct datatype
* dt
)
736 return dt
->un
.basic
.basic_size
;
738 return sizeof(int *);
740 return dt
->un
.structure
.size
;
744 return (dt
->un
.array
.end
- dt
->un
.array
.start
)
745 * DEBUG_GetObjectSize(dt
->un
.array
.basictype
);
748 * Bitfields have to be handled separately later on
749 * when we insert the element into the structure.
755 WINE_ERR("Unknown type???\n");
762 DEBUG_ArrayIndex(const DBG_VALUE
* value
, DBG_VALUE
* result
, int index
)
766 assert(value
->cookie
== DV_TARGET
|| value
->cookie
== DV_HOST
);
769 * Make sure that this really makes sense.
771 if( value
->type
->type
== DT_POINTER
)
774 * Get the base type, so we know how much to index by.
776 size
= DEBUG_GetObjectSize(value
->type
->un
.pointer
.pointsto
);
777 result
->type
= value
->type
->un
.pointer
.pointsto
;
778 result
->addr
.off
= (DWORD
)DEBUG_ReadMemory(value
) + size
*index
;
780 /* Contents of array must be on same target */
781 result
->cookie
= value
->cookie
;
783 else if (value
->type
->type
== DT_ARRAY
)
785 size
= DEBUG_GetObjectSize(value
->type
->un
.array
.basictype
);
786 result
->type
= value
->type
->un
.array
.basictype
;
787 result
->addr
.off
= value
->addr
.off
+ size
* (index
- value
->type
->un
.array
.start
);
789 /* Contents of array must be on same target */
790 result
->cookie
= value
->cookie
;
800 /***********************************************************************
803 * Implementation of the 'print' command.
806 DEBUG_Print( const DBG_VALUE
*value
, int count
, char format
, int level
)
815 assert(value
->cookie
== DV_TARGET
|| value
->cookie
== DV_HOST
);
819 DEBUG_Printf("Count other than 1 is meaningless in 'print' command\n");
823 if( value
->type
== NULL
)
825 /* No type, just print the addr value */
826 if (value
->addr
.seg
&& (value
->addr
.seg
!= 0xffffffff))
827 DEBUG_nchar
+= DEBUG_Printf("0x%04lx: ", value
->addr
.seg
);
828 DEBUG_nchar
+= DEBUG_Printf("0x%08lx", value
->addr
.off
);
837 if( DEBUG_nchar
> DEBUG_maxchar
)
843 if( format
== 'i' || format
== 's' || format
== 'w' || format
== 'b' || format
== 'g')
845 DEBUG_Printf("Format specifier '%c' is meaningless in 'print' command\n", format
);
849 switch(value
->type
->type
)
854 DEBUG_PrintBasic(value
, 1, format
);
857 DEBUG_nchar
+= DEBUG_Printf("{");
858 for(m
= value
->type
->un
.structure
.members
; m
; m
= m
->next
)
861 DEBUG_FindStructElement(&val1
, m
->name
, &xval
);
862 DEBUG_nchar
+= DEBUG_Printf("%s=", m
->name
);
863 DEBUG_Print(&val1
, 1, format
, level
+ 1);
864 if( m
->next
!= NULL
)
866 DEBUG_nchar
+= DEBUG_Printf(", ");
868 if( DEBUG_nchar
> DEBUG_maxchar
)
870 DEBUG_Printf("...}");
874 DEBUG_nchar
+= DEBUG_Printf("}");
878 * Loop over all of the entries, printing stuff as we go.
880 size
= DEBUG_GetObjectSize(value
->type
->un
.array
.basictype
);
886 * Special handling for character arrays.
888 pnt
= (char *) value
->addr
.off
;
889 len
= value
->type
->un
.array
.end
- value
->type
->un
.array
.start
+ 1;
890 clen
= (DEBUG_nchar
+ len
< DEBUG_maxchar
)
891 ? len
: (DEBUG_maxchar
- DEBUG_nchar
);
893 DEBUG_nchar
+= DEBUG_Printf("\"");
894 switch (value
->cookie
)
897 DEBUG_nchar
+= DEBUG_PrintStringA(&value
->addr
, clen
);
900 DEBUG_OutputA(pnt
, clen
);
904 DEBUG_nchar
+= DEBUG_Printf((len
> clen
) ? "...\"" : "\"");
908 val1
.type
= value
->type
->un
.array
.basictype
;
909 DEBUG_nchar
+= DEBUG_Printf("{");
910 for( i
=value
->type
->un
.array
.start
; i
<= value
->type
->un
.array
.end
; i
++ )
912 DEBUG_Print(&val1
, 1, format
, level
+ 1);
913 val1
.addr
.off
+= size
;
914 if( i
== value
->type
->un
.array
.end
)
916 DEBUG_nchar
+= DEBUG_Printf("}");
920 DEBUG_nchar
+= DEBUG_Printf(", ");
922 if( DEBUG_nchar
> DEBUG_maxchar
)
924 DEBUG_Printf("...}");
930 DEBUG_Printf("Function at ???\n");
933 DEBUG_Printf("Unknown type (%d)\n", value
->type
->type
);
942 DEBUG_nchar
+= DEBUG_Printf("\n");
946 static void DEBUG_DumpAType(struct datatype
* dt
, BOOL deep
)
948 const char* name
= (dt
->name
) ? dt
->name
: "--none--";
953 DEBUG_Printf("BASIC(%s)", name
);
956 DEBUG_Printf("POINTER(%s)<", name
);
957 DEBUG_DumpAType(dt
->un
.pointer
.pointsto
, FALSE
);
961 DEBUG_Printf("STRUCT(%s) %d {",
962 name
, dt
->un
.structure
.size
);
963 if (dt
->un
.structure
.members
!= NULL
)
966 for (m
= dt
->un
.structure
.members
; m
; m
= m
->next
)
968 DEBUG_Printf(" %s(%d", m
->name
, m
->offset
/ 8);
969 if (m
->offset
% 8 != 0)
970 DEBUG_Printf(".%d", m
->offset
/ 8);
971 DEBUG_Printf("/%d", m
->size
/ 8);
972 if (m
->size
% 8 != 0)
973 DEBUG_Printf(".%d", m
->size
% 8);
980 DEBUG_Printf("ARRAY(%s)[", name
);
981 DEBUG_DumpAType(dt
->un
.array
.basictype
, FALSE
);
985 DEBUG_Printf("ENUM(%s)", name
);
988 DEBUG_Printf("BITFIELD(%s)", name
);
991 DEBUG_Printf("FUNC(%s)(", name
);
992 DEBUG_DumpAType(dt
->un
.funct
.rettype
, FALSE
);
996 WINE_ERR("Unknown type???");
999 if (deep
) DEBUG_Printf("\n");
1002 int DEBUG_DumpTypes(void)
1004 struct datatype
* dt
= NULL
;
1007 for (hash
= 0; hash
< NR_TYPE_HASH
+ 1; hash
++)
1009 for (dt
= type_hash_table
[hash
]; dt
; dt
= dt
->next
)
1011 DEBUG_DumpAType(dt
, TRUE
);
1017 enum debug_type
DEBUG_GetType(struct datatype
* dt
)
1022 const char* DEBUG_GetName(struct datatype
* dt
)
1028 DEBUG_TypeCast(enum debug_type type
, const char * name
)
1033 * The last bucket is special, and is used to hold typeless names.
1037 hash
= NR_TYPE_HASH
;
1041 hash
= type_hash(name
);
1044 return DEBUG_LookupDataType(type
, hash
, name
);
1048 DEBUG_PrintTypeCast(const struct datatype
* dt
)
1050 const char* name
= "none";
1054 DEBUG_Printf("--invalid--");
1058 if( dt
->name
!= NULL
)
1066 DEBUG_Printf("%s", name
);
1069 DEBUG_PrintTypeCast(dt
->un
.pointer
.pointsto
);
1073 DEBUG_Printf("struct %s", name
);
1076 DEBUG_Printf("%s[]", name
);
1079 DEBUG_Printf("enum %s", name
);
1082 DEBUG_Printf("unsigned %s", name
);
1085 DEBUG_PrintTypeCast(dt
->un
.funct
.rettype
);
1086 DEBUG_Printf("(*%s)()", name
);
1089 WINE_ERR("Unknown type???\n");
1096 int DEBUG_PrintType( const DBG_VALUE
*value
)
1098 assert(value
->cookie
== DV_TARGET
|| value
->cookie
== DV_HOST
);
1102 DEBUG_Printf("Unknown type\n");
1105 if (!DEBUG_PrintTypeCast(value
->type
))