From 89d90ce7d05fea7cb8790dffde9069493014df24 Mon Sep 17 00:00:00 2001 From: s22chan Date: Thu, 13 Apr 2023 13:47:55 -0400 Subject: [PATCH] DW_AT_data_member_location only stores the offset without the name now --- struct_layout.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/struct_layout.py b/struct_layout.py index 4ae7a89..93d512c 100755 --- a/struct_layout.py +++ b/struct_layout.py @@ -219,7 +219,7 @@ class DwarfMember: def __init__(self, item, types): self._types = types self._underlying_type = item['fields']['DW_AT_type'].split()[0] - self._offset = int(item['fields']['DW_AT_data_member_location'].split()[1], 0) + self._offset = int(item['fields']['DW_AT_data_member_location'], 0) if 'DW_AT_name' in item['fields']: self._name = item['fields']['DW_AT_name'] else: