From c1b975aab92d686b87a255f9ce58ca0f439dae28 Mon Sep 17 00:00:00 2001 From: Vadim Godunko Date: Mon, 8 Jul 2024 11:37:24 +0400 Subject: [PATCH] Fix size of the tag on 32bit platforms. --- gdb/vss_pp.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gdb/vss_pp.py b/gdb/vss_pp.py index e6030ac4..fd23f14f 100644 --- a/gdb/vss_pp.py +++ b/gdb/vss_pp.py @@ -62,8 +62,10 @@ def to_string(self): if text.type == utf8static_type: # GDB is unable to resolve "storage" component of the record, - # so skip first implicit component of 8 bytes and decode. - return decode_utf8(text.bytes[8:], text["size"]) + # so skip first implicit component of System.Address and decode. + return decode_utf8( + text.bytes[gdb.lookup_type("system.address").sizeof :], text["size"] + ) elif text.type == utf8dynamic_type: data = text["pointer"].dereference()