From 8b27d76d9e699f10b9f7d90b6d2cdf16e5bdf109 Mon Sep 17 00:00:00 2001 From: Hannes Domani Date: Mon, 11 Apr 2022 17:53:50 +0200 Subject: [PATCH] PDB: array --- gdb/windows-nat.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/gdb/windows-nat.c b/gdb/windows-nat.c index e7930e931ef..9a590bbab1f 100644 --- a/gdb/windows-nat.c +++ b/gdb/windows-nat.c @@ -3517,6 +3517,26 @@ static type *get_pdb_type_cached (pdb_line_info *pli, DWORD type_index) } break; } + + case SymTagArrayType: + { + DWORD tid, index_tid; + DWORD count; + if (pli->fSymGetTypeInfo (pli->p, pli->addr, type_index, + TI_GET_TYPEID, &tid) + && pli->fSymGetTypeInfo (pli->p, pli->addr, type_index, + TI_GET_ARRAYINDEXTYPEID, &index_tid) + && pli->fSymGetTypeInfo (pli->p, pli->addr, type_index, + TI_GET_COUNT, &count)) + { + type *element_type = get_pdb_type (pli, tid); + type *index_type = get_pdb_type (pli, index_tid); + type *range_type + = create_static_range_type (NULL, index_type, 0, count - 1); + return create_array_type (NULL, element_type, range_type); + } + break; + } } return ot->builtin_void; -- 2.47.2