From: Jim Wilson <wilson@tuliptree.org>
To: gcc-patches <gcc-patches@gcc.gnu.org>
Subject: [PATCH 06/13] remove sdb and -gcoff from non-target files
Date: Wed, 25 Oct 2017 21:48:00 -0000 [thread overview]
Message-ID: <1508967924.2379.35.camel@tuliptree.org> (raw)
In-Reply-To: <1508966659.2379.15.camel@tuliptree.org>
[-- Attachment #1: Type: text/plain, Size: 764 bytes --]
This removes the -gcoff option, and various sdb related references in
non-target files. I also poison SDB_DEBUGGING_INFO and SDB_DEBUG. I
didn't see any point in poisoning the other SDB_* macros, as no one has
used any of them in a very long time.
I noticed one odd thing from removing -gcoff, use of it or any other
unrecognized debug info type now gives an odd looking error message.
palantir:2016$ gcc -gfoo -S tmp.c
cc1: error: unrecognised debug output level ‘foo’
palantir:2017$
We probably should only emit this error when we have a number after -g,
and emit some other error when a non-number appears after -g, such as
"unrecognized debug info type 'foo'". This is a separate problem that
I haven't tried to fix here.
Jim
[-- Attachment #2: 0006-Delete-SDB-and-gcoff-from-non-target-files.txt --]
[-- Type: text/plain, Size: 7865 bytes --]
gcc/
* common.opt (gcoff): Delete.
(gxcoff+): Update Negative chain.
* defaults.h: Delete all references to SDB_DEBUGGING_INFO and
SDB_DEBUG.
* dwarf2out.c (gen_array_type_die): Change SDB to debuggers.
* flag-types.h (enum debug_info_type): Delete SDB_DEBUG.
* function.c (number_blocks): Delete SDB_DEBUGGING_INFO, SDB_DEBUG,
and SDB references.
(expand_function_start): Change sdb reference to past tense.
(expand_function_end): Change sdb reference to past tense.
* gcc.c (cpp_unique_options): Delete gcoff3 reference.
* opts.c (debug_type_names): Delete coff entry.
(common_handle_option): Delete OPT_gcoff case.
* system.h (SDB_DEBUG, SDB_DEBUGGING_INFO): Poison.
---
gcc/common.opt | 6 +-----
gcc/defaults.h | 9 +--------
gcc/dwarf2out.c | 12 ++++++------
gcc/flag-types.h | 1 -
gcc/function.c | 10 +++++-----
gcc/gcc.c | 2 +-
gcc/opts.c | 6 +-----
gcc/system.h | 3 ++-
8 files changed, 17 insertions(+), 32 deletions(-)
diff --git a/gcc/common.opt b/gcc/common.opt
index 836f05b..25e86ec 100644
--- a/gcc/common.opt
+++ b/gcc/common.opt
@@ -2868,10 +2868,6 @@ g
Common Driver RejectNegative JoinedOrMissing
Generate debug information in default format.
-gcoff
-Common Driver JoinedOrMissing Negative(gdwarf)
-Generate debug information in COFF format.
-
gcolumn-info
Common Driver Var(debug_column_info,1) Init(1)
Record DW_AT_decl_column and DW_AT_call_column in DWARF.
@@ -2937,7 +2933,7 @@ Common Driver JoinedOrMissing Negative(gxcoff+)
Generate debug information in XCOFF format.
gxcoff+
-Common Driver JoinedOrMissing Negative(gcoff)
+Common Driver JoinedOrMissing Negative(gdwarf)
Generate debug information in extended XCOFF format.
Enum
diff --git a/gcc/defaults.h b/gcc/defaults.h
index 99cd9db..768c987 100644
--- a/gcc/defaults.h
+++ b/gcc/defaults.h
@@ -894,14 +894,10 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#define DEFAULT_GDB_EXTENSIONS 1
#endif
-#ifndef SDB_DEBUGGING_INFO
-#define SDB_DEBUGGING_INFO 0
-#endif
-
/* If more than one debugging type is supported, you must define
PREFERRED_DEBUGGING_TYPE to choose the default. */
-#if 1 < (defined (DBX_DEBUGGING_INFO) + (SDB_DEBUGGING_INFO) \
+#if 1 < (defined (DBX_DEBUGGING_INFO) \
+ defined (DWARF2_DEBUGGING_INFO) + defined (XCOFF_DEBUGGING_INFO) \
+ defined (VMS_DEBUGGING_INFO))
#ifndef PREFERRED_DEBUGGING_TYPE
@@ -913,9 +909,6 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#elif defined DBX_DEBUGGING_INFO
#define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
-#elif SDB_DEBUGGING_INFO
-#define PREFERRED_DEBUGGING_TYPE SDB_DEBUG
-
#elif defined DWARF2_DEBUGGING_INFO || defined DWARF2_LINENO_DEBUGGING_INFO
#define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index 81c95ec..ab66baf 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -20938,12 +20938,12 @@ gen_array_type_die (tree type, dw_die_ref context_die)
add_AT_unsigned (array_die, DW_AT_ordering, DW_ORD_col_major);
#if 0
- /* We default the array ordering. SDB will probably do
- the right things even if DW_AT_ordering is not present. It's not even
- an issue until we start to get into multidimensional arrays anyway. If
- SDB is ever caught doing the Wrong Thing for multi-dimensional arrays,
- then we'll have to put the DW_AT_ordering attribute back in. (But if
- and when we find out that we need to put these in, we will only do so
+ /* We default the array ordering. Debuggers will probably do the right
+ things even if DW_AT_ordering is not present. It's not even an issue
+ until we start to get into multidimensional arrays anyway. If a debugger
+ is ever caught doing the Wrong Thing for multi-dimensional arrays,
+ then we'll have to put the DW_AT_ordering attribute back in. (But
+ if and when we find out that we need to put these in, we will only do so
for multidimensional arrays. */
add_AT_unsigned (array_die, DW_AT_ordering, DW_ORD_row_major);
#endif
diff --git a/gcc/flag-types.h b/gcc/flag-types.h
index 2b23029..591b744 100644
--- a/gcc/flag-types.h
+++ b/gcc/flag-types.h
@@ -24,7 +24,6 @@ enum debug_info_type
{
NO_DEBUG, /* Write no debug info. */
DBX_DEBUG, /* Write BSD .stabs for DBX (using dbxout.c). */
- SDB_DEBUG, /* Write COFF for (old) SDB (using sdbout.c). */
DWARF2_DEBUG, /* Write Dwarf v2 debug info (using dwarf2out.c). */
XCOFF_DEBUG, /* Write IBM/Xcoff debug info (using dbxout.c). */
VMS_DEBUG, /* Write VMS debug info (using vmsdbgout.c). */
diff --git a/gcc/function.c b/gcc/function.c
index 339419e..fe3d9c1 100644
--- a/gcc/function.c
+++ b/gcc/function.c
@@ -4709,11 +4709,11 @@ number_blocks (tree fn)
int n_blocks;
tree *block_vector;
- /* For SDB and XCOFF debugging output, we start numbering the blocks
+ /* For XCOFF debugging output, we start numbering the blocks
from 1 within each function, rather than keeping a running
count. */
-#if SDB_DEBUGGING_INFO || defined (XCOFF_DEBUGGING_INFO)
- if (write_symbols == SDB_DEBUG || write_symbols == XCOFF_DEBUG)
+#if defined (XCOFF_DEBUGGING_INFO)
+ if (write_symbols == XCOFF_DEBUG)
next_block_index = 1;
#endif
@@ -5248,7 +5248,7 @@ expand_function_start (tree subr)
}
/* The following was moved from init_function_start.
- The move is supposed to make sdb output more accurate. */
+ The move was supposed to make sdb output more accurate. */
/* Indicate the beginning of the function body,
as opposed to parm setup. */
emit_note (NOTE_INSN_FUNCTION_BEG);
@@ -5439,7 +5439,7 @@ expand_function_end (void)
do_pending_stack_adjust ();
/* Output a linenumber for the end of the function.
- SDB depends on this. */
+ SDB depended on this. */
set_curr_insn_location (input_location);
/* Before the return label (if any), clobber the return
diff --git a/gcc/gcc.c b/gcc/gcc.c
index cec3ed5..184f2b3 100644
--- a/gcc/gcc.c
+++ b/gcc/gcc.c
@@ -1117,7 +1117,7 @@ static const char *cpp_unique_options =
%{MMD:-MMD %{!o:%b.d}%{o*:%.d%*}}\
%{M} %{MM} %{MF*} %{MG} %{MP} %{MQ*} %{MT*}\
%{!E:%{!M:%{!MM:%{!MT:%{!MQ:%{MD|MMD:%{o*:-MQ %*}}}}}}}\
- %{remap} %{g3|ggdb3|gstabs3|gcoff3|gxcoff3|gvms3:-dD}\
+ %{remap} %{g3|ggdb3|gstabs3|gxcoff3|gvms3:-dD}\
%{!iplugindir*:%{fplugin*:%:find-plugindir()}}\
%{H} %C %{D*&U*&A*} %{i*} %Z %i\
%{E|M|MM:%W{o*}}";
diff --git a/gcc/opts.c b/gcc/opts.c
index ee95c84..ac383d4 100644
--- a/gcc/opts.c
+++ b/gcc/opts.c
@@ -37,7 +37,7 @@ static void set_Wstrict_aliasing (struct gcc_options *opts, int onoff);
/* Indexed by enum debug_info_type. */
const char *const debug_type_names[] =
{
- "none", "stabs", "coff", "dwarf-2", "xcoff", "vms"
+ "none", "stabs", "dwarf-2", "xcoff", "vms"
};
/* Parse the -femit-struct-debug-detailed option value
@@ -2351,10 +2351,6 @@ common_handle_option (struct gcc_options *opts,
loc);
break;
- case OPT_gcoff:
- set_debug_level (SDB_DEBUG, false, arg, opts, opts_set, loc);
- break;
-
case OPT_gdwarf:
if (arg && strlen (arg) != 0)
{
diff --git a/gcc/system.h b/gcc/system.h
index 01bc134..5fab605 100644
--- a/gcc/system.h
+++ b/gcc/system.h
@@ -1008,7 +1008,8 @@ extern void fancy_abort (const char *, int, const char *)
ROUND_TOWARDS_ZERO SF_SIZE DF_SIZE XF_SIZE TF_SIZE LIBGCC2_TF_CEXT \
LIBGCC2_LONG_DOUBLE_TYPE_SIZE STRUCT_VALUE \
EH_FRAME_IN_DATA_SECTION TARGET_FLT_EVAL_METHOD_NON_DEFAULT \
- JCR_SECTION_NAME TARGET_USE_JCR_SECTION
+ JCR_SECTION_NAME TARGET_USE_JCR_SECTION SDB_DEBUGGING_INFO \
+ SDB_DEBUG
/* Hooks that are no longer used. */
#pragma GCC poison LANG_HOOKS_FUNCTION_MARK LANG_HOOKS_FUNCTION_FREE \
--
2.7.4
next prev parent reply other threads:[~2017-10-25 21:45 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-25 21:28 [PATCH 00/13] Removal of SDB debug info support Jim Wilson
2017-10-25 21:30 ` [PATCH 01/13] remove sdbout.h and associated code Jim Wilson
2017-10-25 22:46 ` Jim Wilson
2017-10-25 21:31 ` [PATCH 02/13] fix sdbout.c references in xcoffout.c Jim Wilson
2017-10-25 21:36 ` [PATCH 04/13] Delete the sdbout files Jim Wilson
2017-10-25 21:36 ` [PATCH 03/13] drop TYPE_SYMTAB_POINTER Jim Wilson
2017-10-25 21:45 ` [PATCH 05/13] remove sdb/coff info from docs Jim Wilson
2017-10-25 21:48 ` Jim Wilson [this message]
2017-10-26 9:57 ` [PATCH 06/13] remove sdb and -gcoff from non-target files Richard Biener
2017-10-26 22:13 ` Jim Wilson
2017-10-27 8:46 ` Richard Biener
2017-10-29 23:12 ` Jim Wilson
2017-10-25 21:51 ` [PATCH 07/13] fix testsuite debug torture lists Jim Wilson
2017-10-25 21:52 ` [PATCH 08/13] fix dbxcoff.h Jim Wilson
2017-10-25 21:53 ` [PATCH 09/13] fix vxworks file Jim Wilson
2017-10-25 22:00 ` [PATCH 10/13] fix i386 files Jim Wilson
2017-10-25 22:00 ` [PATCH 11/13] drop sdb references in target comments copied from docs Jim Wilson
2017-10-25 22:03 ` [PATCH 12/13] fix m68k files Jim Wilson
2017-10-25 22:07 ` [PATCH 13/13] fix MIPS files Jim Wilson
2017-10-29 10:46 ` Matthew Fortune
2017-10-26 9:39 ` [PATCH 00/13] Removal of SDB debug info support Richard Biener
2017-10-26 14:07 ` Jeff Law
2017-10-30 1:41 ` Jim Wilson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1508967924.2379.35.camel@tuliptree.org \
--to=wilson@tuliptree.org \
--cc=gcc-patches@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).