public inbox for gdb-cvs@sourceware.org help / color / mirror / Atom feed
From: Simon Marchi <simark@sourceware.org> To: gdb-cvs@sourceware.org Subject: [binutils-gdb] gdb: remove TYPE_FIELD_STATIC_PHYSADDR Date: Fri, 29 Oct 2021 20:50:18 +0000 (GMT) [thread overview] Message-ID: <20211029205018.38F9F3857C6F@sourceware.org> (raw) https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=e06c3e112eefd357b2531b53d0d8e87619fceb95 commit e06c3e112eefd357b2531b53d0d8e87619fceb95 Author: Simon Marchi <simon.marchi@polymtl.ca> Date: Sun Sep 26 21:07:04 2021 -0400 gdb: remove TYPE_FIELD_STATIC_PHYSADDR Remove TYPE_FIELD_STATIC_PHYSADDR replace with type::field + field::loc_physaddr. Change-Id: Ica9bc4a48f34750ec82ec86c298d3ecece81bcbd Diff: --- gdb/ax-gdb.c | 2 +- gdb/compile/compile-cplus-types.c | 2 +- gdb/gdbtypes.c | 2 +- gdb/gdbtypes.h | 1 - gdb/value.c | 2 +- 5 files changed, 4 insertions(+), 5 deletions(-) diff --git a/gdb/ax-gdb.c b/gdb/ax-gdb.c index beeee65fe43..8e391a00ed0 100644 --- a/gdb/ax-gdb.c +++ b/gdb/ax-gdb.c @@ -1440,7 +1440,7 @@ gen_static_field (struct agent_expr *ax, struct axs_value *value, { if (type->field (fieldno).loc_kind () == FIELD_LOC_KIND_PHYSADDR) { - ax_const_l (ax, TYPE_FIELD_STATIC_PHYSADDR (type, fieldno)); + ax_const_l (ax, type->field (fieldno).loc_physaddr ()); value->kind = axs_lvalue_memory; value->type = type->field (fieldno).type (); value->optimized_out = 0; diff --git a/gdb/compile/compile-cplus-types.c b/gdb/compile/compile-cplus-types.c index 31634a9ca92..cd389c8d473 100644 --- a/gdb/compile/compile-cplus-types.c +++ b/gdb/compile/compile-cplus-types.c @@ -603,7 +603,7 @@ compile_cplus_convert_struct_or_union_members { case FIELD_LOC_KIND_PHYSADDR: { - physaddr = TYPE_FIELD_STATIC_PHYSADDR (type, i); + physaddr = type->field (i).loc_physaddr (); instance->plugin ().build_decl ("field physaddr", field_name, diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c index 9dd76920421..75214896509 100644 --- a/gdb/gdbtypes.c +++ b/gdb/gdbtypes.c @@ -5569,7 +5569,7 @@ copy_type_recursive (struct objfile *objfile, break; case FIELD_LOC_KIND_PHYSADDR: new_type->field (i).set_loc_physaddr - (TYPE_FIELD_STATIC_PHYSADDR (type, i)); + (type->field (i).loc_physaddr ()); break; case FIELD_LOC_KIND_PHYSNAME: new_type->field (i).set_loc_physname diff --git a/gdb/gdbtypes.h b/gdb/gdbtypes.h index 5a8fb741445..1f5dc657b1c 100644 --- a/gdb/gdbtypes.h +++ b/gdb/gdbtypes.h @@ -2128,7 +2128,6 @@ extern void set_type_vptr_basetype (struct type *, struct type *); #define FIELD_ARTIFICIAL(thisfld) ((thisfld).artificial) #define FIELD_BITSIZE(thisfld) ((thisfld).bitsize) -#define TYPE_FIELD_STATIC_PHYSADDR(thistype, n) ((thistype)->field (n).loc_physaddr ()) #define TYPE_FIELD_DWARF_BLOCK(thistype, n) ((thistype)->field (n).loc_dwarf_block ()) #define TYPE_FIELD_ARTIFICIAL(thistype, n) FIELD_ARTIFICIAL((thistype)->field (n)) #define TYPE_FIELD_BITSIZE(thistype, n) FIELD_BITSIZE((thistype)->field (n)) diff --git a/gdb/value.c b/gdb/value.c index 5c27a96af93..998bec321a2 100644 --- a/gdb/value.c +++ b/gdb/value.c @@ -2956,7 +2956,7 @@ value_static_field (struct type *type, int fieldno) { case FIELD_LOC_KIND_PHYSADDR: retval = value_at_lazy (type->field (fieldno).type (), - TYPE_FIELD_STATIC_PHYSADDR (type, fieldno)); + type->field (fieldno).loc_physaddr ()); break; case FIELD_LOC_KIND_PHYSNAME: {
reply other threads:[~2021-10-29 20:50 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20211029205018.38F9F3857C6F@sourceware.org \ --to=simark@sourceware.org \ --cc=gdb-cvs@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: linkBe 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; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).