This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA/commit] DWARF: Mark all Ada functions as prototyped.
- From: Joel Brobecker <brobecker at adacore dot com>
- To: gdb-patches at sourceware dot org
- Cc: Tom Tromey <tromey at redhat dot com>
- Date: Wed, 15 May 2013 17:19:41 +0400
- Subject: Re: [RFA/commit] DWARF: Mark all Ada functions as prototyped.
- References: <87txm6dhhm dot fsf at fleche dot redhat dot com>
Hi Tom,
> DWARF implies that this attribute is only meaningful for C. And GCC
> emits it only for C89
[...]
Indeed, upon double-checking the DWARF standard, it does seem so.
> ... 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?
I hesitated a bit before doing so, because I think that the concept
of prototyped-or-not might be language-dependent. But, in the end,
I think that language other than C are rarely going to be in the
same category as C (or so I hope!), and we can always adjust the
logic accordingly anyway.
I don't know if we have access to the CU's DW_AT_language attribute
at this point anymore, but it seems simpler to test for language_c
in any case. There is still the question of language_minimal, auto,
etc, and even maybe asm. For now, I just put them in the same bag
as non-C languages, but it's easy to adjust the patch.
I reviewed the list of languages from the DWARF 4 standard, and
noticed that we did not set the language for DW_LANG_UPC, so
I added that as a first patch.
Hence this RFA now becomes a two-patches RFA:
[dwarf]: Add DW_LANG_UPC support in set_cu_language.
[dwarf] Mark all functions as prototyped except C
Let me know what you think...
Thanks,
--
Joel