public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r13-6453] gcc: Adjust gdbhooks.py VecPrinter for vec layout changes [PR109006]
@ 2023-03-03 16:53 Jonathan Wakely
  0 siblings, 0 replies; only message in thread
From: Jonathan Wakely @ 2023-03-03 16:53 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:ce1c99f1ccd7b1229a4f8531d6b6de6cf571a9ef

commit r13-6453-gce1c99f1ccd7b1229a4f8531d6b6de6cf571a9ef
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Fri Mar 3 16:41:29 2023 +0000

    gcc: Adjust gdbhooks.py VecPrinter for vec layout changes [PR109006]
    
    gcc/ChangeLog:
    
            PR middle-end/109006
            * gdbhooks.py (VecPrinter): Adjust for new vec layout.

Diff:
---
 gcc/gdbhooks.py | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/gcc/gdbhooks.py b/gcc/gdbhooks.py
index c9dea9bf828..78e6c97c30d 100644
--- a/gcc/gdbhooks.py
+++ b/gcc/gdbhooks.py
@@ -461,7 +461,11 @@ class VecPrinter:
             return
         m_vecpfx = self.gdbval['m_vecpfx']
         m_num = m_vecpfx['m_num']
-        m_vecdata = self.gdbval['m_vecdata']
+        typ = self.gdbval.type
+        if typ.code == gdb.TYPE_CODE_PTR:
+            typ = typ.target()
+        typ = typ.template_argument(0) # the type T
+        m_vecdata = (self.gdbval.address + 1).cast(typ.pointer())
         for i in range(m_num):
             yield ('[%d]' % i, m_vecdata[i])

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

only message in thread, other threads:[~2023-03-03 16:53 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-03 16:53 [gcc r13-6453] gcc: Adjust gdbhooks.py VecPrinter for vec layout changes [PR109006] Jonathan Wakely

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).