This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Patch][C++/debug] SDB_DEBUG (-gcoff) vs record_builtin_type vs GAS - refresh
Danny Smith <dannysmith@clear.net.nz> writes:
> A grep for DECL_IS_BUILTIN finds the macro is always used as its name
> indicates. The only things that I could find that might suggest
> a problem with its usage in sdbout.c are these in
>
> dwarf2out.c (dwarf2out_decl):
>
> /* Don't bother trying to generate any DIEs to represent any of
> the
> normal built-in types for the language we are compiling. */
> if (DECL_IS_BUILTIN (decl))
> {
> /* OK, we need to generate one for `bool' so GDB knows what type
> comparisons have. */
> if ((get_AT_unsigned (comp_unit_die, DW_AT_language)
> == DW_LANG_C_plus_plus)
> && TREE_CODE (TREE_TYPE (decl)) == BOOLEAN_TYPE
> && ! DECL_IGNORED_P (decl))
> modified_type_die (TREE_TYPE (decl), 0, 0, NULL);
>
> return;
> }
>
> Should we make a special exception for 'bool' in sdbout.c too?
I wouldn't worry about it at this point. Or, try it and see which way
the GDB test results are better.
> and this comment in function.c (init_function_start)
> /* ... Also tell final how to output a linenum before the
> function prologue. Note linenums could be missing, e.g. when
> compiling a Java .class file. */
> if (! DECL_IS_BUILTIN (subr))
> emit_line_note (DECL_SOURCE_LOCATION (subr));
This only applies to FUNCTION_DECLs.
Patch is OK.
zw