From: Simon Marchi <simon.marchi@polymtl.ca>
To: gdb-patches@sourceware.org
Subject: [PATCH 3/3] gdb: remove TYPE_DYN_PROP_ADDR
Date: Sat, 1 Aug 2020 19:59:35 -0400 [thread overview]
Message-ID: <20200801235935.1110640-4-simon.marchi@polymtl.ca> (raw)
In-Reply-To: <20200801235935.1110640-1-simon.marchi@polymtl.ca>
Remove TYPE_DYN_PROP_ADDR, replacing its uses with calling
dynamic_prop::const_val directly.
gdb/ChangeLog:
* gdbtypes.h (TYPE_DYN_PROP_ADDR): Remove, replace uses with
dynamic_prop::const_val.
Change-Id: Ie99b9cd9a0627488c1c69a75e57f020d34e392af
---
gdb/gdbtypes.c | 4 ++--
gdb/gdbtypes.h | 4 ----
2 files changed, 2 insertions(+), 6 deletions(-)
diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c
index 4b1f40ab77dc..0cd4b194d982 100644
--- a/gdb/gdbtypes.c
+++ b/gdb/gdbtypes.c
@@ -4134,7 +4134,7 @@ type_not_allocated (const struct type *type)
struct dynamic_prop *prop = TYPE_ALLOCATED_PROP (type);
return (prop != nullptr && prop->kind () == PROP_CONST
- && !TYPE_DYN_PROP_ADDR (prop));
+ && prop->const_val () != 0);
}
/* Associated status of type TYPE. Return zero if type TYPE is associated.
@@ -4146,7 +4146,7 @@ type_not_associated (const struct type *type)
struct dynamic_prop *prop = TYPE_ASSOCIATED_PROP (type);
return (prop != nullptr && prop->kind () == PROP_CONST
- && !TYPE_DYN_PROP_ADDR (prop));
+ && prop->const_val () != 0);
}
/* rank_one_type helper for when PARM's type code is TYPE_CODE_PTR. */
diff --git a/gdb/gdbtypes.h b/gdb/gdbtypes.h
index de54a5ed73b6..55a6dafb7e29 100644
--- a/gdb/gdbtypes.h
+++ b/gdb/gdbtypes.h
@@ -1635,10 +1635,6 @@ extern bool set_type_align (struct type *, ULONGEST);
#define TYPE_ASSOCIATED_PROP(thistype) \
((thistype)->dyn_prop (DYN_PROP_ASSOCIATED))
-/* Attribute accessors for dynamic properties. */
-#define TYPE_DYN_PROP_ADDR(dynprop) \
- (dynprop->const_val ())
-
/* C++ */
#define TYPE_SELF_TYPE(thistype) internal_type_self_type (thistype)
--
2.28.0
next prev parent reply other threads:[~2020-08-01 23:59 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-01 23:59 [PATCH 0/3] Remove last dynamic prop macros Simon Marchi
2020-08-01 23:59 ` [PATCH 1/3] gdb: remove TYPE_DYN_PROP_BATON Simon Marchi
2020-08-01 23:59 ` [PATCH 2/3] gdb: remove TYPE_DYN_PROP_KIND Simon Marchi
2020-08-01 23:59 ` Simon Marchi [this message]
2020-08-05 9:20 ` [PATCH 3/3] gdb: remove TYPE_DYN_PROP_ADDR Tom de Vries
2020-08-05 10:33 ` [committed][gdb] Fix prop->const_val uses in gdbtypes.c Tom de Vries
2020-08-05 12:46 ` Simon Marchi
2020-08-05 12:56 ` Tom de Vries
2020-08-04 18:06 ` [PATCH 0/3] Remove last dynamic prop macros Tom Tromey
2020-08-04 18:48 ` Simon Marchi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200801235935.1110640-4-simon.marchi@polymtl.ca \
--to=simon.marchi@polymtl.ca \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox