From: Joel Brobecker <brobecker@adacore.com>
To: Jan Kratochvil <jan.kratochvil@redhat.com>
Cc: gdb-patches@sourceware.org, Tobias Burnus <burnus@net-b.de>,
Ulrich Weigand <uweigand@de.ibm.com>,
Jim Blandy <jimb@red-bean.com>
Subject: Re: [patch] static_kind -> bit0, bit1 [Re: [gdb] Fortran dynamic arrays]
Date: Wed, 08 Oct 2008 03:28:00 -0000 [thread overview]
Message-ID: <20081008032731.GE3810@adacore.com> (raw)
In-Reply-To: <20081007225538.GA1206@host0.dyn.jankratochvil.net>
> No, according to ISO C99 enums with no assignments get values 0, 1, 2...
Yeah, you're right. I checked C90 as well, since I believe we're still
restricted to using C90 for GDB for now, and it says the same thing.
> Included you as a co-author of this patch. OK to apply?
That's very kind, but you really didn't need to do that. You should
get sole credit for this work, as you clearly guided me as much as
I tried to guide you.
> 2008-10-08 Jan Kratochvil <jan.kratochvil@redhat.com>
> Joel Brobecker <brobecker@adacore.com>
>
> Convert static_kind into loc_kind enum.
> * gdbtypes.h (enum field_loc_kind): New.
> (union field_location): New field dwarf_block.
> (struct field): Rename static_kind as loc_kind.
> (FIELD_STATIC_KIND): Rename to ...
> (FIELD_LOC_KIND): ... here.
> (TYPE_FIELD_STATIC_KIND): Rename to ...
> (TYPE_FIELD_LOC_KIND): ... here and use there now new FIELD_LOC_KIND.
> (TYPE_FIELD_STATIC_HAS_ADDR): Remove.
> (TYPE_FIELD_STATIC): Remove.
> (TYPE_FIELD_BITPOS): Reformat.
> (SET_FIELD_BITPOS): New.
> (FIELD_PHYSADDR): Rename to ...
> (FIELD_STATIC_PHYSADDR): ... here.
> (TYPE_FIELD_STATIC_PHYSADDR): Follow the FIELD_PHYSADDR rename.
> (SET_FIELD_PHYSADDR): Use new FIELD_LOC_KIND.
> (FIELD_PHYSNAME): Rename to ...
> (FIELD_STATIC_PHYSNAME): ... here.
> (TYPE_FIELD_STATIC_PHYSNAME): Follow the FIELD_PHYSNAME rename.
> (SET_FIELD_PHYSNAME): Use new FIELD_LOC_KIND.
> (FIELD_DWARF_BLOCK, TYPE_FIELD_DWARF_BLOCK, SET_FIELD_DWARF_BLOCK): New.
> (field_is_static): New declaration.
> * gdbtypes.c (field_is_static): New function.
> (copy_type_recursive): Update throughout.
> * amd64-tdep.c, c-typeprint.c, coffread.c, cp-valprint.c, dwarf2read.c,
> eval.c, jv-typeprint.c, jv-valprint.c, mdebugread.c, p-typeprint.c,
> p-valprint.c, valops.c, value.c, varobj.c: Update throughout.
Almost there: Pre-approved with the following nit fixed...
[in copy_type_recursive]
> + break;
> + default:
> + gdb_assert (0);
Can you change that to using an internal_error, instead? For instance,
internal_error (__FILE__, __LINE__, _("Unexpected ... kind: %d"),
TYPE_FIELD_LOC_KIND (type, i));
Something like that.
Thank you,
--
Joel
next prev parent reply other threads:[~2008-10-08 3:28 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-15 15:06 [gdb] Fortran dynamic arrays Tobias Burnus
2008-08-18 11:12 ` Joel Brobecker
2008-08-18 15:54 ` Ulrich Weigand
2008-09-07 11:59 ` [patch] static_kind -> bit0, bit1 [Re: [gdb] Fortran dynamic arrays] Jan Kratochvil
2008-09-08 15:32 ` Tom Tromey
2008-09-08 17:27 ` Jan Kratochvil
2008-09-19 22:29 ` Joel Brobecker
2008-09-26 23:04 ` Tom Tromey
2008-09-27 14:53 ` Joel Brobecker
2008-09-19 6:04 ` Joel Brobecker
2008-09-22 15:25 ` Jan Kratochvil
2008-09-24 19:15 ` Joel Brobecker
2008-09-26 5:03 ` Jan Kratochvil
2008-09-26 22:12 ` Joel Brobecker
2008-10-02 22:13 ` [patch] Fortran obsolete bounds type [Re: [patch] static_kind -> bit0, bit1] Jan Kratochvil
2008-09-26 12:52 ` [patch] static_kind -> bit0, bit1 [Re: [gdb] Fortran dynamic arrays] Daniel Jacobowitz
2008-09-26 22:15 ` Joel Brobecker
2008-09-26 22:20 ` Daniel Jacobowitz
2008-09-19 22:13 ` Joel Brobecker
2008-09-26 5:06 ` Accessor macro wrappers removal [Re: [patch] static_kind -> bit0, bit1] Jan Kratochvil
2008-09-26 12:55 ` Daniel Jacobowitz
2008-10-02 20:59 ` Jan Kratochvil
2008-10-02 21:05 ` Daniel Jacobowitz
2008-09-26 23:15 ` Tom Tromey
2008-09-26 12:58 ` [patch] static_kind -> bit0, bit1 [Re: [gdb] Fortran dynamic arrays] Daniel Jacobowitz
[not found] ` <20081006200928.GD3588@adacore.com>
2008-10-06 20:26 ` Jan Kratochvil
2008-10-07 23:22 ` type/main_type/field size [Re: [patch] static_kind -> bit0, bit1] Jan Kratochvil
2008-10-08 3:32 ` Joel Brobecker
2008-10-08 23:56 ` Tom Tromey
2008-10-04 20:28 ` [patch] static_kind -> bit0, bit1 [Re: [gdb] Fortran dynamic arrays] Jan Kratochvil
2008-10-06 20:00 ` Joel Brobecker
2008-10-07 23:18 ` Jan Kratochvil
2008-10-08 3:28 ` Joel Brobecker [this message]
2008-10-08 12:54 ` Jan Kratochvil
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=20081008032731.GE3810@adacore.com \
--to=brobecker@adacore.com \
--cc=burnus@net-b.de \
--cc=gdb-patches@sourceware.org \
--cc=jan.kratochvil@redhat.com \
--cc=jimb@red-bean.com \
--cc=uweigand@de.ibm.com \
/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