+2013-11-21 Cary Coutant <ccoutant@google.com>
+
+ * dwarf2out.c (want_pubnames): Don't do pubnames for -g1.
+ (add_linkage_name): Don't add linkage name for -g1.
+ (decls_for_scope): Process subblocks for -g1.
+ (dwarf2out_source_line): Output line tables for -g1.
+ (dwarf2out_finish): Likewise.
+ * tree-ssa-live.c (remove_unused_scope_block_p): Don't prune
+ unused scopes for -g1.
+ * opts.c (common_handle_option): Handle -g same as -g2.
+ * doc/invoke.texi: Update description for -g1.
+
2013-11-21 Peter Bergner <bergner@vnet.ibm.com>
* doc/extend.texi: Document htm builtins.
static inline bool
want_pubnames (void)
{
+ if (debug_info_level <= DINFO_LEVEL_TERSE)
+ return false;
if (debug_generate_pub_sections != -1)
return debug_generate_pub_sections;
return targetm.want_debug_pub_sections;
static void
add_linkage_name (dw_die_ref die, tree decl)
{
- if ((TREE_CODE (decl) == FUNCTION_DECL || TREE_CODE (decl) == VAR_DECL)
- && TREE_PUBLIC (decl)
- && !DECL_ABSTRACT (decl)
- && !(TREE_CODE (decl) == VAR_DECL && DECL_REGISTER (decl))
- && die->die_tag != DW_TAG_member)
+ if (debug_info_level > DINFO_LEVEL_TERSE
+ && (TREE_CODE (decl) == FUNCTION_DECL || TREE_CODE (decl) == VAR_DECL)
+ && TREE_PUBLIC (decl)
+ && !DECL_ABSTRACT (decl)
+ && !(TREE_CODE (decl) == VAR_DECL && DECL_REGISTER (decl))
+ && die->die_tag != DW_TAG_member)
{
/* Defer until we have an assembler name set. */
if (!DECL_ASSEMBLER_NAME_SET_P (decl))
/* Output the DIEs to represent all of the data objects and typedefs
declared directly within this block but not within any nested
sub-blocks. Also, nested function and tag DIEs have been
- generated with a parent of NULL; fix that up now. */
- for (decl = BLOCK_VARS (stmt); decl != NULL; decl = DECL_CHAIN (decl))
- process_scope_var (stmt, decl, NULL_TREE, context_die);
- for (i = 0; i < BLOCK_NUM_NONLOCALIZED_VARS (stmt); i++)
- process_scope_var (stmt, NULL, BLOCK_NONLOCALIZED_VAR (stmt, i),
- context_die);
+ generated with a parent of NULL; fix that up now. We don't
+ have to do this if we're at -g1. */
+ if (debug_info_level > DINFO_LEVEL_TERSE)
+ {
+ for (decl = BLOCK_VARS (stmt); decl != NULL; decl = DECL_CHAIN (decl))
+ process_scope_var (stmt, decl, NULL_TREE, context_die);
+ for (i = 0; i < BLOCK_NUM_NONLOCALIZED_VARS (stmt); i++)
+ process_scope_var (stmt, NULL, BLOCK_NONLOCALIZED_VAR (stmt, i),
+ context_die);
+ }
- /* If we're at -g1, we're not interested in subblocks. */
- if (debug_info_level <= DINFO_LEVEL_TERSE)
- return;
+ /* Even if we're at -g1, we need to process the subblocks in order to get
+ inlined call information. */
/* Output the DIEs to represent all sub-blocks (and the items declared
therein) of this block. */
unsigned int file_num;
dw_line_info_table *table;
- if (debug_info_level < DINFO_LEVEL_NORMAL || line == 0)
+ if (debug_info_level < DINFO_LEVEL_TERSE || line == 0)
return;
/* The discriminator column was added in dwarf4. Simplify the below
}
}
- if (debug_info_level >= DINFO_LEVEL_NORMAL)
+ if (debug_info_level >= DINFO_LEVEL_TERSE)
add_AT_lineptr (main_comp_unit_die, DW_AT_stmt_list,
debug_line_section_label);
/* Add a pointer to the line table for the main compilation unit
so that the debugger can make sense of DW_AT_decl_file
attributes. */
- if (debug_info_level >= DINFO_LEVEL_NORMAL)
+ if (debug_info_level >= DINFO_LEVEL_TERSE)
add_AT_lineptr (ctnode->root_die, DW_AT_stmt_list,
(!dwarf_split_debug_info
? debug_line_section_label