aboutsummaryrefslogtreecommitdiff
path: root/gdb/python/py-value.c
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@polymtl.ca>2022-07-30 22:43:54 -0400
committerSimon Marchi <simon.marchi@polymtl.ca>2022-09-21 10:59:49 -0400
commit27710edb4e588d0360620df424dd7ee7e8cfafee (patch)
treeaf4da9f4c7e032ab6653536f2a991cbe09cee759 /gdb/python/py-value.c
parent8a50fdcefc44c40d5c4b978f19c22ddfbeb29139 (diff)
downloadbinutils-27710edb4e588d0360620df424dd7ee7e8cfafee.zip
binutils-27710edb4e588d0360620df424dd7ee7e8cfafee.tar.gz
binutils-27710edb4e588d0360620df424dd7ee7e8cfafee.tar.bz2
gdb: remove TYPE_TARGET_TYPE
Remove the macro, replace all uses by calls to type::target_type. Change-Id: Ie51d3e1e22f94130176d6abd723255282bb6d1ed
Diffstat (limited to 'gdb/python/py-value.c')
-rw-r--r--gdb/python/py-value.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/gdb/python/py-value.c b/gdb/python/py-value.c
index 3b75cda..cb3346c 100644
--- a/gdb/python/py-value.c
+++ b/gdb/python/py-value.c
@@ -422,7 +422,7 @@ valpy_get_dynamic_type (PyObject *self, void *closure)
type = check_typedef (type);
if (type->is_pointer_or_reference ()
- && (TYPE_TARGET_TYPE (type)->code () == TYPE_CODE_STRUCT))
+ && (type->target_type ()->code () == TYPE_CODE_STRUCT))
{
struct value *target;
int was_pointer = type->code () == TYPE_CODE_PTR;
@@ -525,7 +525,7 @@ valpy_lazy_string (PyObject *self, PyObject *args, PyObject *kw)
length = array_length;
else if (array_length == -1)
{
- type = lookup_array_range_type (TYPE_TARGET_TYPE (realtype),
+ type = lookup_array_range_type (realtype->target_type (),
0, length - 1);
}
else if (length != array_length)
@@ -534,7 +534,7 @@ valpy_lazy_string (PyObject *self, PyObject *args, PyObject *kw)
specified length. */
if (length > array_length)
error (_("Length is larger than array size."));
- type = lookup_array_range_type (TYPE_TARGET_TYPE (realtype),
+ type = lookup_array_range_type (realtype->target_type (),
low_bound,
low_bound + length - 1);
}
@@ -886,7 +886,7 @@ value_has_field (struct value *v, PyObject *field)
val_type = value_type (v);
val_type = check_typedef (val_type);
if (val_type->is_pointer_or_reference ())
- val_type = check_typedef (TYPE_TARGET_TYPE (val_type));
+ val_type = check_typedef (val_type->target_type ());
type_code = val_type->code ();
if ((type_code == TYPE_CODE_STRUCT || type_code == TYPE_CODE_UNION)
@@ -1274,7 +1274,7 @@ enum valpy_opcode
/* If TYPE is a reference, return the target; otherwise return TYPE. */
#define STRIP_REFERENCE(TYPE) \
- (TYPE_IS_REFERENCE (TYPE) ? (TYPE_TARGET_TYPE (TYPE)) : (TYPE))
+ (TYPE_IS_REFERENCE (TYPE) ? ((TYPE)->target_type ()) : (TYPE))
/* Helper for valpy_binop. Returns a value object which is the result
of applying the operation specified by OPCODE to the given