aboutsummaryrefslogtreecommitdiff
path: root/gdb/dwarf2
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@efficios.com>2020-09-14 11:07:57 -0400
committerSimon Marchi <simon.marchi@efficios.com>2020-09-14 11:07:57 -0400
commitc6d940a9569deb4a89a5628caa78b1ccfcfd2bdf (patch)
treec5d25c2c2cd369f74ed393926638302e9da95c02 /gdb/dwarf2
parent653223d3561b5976d12ade101113af9d08348b8c (diff)
downloadgdb-c6d940a9569deb4a89a5628caa78b1ccfcfd2bdf.zip
gdb-c6d940a9569deb4a89a5628caa78b1ccfcfd2bdf.tar.gz
gdb-c6d940a9569deb4a89a5628caa78b1ccfcfd2bdf.tar.bz2
gdb: remove TYPE_UNSIGNED
gdb/ChangeLog: * gdbtypes.h (TYPE_UNSIGNED): Remove, replace all uses with type::is_unsigned. Change-Id: I84f76f5cd44ff7294e421d317376a9e476bc8666
Diffstat (limited to 'gdb/dwarf2')
-rw-r--r--gdb/dwarf2/expr.c6
-rw-r--r--gdb/dwarf2/loc.c2
-rw-r--r--gdb/dwarf2/read.c10
3 files changed, 9 insertions, 9 deletions
diff --git a/gdb/dwarf2/expr.c b/gdb/dwarf2/expr.c
index 9bf7413..ab511d5 100644
--- a/gdb/dwarf2/expr.c
+++ b/gdb/dwarf2/expr.c
@@ -366,7 +366,7 @@ base_types_equal_p (struct type *t1, struct type *t2)
{
if (t1->code () != t2->code ())
return 0;
- if (TYPE_UNSIGNED (t1) != TYPE_UNSIGNED (t2))
+ if (t1->is_unsigned () != t2->is_unsigned ())
return 0;
return TYPE_LENGTH (t1) == TYPE_LENGTH (t2);
}
@@ -1087,7 +1087,7 @@ dwarf_expr_context::execute_stack_op (const gdb_byte *op_ptr,
case DW_OP_shr:
dwarf_require_integral (value_type (first));
dwarf_require_integral (value_type (second));
- if (!TYPE_UNSIGNED (value_type (first)))
+ if (!value_type (first)->is_unsigned ())
{
struct type *utype
= get_unsigned_type (this->gdbarch, value_type (first));
@@ -1104,7 +1104,7 @@ dwarf_expr_context::execute_stack_op (const gdb_byte *op_ptr,
case DW_OP_shra:
dwarf_require_integral (value_type (first));
dwarf_require_integral (value_type (second));
- if (TYPE_UNSIGNED (value_type (first)))
+ if (value_type (first)->is_unsigned ())
{
struct type *stype
= get_signed_type (this->gdbarch, value_type (first));
diff --git a/gdb/dwarf2/loc.c b/gdb/dwarf2/loc.c
index a2bed9d..c18ac70 100644
--- a/gdb/dwarf2/loc.c
+++ b/gdb/dwarf2/loc.c
@@ -2603,7 +2603,7 @@ dwarf2_evaluate_property (const struct dynamic_prop *prop,
struct type *type = check_typedef (baton->property_type);
if (TYPE_LENGTH (type) < sizeof (CORE_ADDR)
- && !TYPE_UNSIGNED (type))
+ && !type->is_unsigned ())
{
/* If we have a valid return candidate and it's value
is signed, we have to sign-extend the value because
diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c
index 1219bb9..b461bd1 100644
--- a/gdb/dwarf2/read.c
+++ b/gdb/dwarf2/read.c
@@ -9499,7 +9499,7 @@ alloc_rust_variant (struct obstack *obstack, struct type *type,
part->is_unsigned
= (discriminant_index == -1
? false
- : TYPE_UNSIGNED (type->field (discriminant_index).type ()));
+ : type->field (discriminant_index).type ()->is_unsigned ());
part->variants = gdb::array_view<variant> (variants, n_variants);
void *storage = obstack_alloc (obstack, sizeof (gdb::array_view<variant_part>));
@@ -15358,7 +15358,7 @@ create_one_variant_part (variant_part &result,
{
result.discriminant_index = iter->second;
result.is_unsigned
- = TYPE_UNSIGNED (fi->fields[result.discriminant_index].field.type ());
+ = fi->fields[result.discriminant_index].field.type ()->is_unsigned ();
}
size_t n = builder.variants.size ();
@@ -18355,10 +18355,10 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu)
negative_mask =
-((ULONGEST) 1 << (TYPE_LENGTH (base_type) * TARGET_CHAR_BIT - 1));
if (low.kind () == PROP_CONST
- && !TYPE_UNSIGNED (base_type) && (low.const_val () & negative_mask))
+ && !base_type->is_unsigned () && (low.const_val () & negative_mask))
low.set_const_val (low.const_val () | negative_mask);
if (high.kind () == PROP_CONST
- && !TYPE_UNSIGNED (base_type) && (high.const_val () & negative_mask))
+ && !base_type->is_unsigned () && (high.const_val () & negative_mask))
high.set_const_val (high.const_val () | negative_mask);
/* Check for bit and byte strides. */
@@ -24087,7 +24087,7 @@ dwarf2_cu::addr_type () const
if (TYPE_LENGTH (addr_type) == addr_size)
return addr_type;
- addr_type = addr_sized_int_type (TYPE_UNSIGNED (addr_type));
+ addr_type = addr_sized_int_type (addr_type->is_unsigned ());
return addr_type;
}