summaryrefslogtreecommitdiff
path: root/gcc/dwarf2out.c
diff options
context:
space:
mode:
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>2003-03-15 17:06:24 +0000
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>2003-03-15 17:06:24 +0000
commite883780d9038f5bf6f55243a93094920762c9331 (patch)
treeb3b0dcb311f7dbbc7572f89d71648eaaefa477d8 /gcc/dwarf2out.c
parent3303eb7273401eb411486b9b383b8f4bbbb55853 (diff)
downloadgcc-e883780d9038f5bf6f55243a93094920762c9331.tar.gz
PR debug/6387
* dwarf2out.c (dwarf2out_decl): If we're at -g1, just stick nested function DIEs at toplevel. (decls_for_scope): At -g1, don't descend into subblocks. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@64410 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/dwarf2out.c')
-rw-r--r--gcc/dwarf2out.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index 6a15a3b13f8..e31fcb878d3 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -12018,6 +12018,10 @@ decls_for_scope (stmt, context_die, depth)
gen_decl_die (decl, context_die);
}
+ /* If we're at -g1, we're not interested in subblocks. */
+ if (debug_info_level <= DINFO_LEVEL_TERSE)
+ return;
+
/* Output the DIEs to represent all sub-blocks (and the items declared
therein) of this block. */
for (subblocks = BLOCK_SUBBLOCKS (stmt);
@@ -12286,7 +12290,9 @@ dwarf2out_decl (decl)
/* If we're a nested function, initially use a parent of NULL; if we're
a plain function, this will be fixed up in decls_for_scope. If
we're a method, it will be ignored, since we already have a DIE. */
- if (decl_function_context (decl))
+ if (decl_function_context (decl)
+ /* But if we're in terse mode, we don't care about scope. */
+ && debug_info_level > DINFO_LEVEL_TERSE)
context_die = NULL;
break;