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 if (!memory_read_value(lvalue
, sizeof(rtn
), &rtn
))
110 RaiseException(DEBUG_STATUS_INTERNAL_ERROR
, 0, 0, NULL
);
113 if (!memory_read_value(lvalue
, sizeof(rtn
), &rtn
))
114 RaiseException(DEBUG_STATUS_INTERNAL_ERROR
, 0, 0, NULL
);
116 case SymTagFunctionType
:
117 rtn
= (unsigned)memory_to_linear_addr(&lvalue
->addr
);
120 WINE_FIXME("Unsupported tag %lu\n", tag
);
121 RaiseException(DEBUG_STATUS_NOT_AN_INTEGER
, 0, 0, NULL
);
128 /******************************************************************
129 * types_extract_as_address
133 void types_extract_as_address(const struct dbg_lvalue
* lvalue
, ADDRESS64
* addr
)
135 if (lvalue
->type
.id
== dbg_itype_segptr
&& lvalue
->type
.module
== 0)
137 *addr
= lvalue
->addr
;
141 addr
->Mode
= AddrModeFlat
;
142 addr
->Offset
= types_extract_as_integer( lvalue
);
146 /******************************************************************
150 BOOL
types_deref(const struct dbg_lvalue
* lvalue
, struct dbg_lvalue
* result
)
152 struct dbg_type type
= lvalue
->type
;
155 memset(result
, 0, sizeof(*result
));
156 result
->type
.id
= dbg_itype_none
;
157 result
->type
.module
= 0;
160 * Make sure that this really makes sense.
162 if (!types_get_real_type(&type
, &tag
) || tag
!= SymTagPointerType
||
163 !memory_read_value(lvalue
, sizeof(result
->addr
.Offset
), &result
->addr
.Offset
) ||
164 !types_get_info(&type
, TI_GET_TYPE
, &result
->type
.id
))
166 result
->type
.module
= type
.module
;
167 result
->cookie
= DLV_TARGET
;
168 /* FIXME: this is currently buggy.
169 * there is no way to tell were the deref:ed value is...
171 * x is a pointer to struct s, x being on the stack
172 * => lvalue is in debuggee, result is in debugger
173 * x is a pointer to struct s, x being optimized into a reg
174 * => lvalue is debugger, result is debuggee
175 * x is a pointer to internal variable x
176 * => lvalue is debugger, result is debuggee
177 * so we force debuggee address space, because dereferencing pointers to
178 * internal variables is very unlikely. A correct fix would be
181 result
->addr
.Mode
= AddrModeFlat
;
185 /******************************************************************
186 * types_get_udt_element_lvalue
188 * Implement a structure derefencement
190 static BOOL
types_get_udt_element_lvalue(struct dbg_lvalue
* lvalue
,
191 const struct dbg_type
* type
, long int* tmpbuf
)
193 DWORD offset
, bitoffset
;
199 types_get_info(type
, TI_GET_TYPE
, &lvalue
->type
.id
);
200 lvalue
->type
.module
= type
->module
;
201 if (!types_get_info(type
, TI_GET_OFFSET
, &offset
)) return FALSE
;
202 lvalue
->addr
.Offset
+= offset
;
204 if (types_get_info(type
, TI_GET_BITPOSITION
, &bitoffset
))
206 types_get_info(type
, TI_GET_LENGTH
, &length
);
207 /* FIXME: this test isn't sufficient, depending on start of bitfield
208 * (ie a 32 bit field can spread across 5 bytes)
210 if (length
> 8 * sizeof(*tmpbuf
)) return FALSE
;
211 lvalue
->addr
.Offset
+= bitoffset
>> 3;
213 * Bitfield operation. We have to extract the field and store
214 * it in a temporary buffer so that we get it all right.
216 if (!memory_read_value(lvalue
, sizeof(*tmpbuf
), tmpbuf
)) return FALSE
;
217 mask
= 0xffffffff << (DWORD
)length
;
218 *tmpbuf
>>= bitoffset
& 7;
221 lvalue
->cookie
= DLV_HOST
;
222 lvalue
->addr
.Offset
= (DWORD
)tmpbuf
;
225 * OK, now we have the correct part of the number.
226 * Check to see whether the basic type is signed or not, and if so,
227 * we need to sign extend the number.
229 if (types_get_info(&lvalue
->type
, TI_GET_BASETYPE
, &bt
) &&
230 bt
== btInt
&& (*tmpbuf
& (1 << ((DWORD
)length
- 1))))
237 if (!memory_read_value(lvalue
, sizeof(*tmpbuf
), tmpbuf
)) return FALSE
;
242 /******************************************************************
243 * types_udt_find_element
246 BOOL
types_udt_find_element(struct dbg_lvalue
* lvalue
, const char* name
, long int* tmpbuf
)
249 char buffer
[sizeof(TI_FINDCHILDREN_PARAMS
) + 256 * sizeof(DWORD
)];
250 TI_FINDCHILDREN_PARAMS
* fcp
= (TI_FINDCHILDREN_PARAMS
*)buffer
;
254 struct dbg_type type
;
256 if (!types_get_info(&lvalue
->type
, TI_GET_SYMTAG
, &tag
) ||
260 if (types_get_info(&lvalue
->type
, TI_GET_CHILDRENCOUNT
, &count
))
265 fcp
->Count
= min(count
, 256);
266 if (types_get_info(&lvalue
->type
, TI_FINDCHILDREN
, fcp
))
268 type
.module
= lvalue
->type
.module
;
269 for (i
= 0; i
< min(fcp
->Count
, count
); i
++)
272 type
.id
= fcp
->ChildId
[i
];
273 types_get_info(&type
, TI_GET_SYMNAME
, &ptr
);
275 WideCharToMultiByte(CP_ACP
, 0, ptr
, -1, tmp
, sizeof(tmp
), NULL
, NULL
);
276 HeapFree(GetProcessHeap(), 0, ptr
);
277 if (strcmp(tmp
, name
)) continue;
279 return types_get_udt_element_lvalue(lvalue
, &type
, tmpbuf
);
282 count
-= min(count
, 256);
289 /******************************************************************
292 * Grab an element from an array
294 BOOL
types_array_index(const struct dbg_lvalue
* lvalue
, int index
,
295 struct dbg_lvalue
* result
)
297 struct dbg_type type
= lvalue
->type
;
301 if (!types_get_real_type(&type
, &tag
)) return FALSE
;
304 case SymTagArrayType
:
305 types_get_info(&type
, TI_GET_COUNT
, &count
);
306 if (index
< 0 || index
>= count
) return FALSE
;
308 case SymTagPointerType
:
309 /* Contents of array share same data (addr mode, module...) */
312 * Get the base type, so we know how much to index by.
314 types_get_info(&type
, TI_GET_TYPE
, &result
->type
.id
);
315 types_get_info(&result
->type
, TI_GET_LENGTH
, &length
);
316 memory_read_value(lvalue
, sizeof(result
->addr
.Offset
), &result
->addr
.Offset
);
317 result
->addr
.Offset
+= index
* (DWORD
)length
;
327 unsigned long result
; /* out: the found type */
328 enum SymTagEnum tag
; /* in: the tag to look for */
331 unsigned long typeid; /* when tag is SymTagUDT */
332 const char* name
; /* when tag is SymTagPointerType */
336 static BOOL CALLBACK
types_cb(PSYMBOL_INFO sym
, ULONG size
, void* _user
)
338 struct type_find_t
* user
= (struct type_find_t
*)_user
;
340 struct dbg_type type
;
343 if (sym
->Tag
== user
->tag
)
348 if (!strcmp(user
->u
.name
, sym
->Name
))
350 user
->result
= sym
->TypeIndex
;
354 case SymTagPointerType
:
355 type
.module
= sym
->ModBase
;
356 type
.id
= sym
->TypeIndex
;
357 if (types_get_info(&type
, TI_GET_TYPE
, &type_id
) && type_id
== user
->u
.typeid)
359 user
->result
= sym
->TypeIndex
;
369 /******************************************************************
372 * Should look up in module based at linear whether (typeid*) exists
373 * Otherwise, we could create it locally
375 struct dbg_type
types_find_pointer(const struct dbg_type
* type
)
377 struct type_find_t f
;
380 f
.result
= dbg_itype_none
;
381 f
.tag
= SymTagPointerType
;
382 f
.u
.typeid = type
->id
;
383 SymEnumTypes(dbg_curr_process
->handle
, type
->module
, types_cb
, &f
);
384 ret
.module
= type
->module
;
389 /******************************************************************
392 * Should look up in the module based at linear address whether a type
393 * named 'name' and with the correct tag exists
395 struct dbg_type
types_find_type(unsigned long linear
, const char* name
, enum SymTagEnum tag
)
398 struct type_find_t f
;
401 f
.result
= dbg_itype_none
;
404 SymEnumTypes(dbg_curr_process
->handle
, linear
, types_cb
, &f
);
410 /***********************************************************************
413 * Implementation of the 'print' command.
415 void print_value(const struct dbg_lvalue
* lvalue
, char format
, int level
)
417 struct dbg_type type
= lvalue
->type
;
418 struct dbg_lvalue lvalue_field
;
424 if (!types_get_real_type(&type
, &tag
))
426 WINE_FIXME("---error\n");
430 if (type
.id
== dbg_itype_none
)
432 /* No type, just print the addr value */
433 print_bare_address(&lvalue
->addr
);
437 if (format
== 'i' || format
== 's' || format
== 'w' || format
== 'b' || format
== 'g')
439 dbg_printf("Format specifier '%c' is meaningless in 'print' command\n", format
);
447 case SymTagPointerType
:
448 /* FIXME: this in not 100% optimal (as we're going through the typedef handling
451 print_basic(lvalue
, 1, format
);
454 if (types_get_info(&type
, TI_GET_CHILDRENCOUNT
, &count
))
456 char buffer
[sizeof(TI_FINDCHILDREN_PARAMS
) + 256 * sizeof(DWORD
)];
457 TI_FINDCHILDREN_PARAMS
* fcp
= (TI_FINDCHILDREN_PARAMS
*)buffer
;
461 struct dbg_type sub_type
;
467 fcp
->Count
= min(count
, 256);
468 if (types_get_info(&type
, TI_FINDCHILDREN
, fcp
))
470 for (i
= 0; i
< min(fcp
->Count
, count
); i
++)
473 sub_type
.module
= type
.module
;
474 sub_type
.id
= fcp
->ChildId
[i
];
475 types_get_info(&sub_type
, TI_GET_SYMNAME
, &ptr
);
477 WideCharToMultiByte(CP_ACP
, 0, ptr
, -1, tmp
, sizeof(tmp
), NULL
, NULL
);
478 dbg_printf("%s=", tmp
);
479 HeapFree(GetProcessHeap(), 0, ptr
);
480 lvalue_field
= *lvalue
;
481 if (types_get_udt_element_lvalue(&lvalue_field
, &sub_type
, &tmpbuf
))
483 print_value(&lvalue_field
, format
, level
+ 1);
485 if (i
< min(fcp
->Count
, count
) - 1 || count
> 256) dbg_printf(", ");
488 count
-= min(count
, 256);
494 case SymTagArrayType
:
496 * Loop over all of the entries, printing stuff as we go.
499 types_get_info(&type
, TI_GET_COUNT
, &count
);
500 types_get_info(&type
, TI_GET_LENGTH
, &size
);
507 * Special handling for character arrays.
509 /* FIXME should check basic type here (should be a char!!!!)... */
510 len
= min(count
, sizeof(buffer
));
511 memory_get_string(dbg_curr_process
,
512 memory_to_linear_addr(&lvalue
->addr
),
513 lvalue
->cookie
== DLV_TARGET
, TRUE
, buffer
, len
);
514 dbg_printf("\"%s%s\"", buffer
, (len
< count
) ? "..." : "");
517 lvalue_field
= *lvalue
;
518 types_get_info(&type
, TI_GET_TYPE
, &lvalue_field
.type
.id
);
520 for (i
= 0; i
< count
; i
++)
522 print_value(&lvalue_field
, format
, level
+ 1);
523 lvalue_field
.addr
.Offset
+= size
/ count
;
524 dbg_printf((i
== count
- 1) ? "}" : ", ");
527 case SymTagFunctionType
:
528 dbg_printf("Function ");
529 print_bare_address(&lvalue
->addr
);
531 types_print_type(&type
, FALSE
);
534 lvalue_field
= *lvalue
;
535 types_get_info(&lvalue
->type
, TI_GET_TYPE
, &lvalue_field
.type
.id
);
536 print_value(&lvalue_field
, format
, level
);
539 WINE_FIXME("Unknown tag (%lu)\n", tag
);
540 RaiseException(DEBUG_STATUS_INTERNAL_ERROR
, 0, 0, NULL
);
546 if (level
== 0) dbg_printf("\n");
549 static BOOL CALLBACK
print_types_cb(PSYMBOL_INFO sym
, ULONG size
, void* ctx
)
551 struct dbg_type type
;
552 type
.module
= sym
->ModBase
;
553 type
.id
= sym
->TypeIndex
;
554 dbg_printf("Mod: %08lx ID: %08lx \n", type
.module
, type
.id
);
555 types_print_type(&type
, TRUE
);
560 static BOOL CALLBACK
print_types_mod_cb(PSTR mod_name
, DWORD base
, void* ctx
)
562 return SymEnumTypes(dbg_curr_process
->handle
, base
, print_types_cb
, ctx
);
565 int print_types(void)
567 SymEnumerateModules(dbg_curr_process
->handle
, print_types_mod_cb
, NULL
);
571 int types_print_type(const struct dbg_type
* type
, BOOL details
)
576 DWORD tag
, udt
, count
;
577 struct dbg_type subtype
;
579 if (type
->id
== dbg_itype_none
|| !types_get_info(type
, TI_GET_SYMTAG
, &tag
))
581 dbg_printf("--invalid--<%lxh>--", type
->id
);
585 if (types_get_info(type
, TI_GET_SYMNAME
, &ptr
) && ptr
)
587 WideCharToMultiByte(CP_ACP
, 0, ptr
, -1, tmp
, sizeof(tmp
), NULL
, NULL
);
589 HeapFree(GetProcessHeap(), 0, ptr
);
591 else name
= "--none--";
596 if (details
) dbg_printf("Basic<%s>", name
); else dbg_printf("%s", name
);
598 case SymTagPointerType
:
599 types_get_info(type
, TI_GET_TYPE
, &subtype
.id
);
600 subtype
.module
= type
->module
;
601 types_print_type(&subtype
, FALSE
);
605 types_get_info(type
, TI_GET_UDTKIND
, &udt
);
608 case UdtStruct
: dbg_printf("struct %s", name
); break;
609 case UdtUnion
: dbg_printf("union %s", name
); break;
610 case UdtClass
: dbg_printf("class %s", name
); break;
611 default: WINE_ERR("Unsupported UDT type (%ld) for %s\n", udt
, name
); break;
614 types_get_info(type
, TI_GET_CHILDRENCOUNT
, &count
))
616 char buffer
[sizeof(TI_FINDCHILDREN_PARAMS
) + 256 * sizeof(DWORD
)];
617 TI_FINDCHILDREN_PARAMS
* fcp
= (TI_FINDCHILDREN_PARAMS
*)buffer
;
621 struct dbg_type type_elt
;
627 fcp
->Count
= min(count
, 256);
628 if (types_get_info(type
, TI_FINDCHILDREN
, fcp
))
630 for (i
= 0; i
< min(fcp
->Count
, count
); i
++)
633 type_elt
.module
= type
->module
;
634 type_elt
.id
= fcp
->ChildId
[i
];
635 types_get_info(&type_elt
, TI_GET_SYMNAME
, &ptr
);
637 WideCharToMultiByte(CP_ACP
, 0, ptr
, -1, tmp
, sizeof(tmp
), NULL
, NULL
);
638 HeapFree(GetProcessHeap(), 0, ptr
);
639 dbg_printf("%s", tmp
);
640 if (types_get_info(&type_elt
, TI_GET_TYPE
, &type_elt
.id
))
643 types_print_type(&type_elt
, details
);
645 if (i
< min(fcp
->Count
, count
) - 1 || count
> 256) dbg_printf(", ");
648 count
-= min(count
, 256);
654 case SymTagArrayType
:
655 types_get_info(type
, TI_GET_TYPE
, &subtype
.id
);
656 subtype
.module
= type
->module
;
657 types_print_type(&subtype
, details
);
658 dbg_printf(" %s[]", name
);
661 dbg_printf("enum %s", name
);
663 case SymTagFunctionType
:
664 types_get_info(type
, TI_GET_TYPE
, &subtype
.id
);
665 subtype
.module
= type
->module
;
666 types_print_type(&subtype
, FALSE
);
667 dbg_printf(" (*%s)(", name
);
668 if (types_get_info(type
, TI_GET_CHILDRENCOUNT
, &count
))
670 char buffer
[sizeof(TI_FINDCHILDREN_PARAMS
) + 256 * sizeof(DWORD
)];
671 TI_FINDCHILDREN_PARAMS
* fcp
= (TI_FINDCHILDREN_PARAMS
*)buffer
;
677 fcp
->Count
= min(count
, 256);
678 if (types_get_info(type
, TI_FINDCHILDREN
, fcp
))
680 for (i
= 0; i
< min(fcp
->Count
, count
); i
++)
682 subtype
.id
= fcp
->ChildId
[i
];
683 types_get_info(&subtype
, TI_GET_TYPE
, &subtype
.id
);
684 types_print_type(&subtype
, FALSE
);
685 if (i
< min(fcp
->Count
, count
) - 1 || count
> 256) dbg_printf(", ");
688 count
-= min(count
, 256);
698 WINE_ERR("Unknown type %lu for %s\n", tag
, name
);
705 /* helper to typecast pInfo to its expected type (_t) */
706 #define X(_t) (*((_t*)pInfo))
708 BOOL
types_get_info(const struct dbg_type
* type
, IMAGEHLP_SYMBOL_TYPE_INFO ti
, void* pInfo
)
710 if (type
->id
== dbg_itype_none
) return FALSE
;
711 if (type
->module
!= 0)
714 ret
= SymGetTypeInfo(dbg_curr_process
->handle
, type
->module
, type
->id
, ti
, pInfo
);
716 SymGetTypeInfo(dbg_curr_process
->handle
, type
->module
, type
->id
, TI_GET_SYMTAG
, &tag
) &&
717 tag
== SymTagBaseType
&&
718 SymGetTypeInfo(dbg_curr_process
->handle
, type
->module
, type
->id
, TI_GET_BASETYPE
, &bt
))
720 static const WCHAR voidW
[] = {'v','o','i','d','\0'};
721 static const WCHAR charW
[] = {'c','h','a','r','\0'};
722 static const WCHAR wcharW
[] = {'W','C','H','A','R','\0'};
723 static const WCHAR intW
[] = {'i','n','t','\0'};
724 static const WCHAR uintW
[] = {'u','n','s','i','g','n','e','d',' ','i','n','t','\0'};
725 static const WCHAR floatW
[] = {'f','l','o','a','t','\0'};
726 static const WCHAR boolW
[] = {'b','o','o','l','\0'};
727 static const WCHAR longW
[] = {'l','o','n','g',' ','i','n','t','\0'};
728 static const WCHAR ulongW
[] = {'u','n','s','i','g','n','e','d',' ','l','o','n','g',' ','i','n','t','\0'};
729 static const WCHAR complexW
[] = {'c','o','m','p','l','e','x','\0'};
730 const WCHAR
* name
= NULL
;
734 case btVoid
: name
= voidW
; break;
735 case btChar
: name
= charW
; break;
736 case btWChar
: name
= wcharW
; break;
737 case btInt
: name
= intW
; break;
738 case btUInt
: name
= uintW
; break;
739 case btFloat
: name
= floatW
; break;
740 case btBool
: name
= boolW
; break;
741 case btLong
: name
= longW
; break;
742 case btULong
: name
= ulongW
; break;
743 case btComplex
: name
= complexW
; break;
744 default: WINE_FIXME("Unsupported basic type %ld\n", bt
); return FALSE
;
746 X(WCHAR
*) = HeapAlloc(GetProcessHeap(), 0, (lstrlenW(name
) + 1) * sizeof(WCHAR
));
749 lstrcpyW(X(WCHAR
*), name
);
756 assert(type
->id
>= dbg_itype_first
);
760 case dbg_itype_unsigned_int
:
763 case TI_GET_SYMTAG
: X(DWORD
) = SymTagBaseType
; break;
764 case TI_GET_LENGTH
: X(DWORD64
) = 4; break;
765 case TI_GET_BASETYPE
: X(DWORD
) = btUInt
; break;
766 default: WINE_FIXME("unsupported %u for u-int\n", ti
); return FALSE
;
769 case dbg_itype_signed_int
:
772 case TI_GET_SYMTAG
: X(DWORD
) = SymTagBaseType
; break;
773 case TI_GET_LENGTH
: X(DWORD64
) = 4; break;
774 case TI_GET_BASETYPE
: X(DWORD
) = btInt
; break;
775 default: WINE_FIXME("unsupported %u for s-int\n", ti
); return FALSE
;
778 case dbg_itype_unsigned_short_int
:
781 case TI_GET_SYMTAG
: X(DWORD
) = SymTagBaseType
; break;
782 case TI_GET_LENGTH
: X(DWORD64
) = 2; break;
783 case TI_GET_BASETYPE
: X(DWORD
) = btUInt
; break;
784 default: WINE_FIXME("unsupported %u for u-short int\n", ti
); return FALSE
;
787 case dbg_itype_signed_short_int
:
790 case TI_GET_SYMTAG
: X(DWORD
) = SymTagBaseType
; break;
791 case TI_GET_LENGTH
: X(DWORD64
) = 2; break;
792 case TI_GET_BASETYPE
: X(DWORD
) = btInt
; break;
793 default: WINE_FIXME("unsupported %u for s-short int\n", ti
); return FALSE
;
796 case dbg_itype_unsigned_char_int
:
799 case TI_GET_SYMTAG
: X(DWORD
) = SymTagBaseType
; break;
800 case TI_GET_LENGTH
: X(DWORD64
) = 1; break;
801 case TI_GET_BASETYPE
: X(DWORD
) = btUInt
; break;
802 default: WINE_FIXME("unsupported %u for u-char int\n", ti
); return FALSE
;
805 case dbg_itype_signed_char_int
:
808 case TI_GET_SYMTAG
: X(DWORD
) = SymTagBaseType
; break;
809 case TI_GET_LENGTH
: X(DWORD64
) = 1; break;
810 case TI_GET_BASETYPE
: X(DWORD
) = btInt
; break;
811 default: WINE_FIXME("unsupported %u for s-char int\n", ti
); return FALSE
;
817 case TI_GET_SYMTAG
: X(DWORD
) = SymTagBaseType
; break;
818 case TI_GET_LENGTH
: X(DWORD64
) = 1; break;
819 case TI_GET_BASETYPE
: X(DWORD
) = btChar
; break;
820 default: WINE_FIXME("unsupported %u for char int\n", ti
); return FALSE
;
823 case dbg_itype_astring
:
826 case TI_GET_SYMTAG
: X(DWORD
) = SymTagPointerType
; break;
827 case TI_GET_LENGTH
: X(DWORD64
) = 4; break;
828 case TI_GET_TYPE
: X(DWORD
) = dbg_itype_char
; break;
829 default: WINE_FIXME("unsupported %u for a string\n", ti
); return FALSE
;
832 case dbg_itype_segptr
:
835 case TI_GET_SYMTAG
: X(DWORD
) = SymTagBaseType
; break;
836 case TI_GET_LENGTH
: X(DWORD64
) = 4; break;
837 case TI_GET_BASETYPE
: X(DWORD
) = btInt
; break;
838 default: WINE_FIXME("unsupported %u for seg-ptr\n", ti
); return FALSE
;
841 default: WINE_FIXME("unsupported type id 0x%lx\n", type
->id
);