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 /******************************************************************
33 * types_extract_as_integer
35 * Given a lvalue, try to get an integral (or pointer/address) value
38 long int types_extract_as_integer(const struct dbg_lvalue
* lvalue
)
45 if (lvalue
->type
.id
== dbg_itype_none
||
46 !types_get_info(&lvalue
->type
, TI_GET_SYMTAG
, &tag
))
47 RaiseException(DEBUG_STATUS_NOT_AN_INTEGER
, 0, 0, NULL
);
49 if (lvalue
->type
.id
== dbg_itype_segptr
)
51 return (long int)memory_to_linear_addr(&lvalue
->addr
);
57 if (!types_get_info(&lvalue
->type
, TI_GET_LENGTH
, &size
) ||
58 !types_get_info(&lvalue
->type
, TI_GET_BASETYPE
, &bt
))
60 WINE_ERR("Couldn't get information\n");
61 RaiseException(DEBUG_STATUS_INTERNAL_ERROR
, 0, 0, NULL
);
63 if (size
> sizeof(rtn
))
65 WINE_ERR("Size too large (%s)\n", wine_dbgstr_longlong(size
));
66 RaiseException(DEBUG_STATUS_NOT_AN_INTEGER
, 0, 0, NULL
);
72 if (!be_cpu
->fetch_integer(lvalue
, (unsigned)size
, TRUE
, &val
))
73 RaiseException(DEBUG_STATUS_INTERNAL_ERROR
, 0, 0, NULL
);
77 if (!be_cpu
->fetch_integer(lvalue
, (unsigned)size
, FALSE
, &val
))
78 RaiseException(DEBUG_STATUS_INTERNAL_ERROR
, 0, 0, NULL
);
79 rtn
= (DWORD
)(DWORD64
)val
;
82 RaiseException(DEBUG_STATUS_NOT_AN_INTEGER
, 0, 0, NULL
);
85 case SymTagPointerType
:
86 if (!memory_read_value(lvalue
, sizeof(void*), &rtn
))
87 RaiseException(DEBUG_STATUS_INTERNAL_ERROR
, 0, 0, NULL
);
91 assert(lvalue
->cookie
== DLV_TARGET
);
92 if (!memory_read_value(lvalue
, sizeof(rtn
), &rtn
))
93 RaiseException(DEBUG_STATUS_INTERNAL_ERROR
, 0, 0, NULL
);
96 assert(lvalue
->cookie
== DLV_TARGET
);
97 if (!memory_read_value(lvalue
, sizeof(rtn
), &rtn
))
98 RaiseException(DEBUG_STATUS_INTERNAL_ERROR
, 0, 0, NULL
);
100 case SymTagFunctionType
:
101 rtn
= (unsigned)memory_to_linear_addr(&lvalue
->addr
);
104 WINE_FIXME("Unsupported tag %lu\n", tag
);
105 RaiseException(DEBUG_STATUS_NOT_AN_INTEGER
, 0, 0, NULL
);
112 /******************************************************************
113 * types_extract_as_address
117 void types_extract_as_address(const struct dbg_lvalue
* lvalue
, ADDRESS
* addr
)
119 if (lvalue
->type
.id
== dbg_itype_segptr
&& lvalue
->type
.module
== 0)
121 *addr
= lvalue
->addr
;
125 addr
->Mode
= AddrModeFlat
;
126 addr
->Offset
= types_extract_as_integer( lvalue
);
130 /******************************************************************
134 BOOL
types_deref(const struct dbg_lvalue
* lvalue
, struct dbg_lvalue
* result
)
138 memset(result
, 0, sizeof(*result
));
139 result
->type
.id
= dbg_itype_none
;
140 result
->type
.module
= 0;
143 * Make sure that this really makes sense.
145 if (!types_get_info(&lvalue
->type
, TI_GET_SYMTAG
, &tag
) ||
146 tag
!= SymTagPointerType
||
147 !memory_read_value(lvalue
, sizeof(result
->addr
.Offset
), &result
->addr
.Offset
) ||
148 !types_get_info(&lvalue
->type
, TI_GET_TYPE
, &result
->type
.id
))
150 result
->type
.module
= lvalue
->type
.module
;
151 result
->cookie
= DLV_TARGET
;
152 /* FIXME: this is currently buggy.
153 * there is no way to tell were the deref:ed value is...
155 * x is a pointer to struct s, x being on the stack
156 * => lvalue is in debuggee, result is in debugger
157 * x is a pointer to struct s, x being optimized into a reg
158 * => lvalue is debugger, result is debuggee
159 * x is a pointer to internal variable x
160 * => lvalue is debugger, result is debuggee
161 * so we force debuggee address space, because dereferencing pointers to
162 * internal variables is very unlikely. A correct fix would be
165 result
->addr
.Mode
= AddrModeFlat
;
169 /******************************************************************
170 * types_get_udt_element_lvalue
172 * Implement a structure derefencement
174 static BOOL
types_get_udt_element_lvalue(struct dbg_lvalue
* lvalue
,
175 const struct dbg_type
* type
, long int* tmpbuf
)
177 DWORD offset
, bitoffset
;
183 types_get_info(type
, TI_GET_TYPE
, &lvalue
->type
.id
);
184 lvalue
->type
.module
= type
->module
;
185 if (!types_get_info(type
, TI_GET_OFFSET
, &offset
)) return FALSE
;
186 lvalue
->addr
.Offset
+= offset
;
188 if (types_get_info(type
, TI_GET_BITPOSITION
, &bitoffset
))
190 types_get_info(type
, TI_GET_LENGTH
, &length
);
191 /* FIXME: this test isn't sufficient, depending on start of bitfield
192 * (ie a 32 bit field can spread across 5 bytes)
194 if (length
> 8 * sizeof(*tmpbuf
)) return FALSE
;
195 lvalue
->addr
.Offset
+= bitoffset
>> 3;
197 * Bitfield operation. We have to extract the field and store
198 * it in a temporary buffer so that we get it all right.
200 if (!memory_read_value(lvalue
, sizeof(*tmpbuf
), tmpbuf
)) return FALSE
;
201 mask
= 0xffffffff << (DWORD
)length
;
202 *tmpbuf
>>= bitoffset
& 7;
205 lvalue
->cookie
= DLV_HOST
;
206 lvalue
->addr
.Offset
= (DWORD
)tmpbuf
;
209 * OK, now we have the correct part of the number.
210 * Check to see whether the basic type is signed or not, and if so,
211 * we need to sign extend the number.
213 if (types_get_info(&lvalue
->type
, TI_GET_BASETYPE
, &bt
) &&
214 bt
== btInt
&& (*tmpbuf
& (1 << ((DWORD
)length
- 1))))
221 if (!memory_read_value(lvalue
, sizeof(*tmpbuf
), tmpbuf
)) return FALSE
;
227 /******************************************************************
228 * types_udt_find_element
231 BOOL
types_udt_find_element(struct dbg_lvalue
* lvalue
, const char* name
, long int* tmpbuf
)
234 char buffer
[sizeof(TI_FINDCHILDREN_PARAMS
) + 256 * sizeof(DWORD
)];
235 TI_FINDCHILDREN_PARAMS
* fcp
= (TI_FINDCHILDREN_PARAMS
*)buffer
;
239 struct dbg_type type
;
241 if (!types_get_info(&lvalue
->type
, TI_GET_SYMTAG
, &tag
) ||
245 if (types_get_info(&lvalue
->type
, TI_GET_CHILDRENCOUNT
, &count
))
250 fcp
->Count
= min(count
, 256);
251 if (types_get_info(&lvalue
->type
, TI_FINDCHILDREN
, fcp
))
253 type
.module
= lvalue
->type
.module
;
254 for (i
= 0; i
< min(fcp
->Count
, count
); i
++)
257 type
.id
= fcp
->ChildId
[i
];
258 types_get_info(&type
, TI_GET_SYMNAME
, &ptr
);
260 WideCharToMultiByte(CP_ACP
, 0, ptr
, -1, tmp
, sizeof(tmp
), NULL
, NULL
);
261 HeapFree(GetProcessHeap(), 0, ptr
);
262 if (strcmp(tmp
, name
)) continue;
264 return types_get_udt_element_lvalue(lvalue
, &type
, tmpbuf
);
267 count
-= min(count
, 256);
274 /******************************************************************
277 * Grab an element from an array
279 BOOL
types_array_index(const struct dbg_lvalue
* lvalue
, int index
,
280 struct dbg_lvalue
* result
)
285 if (!types_get_info(&lvalue
->type
, TI_GET_SYMTAG
, &tag
))
289 case SymTagArrayType
:
290 types_get_info(&lvalue
->type
, TI_GET_COUNT
, &count
);
291 if (index
< 0 || index
>= count
) return FALSE
;
293 case SymTagPointerType
:
294 /* Contents of array share same data (addr mode, module...) */
297 * Get the base type, so we know how much to index by.
299 types_get_info(&lvalue
->type
, TI_GET_TYPE
, &result
->type
.id
);
300 types_get_info(&result
->type
, TI_GET_LENGTH
, &length
);
301 memory_read_value(lvalue
, sizeof(result
->addr
.Offset
), &result
->addr
.Offset
);
302 result
->addr
.Offset
+= index
* (DWORD
)length
;
312 unsigned long result
; /* out: the found type */
313 enum SymTagEnum tag
; /* in: the tag to look for */
316 unsigned long typeid; /* when tag is SymTagUDT */
317 const char* name
; /* when tag is SymTagPointerType */
321 static BOOL CALLBACK
types_cb(PSYMBOL_INFO sym
, ULONG size
, void* _user
)
323 struct type_find_t
* user
= (struct type_find_t
*)_user
;
325 struct dbg_type type
;
328 if (sym
->Tag
== user
->tag
)
333 if (!strcmp(user
->u
.name
, sym
->Name
))
335 user
->result
= sym
->TypeIndex
;
339 case SymTagPointerType
:
340 type
.module
= sym
->ModBase
;
341 type
.id
= sym
->TypeIndex
;
342 if (types_get_info(&type
, TI_GET_TYPE
, &type_id
) && type_id
== user
->u
.typeid)
344 user
->result
= sym
->TypeIndex
;
354 /******************************************************************
357 * Should look up in module based at linear whether (typeid*) exists
358 * Otherwise, we could create it locally
360 struct dbg_type
types_find_pointer(const struct dbg_type
* type
)
362 struct type_find_t f
;
365 f
.result
= dbg_itype_none
;
366 f
.tag
= SymTagPointerType
;
367 f
.u
.typeid = type
->id
;
368 SymEnumTypes(dbg_curr_process
->handle
, type
->module
, types_cb
, &f
);
369 ret
.module
= type
->module
;
374 /******************************************************************
377 * Should look up in the module based at linear address whether a type
378 * named 'name' and with the correct tag exists
380 struct dbg_type
types_find_type(unsigned long linear
, const char* name
, enum SymTagEnum tag
)
383 struct type_find_t f
;
386 f
.result
= dbg_itype_none
;
389 SymEnumTypes(dbg_curr_process
->handle
, linear
, types_cb
, &f
);
395 /***********************************************************************
398 * Implementation of the 'print' command.
400 void print_value(const struct dbg_lvalue
* lvalue
, char format
, int level
)
402 struct dbg_lvalue lvalue_field
;
408 if (lvalue
->type
.id
== dbg_itype_none
)
410 /* No type, just print the addr value */
411 print_bare_address(&lvalue
->addr
);
415 if (format
== 'i' || format
== 's' || format
== 'w' || format
== 'b' || format
== 'g')
417 dbg_printf("Format specifier '%c' is meaningless in 'print' command\n", format
);
421 if (!types_get_info(&lvalue
->type
, TI_GET_SYMTAG
, &tag
))
423 WINE_FIXME("---error\n");
430 case SymTagPointerType
:
431 print_basic(lvalue
, 1, format
);
434 if (types_get_info(&lvalue
->type
, TI_GET_CHILDRENCOUNT
, &count
))
436 char buffer
[sizeof(TI_FINDCHILDREN_PARAMS
) + 256 * sizeof(DWORD
)];
437 TI_FINDCHILDREN_PARAMS
* fcp
= (TI_FINDCHILDREN_PARAMS
*)buffer
;
441 struct dbg_type type
;
447 fcp
->Count
= min(count
, 256);
448 if (types_get_info(&lvalue
->type
, TI_FINDCHILDREN
, fcp
))
450 for (i
= 0; i
< min(fcp
->Count
, count
); i
++)
453 type
.module
= lvalue
->type
.module
;
454 type
.id
= fcp
->ChildId
[i
];
455 types_get_info(&type
, TI_GET_SYMNAME
, &ptr
);
457 WideCharToMultiByte(CP_ACP
, 0, ptr
, -1, tmp
, sizeof(tmp
), NULL
, NULL
);
458 dbg_printf("%s=", tmp
);
459 HeapFree(GetProcessHeap(), 0, ptr
);
460 lvalue_field
= *lvalue
;
461 if (types_get_udt_element_lvalue(&lvalue_field
, &type
, &tmpbuf
))
463 print_value(&lvalue_field
, format
, level
+ 1);
465 if (i
< min(fcp
->Count
, count
) - 1 || count
> 256) dbg_printf(", ");
468 count
-= min(count
, 256);
474 case SymTagArrayType
:
476 * Loop over all of the entries, printing stuff as we go.
479 types_get_info(&lvalue
->type
, TI_GET_COUNT
, &count
);
480 types_get_info(&lvalue
->type
, TI_GET_LENGTH
, &size
);
487 * Special handling for character arrays.
489 /* FIXME should check basic type here (should be a char!!!!)... */
490 len
= min(count
, sizeof(buffer
));
491 memory_get_string(dbg_curr_process
,
492 memory_to_linear_addr(&lvalue
->addr
),
493 lvalue
->cookie
== DLV_TARGET
, TRUE
, buffer
, len
);
494 dbg_printf("\"%s%s\"", buffer
, (len
< count
) ? "..." : "");
497 lvalue_field
= *lvalue
;
498 types_get_info(&lvalue
->type
, TI_GET_TYPE
, &lvalue_field
.type
.id
);
500 for (i
= 0; i
< count
; i
++)
502 print_value(&lvalue_field
, format
, level
+ 1);
503 lvalue_field
.addr
.Offset
+= size
/ count
;
504 dbg_printf((i
== count
- 1) ? "}" : ", ");
507 case SymTagFunctionType
:
508 dbg_printf("Function ");
509 print_bare_address(&lvalue
->addr
);
511 types_print_type(&lvalue
->type
, FALSE
);
514 WINE_FIXME("Unknown tag (%lu)\n", tag
);
515 RaiseException(DEBUG_STATUS_INTERNAL_ERROR
, 0, 0, NULL
);
521 if (level
== 0) dbg_printf("\n");
524 static BOOL CALLBACK
print_types_cb(PSYMBOL_INFO sym
, ULONG size
, void* ctx
)
526 struct dbg_type type
;
527 type
.module
= sym
->ModBase
;
528 type
.id
= sym
->TypeIndex
;
529 dbg_printf("Mod: %08lx ID: %08lx \n", type
.module
, type
.id
);
530 types_print_type(&type
, TRUE
);
535 static BOOL CALLBACK
print_types_mod_cb(PSTR mod_name
, DWORD base
, void* ctx
)
537 return SymEnumTypes(dbg_curr_process
->handle
, base
, print_types_cb
, ctx
);
540 int print_types(void)
542 SymEnumerateModules(dbg_curr_process
->handle
, print_types_mod_cb
, NULL
);
546 int types_print_type(const struct dbg_type
* type
, BOOL details
)
551 DWORD tag
, udt
, count
;
552 struct dbg_type subtype
;
554 if (type
->id
== dbg_itype_none
|| !types_get_info(type
, TI_GET_SYMTAG
, &tag
))
556 dbg_printf("--invalid--<%lxh>--", type
->id
);
560 if (types_get_info(type
, TI_GET_SYMNAME
, &ptr
) && ptr
)
562 WideCharToMultiByte(CP_ACP
, 0, ptr
, -1, tmp
, sizeof(tmp
), NULL
, NULL
);
564 HeapFree(GetProcessHeap(), 0, ptr
);
566 else name
= "--none--";
571 if (details
) dbg_printf("Basic<%s>", name
); else dbg_printf("%s", name
);
573 case SymTagPointerType
:
574 types_get_info(type
, TI_GET_TYPE
, &subtype
.id
);
575 subtype
.module
= type
->module
;
576 types_print_type(&subtype
, FALSE
);
580 types_get_info(type
, TI_GET_UDTKIND
, &udt
);
583 case UdtStruct
: dbg_printf("struct %s", name
); break;
584 case UdtUnion
: dbg_printf("union %s", name
); break;
585 case UdtClass
: dbg_printf("class %s", name
); break;
586 default: WINE_ERR("Unsupported UDT type (%ld) for %s", udt
, name
); break;
589 types_get_info(type
, TI_GET_CHILDRENCOUNT
, &count
))
591 char buffer
[sizeof(TI_FINDCHILDREN_PARAMS
) + 256 * sizeof(DWORD
)];
592 TI_FINDCHILDREN_PARAMS
* fcp
= (TI_FINDCHILDREN_PARAMS
*)buffer
;
596 struct dbg_type type_elt
;
602 fcp
->Count
= min(count
, 256);
603 if (types_get_info(type
, TI_FINDCHILDREN
, fcp
))
605 for (i
= 0; i
< min(fcp
->Count
, count
); i
++)
608 type_elt
.module
= type
->module
;
609 type_elt
.id
= fcp
->ChildId
[i
];
610 types_get_info(&type_elt
, TI_GET_SYMNAME
, &ptr
);
612 WideCharToMultiByte(CP_ACP
, 0, ptr
, -1, tmp
, sizeof(tmp
), NULL
, NULL
);
613 HeapFree(GetProcessHeap(), 0, ptr
);
614 dbg_printf("%s", tmp
);
615 if (types_get_info(&type_elt
, TI_GET_TYPE
, &type_elt
.id
))
618 types_print_type(&type_elt
, details
);
620 if (i
< min(fcp
->Count
, count
) - 1 || count
> 256) dbg_printf(", ");
623 count
-= min(count
, 256);
629 case SymTagArrayType
:
630 types_get_info(type
, TI_GET_TYPE
, &subtype
.id
);
631 subtype
.module
= type
->module
;
632 types_print_type(&subtype
, details
);
633 dbg_printf(" %s[]", name
);
636 dbg_printf("enum %s", name
);
638 case SymTagFunctionType
:
639 types_get_info(type
, TI_GET_TYPE
, &subtype
.id
);
640 subtype
.module
= type
->module
;
641 types_print_type(&subtype
, FALSE
);
642 dbg_printf(" (*%s)(", name
);
643 if (types_get_info(type
, TI_GET_CHILDRENCOUNT
, &count
))
645 char buffer
[sizeof(TI_FINDCHILDREN_PARAMS
) + 256 * sizeof(DWORD
)];
646 TI_FINDCHILDREN_PARAMS
* fcp
= (TI_FINDCHILDREN_PARAMS
*)buffer
;
652 fcp
->Count
= min(count
, 256);
653 if (types_get_info(type
, TI_FINDCHILDREN
, fcp
))
655 for (i
= 0; i
< min(fcp
->Count
, count
); i
++)
657 subtype
.id
= fcp
->ChildId
[i
];
658 types_get_info(&subtype
, TI_GET_TYPE
, &subtype
.id
);
659 types_print_type(&subtype
, FALSE
);
660 if (i
< min(fcp
->Count
, count
) - 1 || count
> 256) dbg_printf(", ");
663 count
-= min(count
, 256);
670 WINE_ERR("Unknown type %lu for %s\n", tag
, name
);
677 /* helper to typecast pInfo to its expected type (_t) */
678 #define X(_t) (*((_t*)pInfo))
680 BOOL
types_get_info(const struct dbg_type
* type
, IMAGEHLP_SYMBOL_TYPE_INFO ti
, void* pInfo
)
682 if (type
->id
== dbg_itype_none
) return FALSE
;
683 if (type
->module
!= 0)
686 ret
= SymGetTypeInfo(dbg_curr_process
->handle
, type
->module
, type
->id
, ti
, pInfo
);
688 SymGetTypeInfo(dbg_curr_process
->handle
, type
->module
, type
->id
, TI_GET_SYMTAG
, &tag
) &&
689 tag
== SymTagBaseType
&&
690 SymGetTypeInfo(dbg_curr_process
->handle
, type
->module
, type
->id
, TI_GET_BASETYPE
, &bt
))
692 static const WCHAR voidW
[] = {'v','o','i','d','\0'};
693 static const WCHAR charW
[] = {'c','h','a','r','\0'};
694 static const WCHAR wcharW
[] = {'W','C','H','A','R','\0'};
695 static const WCHAR intW
[] = {'i','n','t','\0'};
696 static const WCHAR uintW
[] = {'u','n','s','i','g','n','e','d',' ','i','n','t','\0'};
697 static const WCHAR floatW
[] = {'f','l','o','a','t','\0'};
698 static const WCHAR boolW
[] = {'b','o','o','l','\0'};
699 static const WCHAR longW
[] = {'l','o','n','g',' ','i','n','t','\0'};
700 static const WCHAR ulongW
[] = {'u','n','s','i','g','n','e','d',' ','l','o','n','g',' ','i','n','t','\0'};
701 static const WCHAR complexW
[] = {'c','o','m','p','l','e','x','\0'};
702 const WCHAR
* name
= NULL
;
706 case btVoid
: name
= voidW
; break;
707 case btChar
: name
= charW
; break;
708 case btWChar
: name
= wcharW
; break;
709 case btInt
: name
= intW
; break;
710 case btUInt
: name
= uintW
; break;
711 case btFloat
: name
= floatW
; break;
712 case btBool
: name
= boolW
; break;
713 case btLong
: name
= longW
; break;
714 case btULong
: name
= ulongW
; break;
715 case btComplex
: name
= complexW
; break;
716 default: WINE_FIXME("Unsupported basic type %ld\n", bt
); return FALSE
;
718 X(WCHAR
*) = HeapAlloc(GetProcessHeap(), 0, (lstrlenW(name
) + 1) * sizeof(WCHAR
));
721 lstrcpyW(X(WCHAR
*), name
);
728 assert(type
->id
>= dbg_itype_first
);
732 case dbg_itype_unsigned_int
:
735 case TI_GET_SYMTAG
: X(DWORD
) = SymTagBaseType
; break;
736 case TI_GET_LENGTH
: X(DWORD64
) = 4; break;
737 case TI_GET_BASETYPE
: X(DWORD
) = btUInt
; break;
738 default: WINE_FIXME("unsupported %u for u-int\n", ti
); return FALSE
;
741 case dbg_itype_signed_int
:
744 case TI_GET_SYMTAG
: X(DWORD
) = SymTagBaseType
; break;
745 case TI_GET_LENGTH
: X(DWORD64
) = 4; break;
746 case TI_GET_BASETYPE
: X(DWORD
) = btInt
; break;
747 default: WINE_FIXME("unsupported %u for s-int\n", ti
); return FALSE
;
750 case dbg_itype_unsigned_short_int
:
753 case TI_GET_SYMTAG
: X(DWORD
) = SymTagBaseType
; break;
754 case TI_GET_LENGTH
: X(DWORD64
) = 2; break;
755 case TI_GET_BASETYPE
: X(DWORD
) = btUInt
; break;
756 default: WINE_FIXME("unsupported %u for u-short int\n", ti
); return FALSE
;
759 case dbg_itype_signed_short_int
:
762 case TI_GET_SYMTAG
: X(DWORD
) = SymTagBaseType
; break;
763 case TI_GET_LENGTH
: X(DWORD64
) = 2; break;
764 case TI_GET_BASETYPE
: X(DWORD
) = btInt
; break;
765 default: WINE_FIXME("unsupported %u for s-short int\n", ti
); return FALSE
;
768 case dbg_itype_unsigned_char_int
:
771 case TI_GET_SYMTAG
: X(DWORD
) = SymTagBaseType
; break;
772 case TI_GET_LENGTH
: X(DWORD64
) = 1; break;
773 case TI_GET_BASETYPE
: X(DWORD
) = btUInt
; break;
774 default: WINE_FIXME("unsupported %u for u-char int\n", ti
); return FALSE
;
777 case dbg_itype_signed_char_int
:
780 case TI_GET_SYMTAG
: X(DWORD
) = SymTagBaseType
; break;
781 case TI_GET_LENGTH
: X(DWORD64
) = 1; break;
782 case TI_GET_BASETYPE
: X(DWORD
) = btInt
; break;
783 default: WINE_FIXME("unsupported %u for s-char int\n", ti
); return FALSE
;
789 case TI_GET_SYMTAG
: X(DWORD
) = SymTagBaseType
; break;
790 case TI_GET_LENGTH
: X(DWORD64
) = 1; break;
791 case TI_GET_BASETYPE
: X(DWORD
) = btChar
; break;
792 default: WINE_FIXME("unsupported %u for char int\n", ti
); return FALSE
;
795 case dbg_itype_astring
:
798 case TI_GET_SYMTAG
: X(DWORD
) = SymTagPointerType
; break;
799 case TI_GET_LENGTH
: X(DWORD64
) = 4; break;
800 case TI_GET_TYPE
: X(DWORD
) = dbg_itype_char
; break;
801 default: WINE_FIXME("unsupported %u for a string\n", ti
); return FALSE
;
804 case dbg_itype_segptr
:
807 case TI_GET_SYMTAG
: X(DWORD
) = SymTagBaseType
; break;
808 case TI_GET_LENGTH
: X(DWORD64
) = 4; break;
809 case TI_GET_BASETYPE
: X(DWORD
) = btInt
; break;
810 default: WINE_FIXME("unsupported %u for seg-ptr\n", ti
); return FALSE
;
813 default: WINE_FIXME("unsupported type id 0x%lx\n", type
->id
);