Eric Pouech : dbghelp/dwarf: Added support for DW_TAG_subrange_type in various places.
Alexandre Julliard
julliard at winehq.org
Tue Sep 21 15:59:04 CDT 2021
Module: wine
Branch: master
Commit: 88840187f5a197288c8f62c71045ddf78de34522
URL: https://source.winehq.org/git/wine.git/?a=commit;h=88840187f5a197288c8f62c71045ddf78de34522
Author: Eric Pouech <eric.pouech at gmail.com>
Date: Tue Sep 21 08:00:24 2021 +0200
dbghelp/dwarf: Added support for DW_TAG_subrange_type in various places.
Signed-off-by: Eric Pouech <eric.pouech at gmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/dbghelp/dwarf.c | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)
diff --git a/dlls/dbghelp/dwarf.c b/dlls/dbghelp/dwarf.c
index 2d4f13b8281..d1075caf4b8 100644
--- a/dlls/dbghelp/dwarf.c
+++ b/dlls/dbghelp/dwarf.c
@@ -1429,6 +1429,28 @@ static struct symt* dwarf2_parse_pointer_type(dwarf2_debug_info_t* di)
return di->symt;
}
+static struct symt* dwarf2_parse_subrange_type(dwarf2_debug_info_t* di)
+{
+ struct symt* ref_type;
+ struct attribute name;
+ struct attribute dummy;
+
+ if (di->symt) return di->symt;
+
+ TRACE("%s\n", dwarf2_debug_di(di));
+
+ if (dwarf2_find_attribute(di, DW_AT_name, &name)) FIXME("Found name for subrange %s\n", name.u.string);
+ if (dwarf2_find_attribute(di, DW_AT_byte_size, &dummy)) FIXME("Found byte_size %lu\n", dummy.u.uvalue);
+ if (dwarf2_find_attribute(di, DW_AT_bit_size, &dummy)) FIXME("Found bit_size %lu\n", dummy.u.uvalue);
+ /* for now, we don't support the byte_size nor bit_size about the subrange, and pretend the two
+ * types are the same (FIXME)
+ */
+ ref_type = dwarf2_lookup_type(di);
+ di->symt = ref_type;
+ if (dwarf2_get_di_children(di)) FIXME("Unsupported children\n");
+ return di->symt;
+}
+
static struct symt* dwarf2_parse_array_type(dwarf2_debug_info_t* di)
{
struct symt* ref_type;
@@ -1682,6 +1704,9 @@ static struct symt* dwarf2_parse_udt_type(dwarf2_debug_info_t* di,
case DW_TAG_const_type:
dwarf2_parse_const_type(child);
break;
+ case DW_TAG_subrange_type:
+ dwarf2_parse_subrange_type(child);
+ break;
case DW_TAG_structure_type:
case DW_TAG_class_type:
case DW_TAG_union_type:
@@ -2336,6 +2361,9 @@ static void dwarf2_load_one_entry(dwarf2_debug_info_t* di)
case DW_TAG_namespace:
dwarf2_parse_namespace(di);
break;
+ case DW_TAG_subrange_type:
+ dwarf2_parse_subrange_type(di);
+ break;
/* silence a couple of C++ defines */
case DW_TAG_imported_module:
case DW_TAG_imported_declaration:
More information about the wine-cvs
mailing list