]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
PDB: array
authorHannes Domani <ssbssa@yahoo.de>
Mon, 11 Apr 2022 15:53:50 +0000 (17:53 +0200)
committerHannes Domani <ssbssa@yahoo.de>
Mon, 11 Apr 2022 17:38:10 +0000 (19:38 +0200)
gdb/windows-nat.c

index e7930e931ef18079cedc6a458073501168b4a7b3..9a590bbab1f59b1680e9e2f1ee970014b4509e94 100644 (file)
@@ -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;