public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb/origin/users/ssbssa/pdb-reader-preview] PDB: array
@ 2022-04-11 17:40 Hannes Domani
  0 siblings, 0 replies; only message in thread
From: Hannes Domani @ 2022-04-11 17:40 UTC (permalink / raw)
  To: gdb-cvs

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=8b27d76d9e699f10b9f7d90b6d2cdf16e5bdf109

commit 8b27d76d9e699f10b9f7d90b6d2cdf16e5bdf109
Author: Hannes Domani <ssbssa@yahoo.de>
Date:   Mon Apr 11 17:53:50 2022 +0200

    PDB: array

Diff:
---
 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;


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-04-11 17:40 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-11 17:40 [binutils-gdb/origin/users/ssbssa/pdb-reader-preview] PDB: array Hannes Domani

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).