diff --git a/include/abg-ir.h b/include/abg-ir.h index daeec5c3..cb9169bf 100644 --- a/include/abg-ir.h +++ b/include/abg-ir.h @@ -1832,7 +1832,7 @@ public: void set_name(const string& n); - ssize_t + size_t get_value() const; void diff --git a/src/abg-dwarf-reader.cc b/src/abg-dwarf-reader.cc index 1eda045c..89a50816 100644 --- a/src/abg-dwarf-reader.cc +++ b/src/abg-dwarf-reader.cc @@ -3956,6 +3956,7 @@ die_unsigned_constant_attribute(Dwarf_Die* die, return true; } +#if 0 /// Get the value of an attribute that is supposed to be a signed /// constant. /// @@ -3988,6 +3989,7 @@ die_signed_constant_attribute(Dwarf_Die* die, cst = result; return true; } +#endif /// Get the value of a DIE attribute; that value is meant to be a /// flag. @@ -6476,8 +6478,8 @@ build_enum_type(read_context& ctxt, string n, m; location l; die_loc_and_name(ctxt, &child, loc, n, m); - ssize_t val = 0; - die_signed_constant_attribute(&child, DW_AT_const_value, val); + size_t val = 0; + die_unsigned_constant_attribute(&child, DW_AT_const_value, val); enms.push_back(enum_type_decl::enumerator(n, val)); } while (dwarf_siblingof(&child, &child) == 0); diff --git a/src/abg-ir.cc b/src/abg-ir.cc index dedf053e..c279ad8d 100644 --- a/src/abg-ir.cc +++ b/src/abg-ir.cc @@ -8200,7 +8200,7 @@ enum_type_decl::enumerator::set_name(const string& n) /// /// @return the value of the current instance of /// enum_type_decl::enumerator. -ssize_t +size_t enum_type_decl::enumerator::get_value() const {return priv_->value_;} diff --git a/src/abg-reader.cc b/src/abg-reader.cc index 4da7f4de..3c194818 100644 --- a/src/abg-reader.cc +++ b/src/abg-reader.cc @@ -3176,7 +3176,7 @@ build_enum_type_decl(read_context& ctxt, if (xmlStrEqual(n->name, BAD_CAST("enumerator"))) { string name; - ssize_t value = 0; + size_t value = 0; xml_char_sptr a = xml::build_sptr(xmlGetProp(n, BAD_CAST("name"))); if (a) @@ -3185,7 +3185,7 @@ build_enum_type_decl(read_context& ctxt, a = xml::build_sptr(xmlGetProp(n, BAD_CAST("value"))); if (a) { - value = strtol(CHAR_STR(a), NULL, 0); + value = strtoll(CHAR_STR(a), NULL, 0); if (errno == ERANGE) return nil; } diff --git a/src/abg-writer.cc b/src/abg-writer.cc index 8d64ce58..dcece4af 100644 --- a/src/abg-writer.cc +++ b/src/abg-writer.cc @@ -1861,7 +1861,7 @@ write_enum_type_decl(const enum_type_decl_sptr decl, o << "\n"; }