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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, 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 "wine/debug.h"
30 WINE_DEFAULT_DEBUG_CHANNEL(winedbg
);
32 /******************************************************************
35 * Get rid of any potential typedef in the lvalue's type to get
36 * to the 'real' type (the one we can work upon).
38 BOOL
types_get_real_type(struct dbg_type
* type
, DWORD
* tag
)
40 if (type
->id
== dbg_itype_none
) return FALSE
;
43 if (!types_get_info(type
, TI_GET_SYMTAG
, tag
))
45 if (*tag
!= SymTagTypedef
) return TRUE
;
46 } while (types_get_info(type
, TI_GET_TYPE
, &type
->id
));
50 /******************************************************************
51 * types_extract_as_integer
53 * Given a lvalue, try to get an integral (or pointer/address) value
56 long int types_extract_as_integer(const struct dbg_lvalue
* lvalue
)
62 struct dbg_type type
= lvalue
->type
;
64 if (!types_get_real_type(&type
, &tag
))
65 RaiseException(DEBUG_STATUS_NOT_AN_INTEGER
, 0, 0, NULL
);
67 if (type
.id
== dbg_itype_segptr
)
69 return (long int)memory_to_linear_addr(&lvalue
->addr
);
75 if (!types_get_info(&type
, TI_GET_LENGTH
, &size
) ||
76 !types_get_info(&type
, TI_GET_BASETYPE
, &bt
))
78 WINE_ERR("Couldn't get information\n");
79 RaiseException(DEBUG_STATUS_INTERNAL_ERROR
, 0, 0, NULL
);
81 if (size
> sizeof(rtn
))
83 WINE_ERR("Size too large (%s)\n", wine_dbgstr_longlong(size
));
84 RaiseException(DEBUG_STATUS_NOT_AN_INTEGER
, 0, 0, NULL
);
90 if (!be_cpu
->fetch_integer(lvalue
, (unsigned)size
, TRUE
, &val
))
91 RaiseException(DEBUG_STATUS_INTERNAL_ERROR
, 0, 0, NULL
);
95 if (!be_cpu
->fetch_integer(lvalue
, (unsigned)size
, FALSE
, &val
))
96 RaiseException(DEBUG_STATUS_INTERNAL_ERROR
, 0, 0, NULL
);
97 rtn
= (DWORD
)(DWORD64
)val
;
100 RaiseException(DEBUG_STATUS_NOT_AN_INTEGER
, 0, 0, NULL
);
103 case SymTagPointerType
:
104 if (!memory_read_value(lvalue
, sizeof(void*), &rtn
))
105 RaiseException(DEBUG_STATUS_INTERNAL_ERROR
, 0, 0, NULL
);
107 case SymTagArrayType
:
109 assert(lvalue
->cookie
== DLV_TARGET
);
110 if (!memory_read_value(lvalue
, sizeof(rtn
), &rtn
))
111 RaiseException(DEBUG_STATUS_INTERNAL_ERROR
, 0, 0, NULL
);
114 assert(lvalue
->cookie
== DLV_TARGET
);
115 if (!memory_read_value(lvalue
, sizeof(rtn
), &rtn
))
116 RaiseException(DEBUG_STATUS_INTERNAL_ERROR
, 0, 0, NULL
);
118 case SymTagFunctionType
:
119 rtn
= (unsigned)memory_to_linear_addr(&lvalue
->addr
);
122 WINE_FIXME("Unsupported tag %lu\n", tag
);
123 RaiseException(DEBUG_STATUS_NOT_AN_INTEGER
, 0, 0, NULL
);
130 /******************************************************************
131 * types_extract_as_address
135 void types_extract_as_address(const struct dbg_lvalue
* lvalue
, ADDRESS64
* addr
)
137 if (lvalue
->type
.id
== dbg_itype_segptr
&& lvalue
->type
.module
== 0)
139 *addr
= lvalue
->addr
;
143 addr
->Mode
= AddrModeFlat
;
144 addr
->Offset
= types_extract_as_integer( lvalue
);
148 /******************************************************************
152 BOOL
types_deref(const struct dbg_lvalue
* lvalue
, struct dbg_lvalue
* result
)
154 struct dbg_type type
= lvalue
->type
;
157 memset(result
, 0, sizeof(*result
));
158 result
->type
.id
= dbg_itype_none
;
159 result
->type
.module
= 0;
162 * Make sure that this really makes sense.
164 if (!types_get_real_type(&type
, &tag
) || tag
!= SymTagPointerType
||
165 !memory_read_value(lvalue
, sizeof(result
->addr
.Offset
), &result
->addr
.Offset
) ||
166 !types_get_info(&type
, TI_GET_TYPE
, &result
->type
.id
))
168 result
->type
.module
= type
.module
;
169 result
->cookie
= DLV_TARGET
;
170 /* FIXME: this is currently buggy.
171 * there is no way to tell were the deref:ed value is...
173 * x is a pointer to struct s, x being on the stack
174 * => lvalue is in debuggee, result is in debugger
175 * x is a pointer to struct s, x being optimized into a reg
176 * => lvalue is debugger, result is debuggee
177 * x is a pointer to internal variable x
178 * => lvalue is debugger, result is debuggee
179 * so we force debuggee address space, because dereferencing pointers to
180 * internal variables is very unlikely. A correct fix would be
183 result
->addr
.Mode
= AddrModeFlat
;
187 /******************************************************************
188 * types_get_udt_element_lvalue
190 * Implement a structure derefencement
192 static BOOL
types_get_udt_element_lvalue(struct dbg_lvalue
* lvalue
,
193 const struct dbg_type
* type
, long int* tmpbuf
)
195 DWORD offset
, bitoffset
;
201 types_get_info(type
, TI_GET_TYPE
, &lvalue
->type
.id
);
202 lvalue
->type
.module
= type
->module
;
203 if (!types_get_info(type
, TI_GET_OFFSET
, &offset
)) return FALSE
;
204 lvalue
->addr
.Offset
+= offset
;
206 if (types_get_info(type
, TI_GET_BITPOSITION
, &bitoffset
))
208 types_get_info(type
, TI_GET_LENGTH
, &length
);
209 /* FIXME: this test isn't sufficient, depending on start of bitfield
210 * (ie a 32 bit field can spread across 5 bytes)
212 if (length
> 8 * sizeof(*tmpbuf
)) return FALSE
;
213 lvalue
->addr
.Offset
+= bitoffset
>> 3;
215 * Bitfield operation. We have to extract the field and store
216 * it in a temporary buffer so that we get it all right.
218 if (!memory_read_value(lvalue
, sizeof(*tmpbuf
), tmpbuf
)) return FALSE
;
219 mask
= 0xffffffff << (DWORD
)length
;
220 *tmpbuf
>>= bitoffset
& 7;
223 lvalue
->cookie
= DLV_HOST
;
224 lvalue
->addr
.Offset
= (DWORD
)tmpbuf
;
227 * OK, now we have the correct part of the number.
228 * Check to see whether the basic type is signed or not, and if so,
229 * we need to sign extend the number.
231 if (types_get_info(&lvalue
->type
, TI_GET_BASETYPE
, &bt
) &&
232 bt
== btInt
&& (*tmpbuf
& (1 << ((DWORD
)length
- 1))))
239 if (!memory_read_value(lvalue
, sizeof(*tmpbuf
), tmpbuf
)) return FALSE
;
244 /******************************************************************
245 * types_udt_find_element
248 BOOL
types_udt_find_element(struct dbg_lvalue
* lvalue
, const char* name
, long int* tmpbuf
)
251 char buffer
[sizeof(TI_FINDCHILDREN_PARAMS
) + 256 * sizeof(DWORD
)];
252 TI_FINDCHILDREN_PARAMS
* fcp
= (TI_FINDCHILDREN_PARAMS
*)buffer
;
256 struct dbg_type type
;
258 if (!types_get_info(&lvalue
->type
, TI_GET_SYMTAG
, &tag
) ||
262 if (types_get_info(&lvalue
->type
, TI_GET_CHILDRENCOUNT
, &count
))
267 fcp
->Count
= min(count
, 256);
268 if (types_get_info(&lvalue
->type
, TI_FINDCHILDREN
, fcp
))
270 type
.module
= lvalue
->type
.module
;
271 for (i
= 0; i
< min(fcp
->Count
, count
); i
++)
274 type
.id
= fcp
->ChildId
[i
];
275 types_get_info(&type
, TI_GET_SYMNAME
, &ptr
);
277 WideCharToMultiByte(CP_ACP
, 0, ptr
, -1, tmp
, sizeof(tmp
), NULL
, NULL
);
278 HeapFree(GetProcessHeap(), 0, ptr
);
279 if (strcmp(tmp
, name
)) continue;
281 return types_get_udt_element_lvalue(lvalue
, &type
, tmpbuf
);
284 count
-= min(count
, 256);
291 /******************************************************************
294 * Grab an element from an array
296 BOOL
types_array_index(const struct dbg_lvalue
* lvalue
, int index
,
297 struct dbg_lvalue
* result
)
299 struct dbg_type type
= lvalue
->type
;
303 if (!types_get_real_type(&type
, &tag
)) return FALSE
;
306 case SymTagArrayType
:
307 types_get_info(&type
, TI_GET_COUNT
, &count
);
308 if (index
< 0 || index
>= count
) return FALSE
;
310 case SymTagPointerType
:
311 /* Contents of array share same data (addr mode, module...) */
314 * Get the base type, so we know how much to index by.
316 types_get_info(&type
, TI_GET_TYPE
, &result
->type
.id
);
317 types_get_info(&result
->type
, TI_GET_LENGTH
, &length
);
318 memory_read_value(lvalue
, sizeof(result
->addr
.Offset
), &result
->addr
.Offset
);
319 result
->addr
.Offset
+= index
* (DWORD
)length
;
329 unsigned long result
; /* out: the found type */
330 enum SymTagEnum tag
; /* in: the tag to look for */
333 unsigned long typeid; /* when tag is SymTagUDT */
334 const char* name
; /* when tag is SymTagPointerType */
338 static BOOL CALLBACK
types_cb(PSYMBOL_INFO sym
, ULONG size
, void* _user
)
340 struct type_find_t
* user
= (struct type_find_t
*)_user
;
342 struct dbg_type type
;
345 if (sym
->Tag
== user
->tag
)
350 if (!strcmp(user
->u
.name
, sym
->Name
))
352 user
->result
= sym
->TypeIndex
;
356 case SymTagPointerType
:
357 type
.module
= sym
->ModBase
;
358 type
.id
= sym
->TypeIndex
;
359 if (types_get_info(&type
, TI_GET_TYPE
, &type_id
) && type_id
== user
->u
.typeid)
361 user
->result
= sym
->TypeIndex
;
371 /******************************************************************
374 * Should look up in module based at linear whether (typeid*) exists
375 * Otherwise, we could create it locally
377 struct dbg_type
types_find_pointer(const struct dbg_type
* type
)
379 struct type_find_t f
;
382 f
.result
= dbg_itype_none
;
383 f
.tag
= SymTagPointerType
;
384 f
.u
.typeid = type
->id
;
385 SymEnumTypes(dbg_curr_process
->handle
, type
->module
, types_cb
, &f
);
386 ret
.module
= type
->module
;
391 /******************************************************************
394 * Should look up in the module based at linear address whether a type
395 * named 'name' and with the correct tag exists
397 struct dbg_type
types_find_type(unsigned long linear
, const char* name
, enum SymTagEnum tag
)
400 struct type_find_t f
;
403 f
.result
= dbg_itype_none
;
406 SymEnumTypes(dbg_curr_process
->handle
, linear
, types_cb
, &f
);
412 /***********************************************************************
415 * Implementation of the 'print' command.
417 void print_value(const struct dbg_lvalue
* lvalue
, char format
, int level
)
419 struct dbg_type type
= lvalue
->type
;
420 struct dbg_lvalue lvalue_field
;
426 if (!types_get_real_type(&type
, &tag
))
428 WINE_FIXME("---error\n");
432 if (type
.id
== dbg_itype_none
)
434 /* No type, just print the addr value */
435 print_bare_address(&lvalue
->addr
);
439 if (format
== 'i' || format
== 's' || format
== 'w' || format
== 'b' || format
== 'g')
441 dbg_printf("Format specifier '%c' is meaningless in 'print' command\n", format
);
449 case SymTagPointerType
:
450 /* FIXME: this in not 100% optimal (as we're going through the typedef handling
453 print_basic(lvalue
, 1, format
);
456 if (types_get_info(&type
, TI_GET_CHILDRENCOUNT
, &count
))
458 char buffer
[sizeof(TI_FINDCHILDREN_PARAMS
) + 256 * sizeof(DWORD
)];
459 TI_FINDCHILDREN_PARAMS
* fcp
= (TI_FINDCHILDREN_PARAMS
*)buffer
;
463 struct dbg_type sub_type
;
469 fcp
->Count
= min(count
, 256);
470 if (types_get_info(&type
, TI_FINDCHILDREN
, fcp
))
472 for (i
= 0; i
< min(fcp
->Count
, count
); i
++)
475 sub_type
.module
= type
.module
;
476 sub_type
.id
= fcp
->ChildId
[i
];
477 types_get_info(&sub_type
, TI_GET_SYMNAME
, &ptr
);
479 WideCharToMultiByte(CP_ACP
, 0, ptr
, -1, tmp
, sizeof(tmp
), NULL
, NULL
);
480 dbg_printf("%s=", tmp
);
481 HeapFree(GetProcessHeap(), 0, ptr
);
482 lvalue_field
= *lvalue
;
483 if (types_get_udt_element_lvalue(&lvalue_field
, &sub_type
, &tmpbuf
))
485 print_value(&lvalue_field
, format
, level
+ 1);
487 if (i
< min(fcp
->Count
, count
) - 1 || count
> 256) dbg_printf(", ");
490 count
-= min(count
, 256);
496 case SymTagArrayType
:
498 * Loop over all of the entries, printing stuff as we go.
501 types_get_info(&type
, TI_GET_COUNT
, &count
);
502 types_get_info(&type
, TI_GET_LENGTH
, &size
);
509 * Special handling for character arrays.
511 /* FIXME should check basic type here (should be a char!!!!)... */
512 len
= min(count
, sizeof(buffer
));
513 memory_get_string(dbg_curr_process
,
514 memory_to_linear_addr(&lvalue
->addr
),
515 lvalue
->cookie
== DLV_TARGET
, TRUE
, buffer
, len
);
516 dbg_printf("\"%s%s\"", buffer
, (len
< count
) ? "..." : "");
519 lvalue_field
= *lvalue
;
520 types_get_info(&type
, TI_GET_TYPE
, &lvalue_field
.type
.id
);
522 for (i
= 0; i
< count
; i
++)
524 print_value(&lvalue_field
, format
, level
+ 1);
525 lvalue_field
.addr
.Offset
+= size
/ count
;
526 dbg_printf((i
== count
- 1) ? "}" : ", ");
529 case SymTagFunctionType
:
530 dbg_printf("Function ");
531 print_bare_address(&lvalue
->addr
);
533 types_print_type(&type
, FALSE
);
536 lvalue_field
= *lvalue
;
537 types_get_info(&lvalue
->type
, TI_GET_TYPE
, &lvalue_field
.type
.id
);
538 print_value(&lvalue_field
, format
, level
);
541 WINE_FIXME("Unknown tag (%lu)\n", tag
);
542 RaiseException(DEBUG_STATUS_INTERNAL_ERROR
, 0, 0, NULL
);
548 if (level
== 0) dbg_printf("\n");
551 static BOOL CALLBACK
print_types_cb(PSYMBOL_INFO sym
, ULONG size
, void* ctx
)
553 struct dbg_type type
;
554 type
.module
= sym
->ModBase
;
555 type
.id
= sym
->TypeIndex
;
556 dbg_printf("Mod: %08lx ID: %08lx \n", type
.module
, type
.id
);
557 types_print_type(&type
, TRUE
);
562 static BOOL CALLBACK
print_types_mod_cb(PSTR mod_name
, DWORD base
, void* ctx
)
564 return SymEnumTypes(dbg_curr_process
->handle
, base
, print_types_cb
, ctx
);
567 int print_types(void)
569 SymEnumerateModules(dbg_curr_process
->handle
, print_types_mod_cb
, NULL
);
573 int types_print_type(const struct dbg_type
* type
, BOOL details
)
578 DWORD tag
, udt
, count
;
579 struct dbg_type subtype
;
581 if (type
->id
== dbg_itype_none
|| !types_get_info(type
, TI_GET_SYMTAG
, &tag
))
583 dbg_printf("--invalid--<%lxh>--", type
->id
);
587 if (types_get_info(type
, TI_GET_SYMNAME
, &ptr
) && ptr
)
589 WideCharToMultiByte(CP_ACP
, 0, ptr
, -1, tmp
, sizeof(tmp
), NULL
, NULL
);
591 HeapFree(GetProcessHeap(), 0, ptr
);
593 else name
= "--none--";
598 if (details
) dbg_printf("Basic<%s>", name
); else dbg_printf("%s", name
);
600 case SymTagPointerType
:
601 types_get_info(type
, TI_GET_TYPE
, &subtype
.id
);
602 subtype
.module
= type
->module
;
603 types_print_type(&subtype
, FALSE
);
607 types_get_info(type
, TI_GET_UDTKIND
, &udt
);
610 case UdtStruct
: dbg_printf("struct %s", name
); break;
611 case UdtUnion
: dbg_printf("union %s", name
); break;
612 case UdtClass
: dbg_printf("class %s", name
); break;
613 default: WINE_ERR("Unsupported UDT type (%ld) for %s", udt
, name
); break;
616 types_get_info(type
, TI_GET_CHILDRENCOUNT
, &count
))
618 char buffer
[sizeof(TI_FINDCHILDREN_PARAMS
) + 256 * sizeof(DWORD
)];
619 TI_FINDCHILDREN_PARAMS
* fcp
= (TI_FINDCHILDREN_PARAMS
*)buffer
;
623 struct dbg_type type_elt
;
629 fcp
->Count
= min(count
, 256);
630 if (types_get_info(type
, TI_FINDCHILDREN
, fcp
))
632 for (i
= 0; i
< min(fcp
->Count
, count
); i
++)
635 type_elt
.module
= type
->module
;
636 type_elt
.id
= fcp
->ChildId
[i
];
637 types_get_info(&type_elt
, TI_GET_SYMNAME
, &ptr
);
639 WideCharToMultiByte(CP_ACP
, 0, ptr
, -1, tmp
, sizeof(tmp
), NULL
, NULL
);
640 HeapFree(GetProcessHeap(), 0, ptr
);
641 dbg_printf("%s", tmp
);
642 if (types_get_info(&type_elt
, TI_GET_TYPE
, &type_elt
.id
))
645 types_print_type(&type_elt
, details
);
647 if (i
< min(fcp
->Count
, count
) - 1 || count
> 256) dbg_printf(", ");
650 count
-= min(count
, 256);
656 case SymTagArrayType
:
657 types_get_info(type
, TI_GET_TYPE
, &subtype
.id
);
658 subtype
.module
= type
->module
;
659 types_print_type(&subtype
, details
);
660 dbg_printf(" %s[]", name
);
663 dbg_printf("enum %s", name
);
665 case SymTagFunctionType
:
666 types_get_info(type
, TI_GET_TYPE
, &subtype
.id
);
667 subtype
.module
= type
->module
;
668 types_print_type(&subtype
, FALSE
);
669 dbg_printf(" (*%s)(", name
);
670 if (types_get_info(type
, TI_GET_CHILDRENCOUNT
, &count
))
672 char buffer
[sizeof(TI_FINDCHILDREN_PARAMS
) + 256 * sizeof(DWORD
)];
673 TI_FINDCHILDREN_PARAMS
* fcp
= (TI_FINDCHILDREN_PARAMS
*)buffer
;
679 fcp
->Count
= min(count
, 256);
680 if (types_get_info(type
, TI_FINDCHILDREN
, fcp
))
682 for (i
= 0; i
< min(fcp
->Count
, count
); i
++)
684 subtype
.id
= fcp
->ChildId
[i
];
685 types_get_info(&subtype
, TI_GET_TYPE
, &subtype
.id
);
686 types_print_type(&subtype
, FALSE
);
687 if (i
< min(fcp
->Count
, count
) - 1 || count
> 256) dbg_printf(", ");
690 count
-= min(count
, 256);
700 WINE_ERR("Unknown type %lu for %s\n", tag
, name
);
707 /* helper to typecast pInfo to its expected type (_t) */
708 #define X(_t) (*((_t*)pInfo))
710 BOOL
types_get_info(const struct dbg_type
* type
, IMAGEHLP_SYMBOL_TYPE_INFO ti
, void* pInfo
)
712 if (type
->id
== dbg_itype_none
) return FALSE
;
713 if (type
->module
!= 0)
716 ret
= SymGetTypeInfo(dbg_curr_process
->handle
, type
->module
, type
->id
, ti
, pInfo
);
718 SymGetTypeInfo(dbg_curr_process
->handle
, type
->module
, type
->id
, TI_GET_SYMTAG
, &tag
) &&
719 tag
== SymTagBaseType
&&
720 SymGetTypeInfo(dbg_curr_process
->handle
, type
->module
, type
->id
, TI_GET_BASETYPE
, &bt
))
722 static const WCHAR voidW
[] = {'v','o','i','d','\0'};
723 static const WCHAR charW
[] = {'c','h','a','r','\0'};
724 static const WCHAR wcharW
[] = {'W','C','H','A','R','\0'};
725 static const WCHAR intW
[] = {'i','n','t','\0'};
726 static const WCHAR uintW
[] = {'u','n','s','i','g','n','e','d',' ','i','n','t','\0'};
727 static const WCHAR floatW
[] = {'f','l','o','a','t','\0'};
728 static const WCHAR boolW
[] = {'b','o','o','l','\0'};
729 static const WCHAR longW
[] = {'l','o','n','g',' ','i','n','t','\0'};
730 static const WCHAR ulongW
[] = {'u','n','s','i','g','n','e','d',' ','l','o','n','g',' ','i','n','t','\0'};
731 static const WCHAR complexW
[] = {'c','o','m','p','l','e','x','\0'};
732 const WCHAR
* name
= NULL
;
736 case btVoid
: name
= voidW
; break;
737 case btChar
: name
= charW
; break;
738 case btWChar
: name
= wcharW
; break;
739 case btInt
: name
= intW
; break;
740 case btUInt
: name
= uintW
; break;
741 case btFloat
: name
= floatW
; break;
742 case btBool
: name
= boolW
; break;
743 case btLong
: name
= longW
; break;
744 case btULong
: name
= ulongW
; break;
745 case btComplex
: name
= complexW
; break;
746 default: WINE_FIXME("Unsupported basic type %ld\n", bt
); return FALSE
;
748 X(WCHAR
*) = HeapAlloc(GetProcessHeap(), 0, (lstrlenW(name
) + 1) * sizeof(WCHAR
));
751 lstrcpyW(X(WCHAR
*), name
);
758 assert(type
->id
>= dbg_itype_first
);
762 case dbg_itype_unsigned_int
:
765 case TI_GET_SYMTAG
: X(DWORD
) = SymTagBaseType
; break;
766 case TI_GET_LENGTH
: X(DWORD64
) = 4; break;
767 case TI_GET_BASETYPE
: X(DWORD
) = btUInt
; break;
768 default: WINE_FIXME("unsupported %u for u-int\n", ti
); return FALSE
;
771 case dbg_itype_signed_int
:
774 case TI_GET_SYMTAG
: X(DWORD
) = SymTagBaseType
; break;
775 case TI_GET_LENGTH
: X(DWORD64
) = 4; break;
776 case TI_GET_BASETYPE
: X(DWORD
) = btInt
; break;
777 default: WINE_FIXME("unsupported %u for s-int\n", ti
); return FALSE
;
780 case dbg_itype_unsigned_short_int
:
783 case TI_GET_SYMTAG
: X(DWORD
) = SymTagBaseType
; break;
784 case TI_GET_LENGTH
: X(DWORD64
) = 2; break;
785 case TI_GET_BASETYPE
: X(DWORD
) = btUInt
; break;
786 default: WINE_FIXME("unsupported %u for u-short int\n", ti
); return FALSE
;
789 case dbg_itype_signed_short_int
:
792 case TI_GET_SYMTAG
: X(DWORD
) = SymTagBaseType
; break;
793 case TI_GET_LENGTH
: X(DWORD64
) = 2; break;
794 case TI_GET_BASETYPE
: X(DWORD
) = btInt
; break;
795 default: WINE_FIXME("unsupported %u for s-short int\n", ti
); return FALSE
;
798 case dbg_itype_unsigned_char_int
:
801 case TI_GET_SYMTAG
: X(DWORD
) = SymTagBaseType
; break;
802 case TI_GET_LENGTH
: X(DWORD64
) = 1; break;
803 case TI_GET_BASETYPE
: X(DWORD
) = btUInt
; break;
804 default: WINE_FIXME("unsupported %u for u-char int\n", ti
); return FALSE
;
807 case dbg_itype_signed_char_int
:
810 case TI_GET_SYMTAG
: X(DWORD
) = SymTagBaseType
; break;
811 case TI_GET_LENGTH
: X(DWORD64
) = 1; break;
812 case TI_GET_BASETYPE
: X(DWORD
) = btInt
; break;
813 default: WINE_FIXME("unsupported %u for s-char int\n", ti
); return FALSE
;
819 case TI_GET_SYMTAG
: X(DWORD
) = SymTagBaseType
; break;
820 case TI_GET_LENGTH
: X(DWORD64
) = 1; break;
821 case TI_GET_BASETYPE
: X(DWORD
) = btChar
; break;
822 default: WINE_FIXME("unsupported %u for char int\n", ti
); return FALSE
;
825 case dbg_itype_astring
:
828 case TI_GET_SYMTAG
: X(DWORD
) = SymTagPointerType
; break;
829 case TI_GET_LENGTH
: X(DWORD64
) = 4; break;
830 case TI_GET_TYPE
: X(DWORD
) = dbg_itype_char
; break;
831 default: WINE_FIXME("unsupported %u for a string\n", ti
); return FALSE
;
834 case dbg_itype_segptr
:
837 case TI_GET_SYMTAG
: X(DWORD
) = SymTagBaseType
; break;
838 case TI_GET_LENGTH
: X(DWORD64
) = 4; break;
839 case TI_GET_BASETYPE
: X(DWORD
) = btInt
; break;
840 default: WINE_FIXME("unsupported %u for seg-ptr\n", ti
); return FALSE
;
843 default: WINE_FIXME("unsupported type id 0x%lx\n", type
->id
);