diff options
author | Cary Coutant <ccoutant@google.com> | 2013-11-21 23:08:27 +0000 |
---|---|---|
committer | Cary Coutant <ccoutant@gcc.gnu.org> | 2013-11-21 15:08:27 -0800 |
commit | 51b83fdd47de99a9f3927890924c92a1f9c2d8be (patch) | |
tree | 73a75d65ca6bc848d6e672fd80aa39f370dac946 /gcc/opts.c | |
parent | af7d1b7d17315b450db9de5c3d20f8a24a91b39e (diff) | |
download | gcc-51b83fdd47de99a9f3927890924c92a1f9c2d8be.tar.gz |
Add minimal line tables at -g1.
2013-11-21 Cary Coutant <ccoutant@google.com>
gcc/
* 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.
gcc/testsuite/
* gcc.dg/debug/dwarf2/mlt1.c: New test.
* gcc.dg/debug/dwarf2/mlt2.c: New test.
From-SVN: r205235
Diffstat (limited to 'gcc/opts.c')
-rw-r--r-- | gcc/opts.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/gcc/opts.c b/gcc/opts.c index d282d6df507..5a9d7c81a72 100644 --- a/gcc/opts.c +++ b/gcc/opts.c @@ -1807,8 +1807,13 @@ common_handle_option (struct gcc_options *opts, break; case OPT_g: - set_debug_level (NO_DEBUG, DEFAULT_GDB_EXTENSIONS, arg, opts, opts_set, - loc); + /* -g by itself should force -g2. */ + if (*arg == '\0') + set_debug_level (NO_DEBUG, DEFAULT_GDB_EXTENSIONS, "2", opts, opts_set, + loc); + else + set_debug_level (NO_DEBUG, DEFAULT_GDB_EXTENSIONS, arg, opts, opts_set, + loc); break; case OPT_gcoff: |