From: Tom Tromey <tromey@redhat.com>
To: Joel Brobecker <brobecker@adacore.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [RFA/commit] DWARF: Mark all Ada functions as prototyped.
Date: Mon, 13 May 2013 15:31:00 -0000 [thread overview]
Message-ID: <87txm6dhhm.fsf@fleche.redhat.com> (raw)
In-Reply-To: <1368440218-22309-1-git-send-email-brobecker@adacore.com> (Joel Brobecker's message of "Mon, 13 May 2013 14:16:58 +0400")
>>>>> "Joel" == Joel Brobecker <brobecker@adacore.com> writes:
Joel> This makes sure that the types of the arguments are taken into account
Joel> when performing an inferior function call, and in particular
Joel> appropriatly converted to the correct type.
DWARF implies that this attribute is only meaningful for C. And GCC
emits it only for C89 (though GCC pretends that all variants of C are
C89... oops):
static inline void
add_prototyped_attribute (dw_die_ref die, tree func_type)
{
if (get_AT_unsigned (comp_unit_die (), DW_AT_language) == DW_LANG_C89
&& prototype_p (func_type))
add_AT_flag (die, DW_AT_prototyped, 1);
}
Joel> - /* All functions in C++, Pascal and Java have prototypes. */
Joel> + /* All functions in Ada, C++, Pascal and Java have prototypes. */
Joel> attr = dwarf2_attr (die, DW_AT_prototyped, cu);
Joel> if ((attr && (DW_UNSND (attr) != 0))
Joel> + || cu->language == language_ada
Joel> || cu->language == language_cplus
Joel> || cu->language == language_java
Joel> || cu->language == language_pascal)
... so I suggest instead inverting the sense here and rewriting it to
check just for languages that are "C-like" -- DW_LANG_C89, DW_LANG_C,
DW_LANG_ObjC, DW_LANG_C99, and DW_LANG_UPC.
What do you think?
Tom
next prev parent reply other threads:[~2013-05-13 15:31 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-13 10:17 Joel Brobecker
2013-05-13 15:31 ` Tom Tromey [this message]
2013-05-15 13:19 ` Joel Brobecker
2013-05-15 13:20 ` [RFA/dwarf 1/2]: Add DW_LANG_UPC support in set_cu_language Joel Brobecker
2013-05-15 15:04 ` Tom Tromey
2013-05-16 7:40 ` Checked in: " Joel Brobecker
2013-05-15 13:20 ` [RFA/dwarf 2/2] Mark all functions as prototyped except C functions Joel Brobecker
2013-05-15 15:11 ` Tom Tromey
2013-05-16 7:38 ` Joel Brobecker
2013-05-16 8:14 ` Joel Brobecker
2013-05-16 13:22 ` Tom Tromey
2013-05-17 5:07 ` Joel Brobecker
2013-05-17 15:06 ` Tom Tromey
2013-05-20 9:48 ` Checked in: " Joel Brobecker
2013-05-16 17:52 ` Stan Shebs
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=87txm6dhhm.fsf@fleche.redhat.com \
--to=tromey@redhat.com \
--cc=brobecker@adacore.com \
--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