aboutsummaryrefslogtreecommitdiff
path: root/gdb/xcoffread.c
diff options
context:
space:
mode:
authorJim Kingdon <jkingdon@engr.sgi.com>1993-05-25 19:39:41 +0000
committerJim Kingdon <jkingdon@engr.sgi.com>1993-05-25 19:39:41 +0000
commitea753d03d69e2ca4f643c4960e25deca031fa6f2 (patch)
treee623193b10b7fd875d0a1c4e0f2fd05c7c0176d4 /gdb/xcoffread.c
parent2d10304ee62f153f64a7523c07628fd24ea96f52 (diff)
downloadgdb-ea753d03d69e2ca4f643c4960e25deca031fa6f2.zip
gdb-ea753d03d69e2ca4f643c4960e25deca031fa6f2.tar.gz
gdb-ea753d03d69e2ca4f643c4960e25deca031fa6f2.tar.bz2
* stabsread.c: Remove all uses of error(). Make error_type and
read_type_number static. (define_symbol): Don't try to deal with a missing symbol descriptor which isn't followed by digit, '(', or '-'. * stabsread.h: Don't declare read_type_number here. * gdbtypes.h: Don't declare error_type here. * xcoffread.c: Remove NO_TYPEDEFS code.
Diffstat (limited to 'gdb/xcoffread.c')
-rw-r--r--gdb/xcoffread.c106
1 files changed, 0 insertions, 106 deletions
diff --git a/gdb/xcoffread.c b/gdb/xcoffread.c
index d02e843..585a4f0 100644
--- a/gdb/xcoffread.c
+++ b/gdb/xcoffread.c
@@ -1597,116 +1597,10 @@ process_xcoff_symbol (cs, objfile)
case C_DECL: /* a type decleration?? */
-#if defined(NO_TYPEDEFS)
- qq = (char*) strchr (name, ':');
- if (!qq) /* skip if there is no ':' */
- return NULL;
-
- nameless = (qq == name);
-
- struct_and_type_combined = (qq[1] == 'T' && qq[2] == 't');
- pp = qq + (struct_and_type_combined ? 3 : 2);
-
-
- /* To handle GNU C++ typename abbreviation, we need to be able to fill
- in a type's name as soon as space for that type is allocated. */
-
- if (struct_and_type_combined && name != qq) {
-
- int typenums[2];
- struct type *tmp_type;
- char *tmp_pp = pp;
-
- read_type_number (&tmp_pp, typenums);
- tmp_type = dbx_alloc_type (typenums, objfile);
-
- if (tmp_type && !TYPE_NAME (tmp_type) && !nameless)
- TYPE_NAME (tmp_type) = SYMBOL_NAME (sym) =
- obsavestring (name, qq-name,
- &objfile->symbol_obstack);
- }
- ttype = SYMBOL_TYPE (sym) = read_type (&pp, objfile);
-
- /* if there is no name for this typedef, you don't have to keep its
- symbol, since nobody could ask for it. Otherwise, build a symbol
- and add it into symbol_list. */
-
- if (nameless)
- return;
-
- /* Transarc wants to eliminate type definitions from the symbol table.
- Limited debugging capabilities, but faster symbol table processing
- and less memory usage. Note that tag definitions (starting with
- 'T') will remain intact. */
-
- if (qq[1] != 'T' && (!TYPE_NAME (ttype) || *(TYPE_NAME (ttype)) == '\0')) {
-
- if (SYMBOL_NAME (sym))
- TYPE_NAME (ttype) = SYMBOL_NAME (sym);
- else
- TYPE_NAME (ttype) = obsavestring (name, qq-name);
-
- return;
- }
-
- /* read_type() will return null if type (or tag) definition was
- unnnecessarily duplicated. Also, if the symbol doesn't have a name,
- there is no need to keep it in symbol table. */
- /* The above argument no longer valid. read_type() never returns NULL. */
-
- if (!ttype)
- return NULL;
-
- /* if there is no name for this typedef, you don't have to keep its
- symbol, since nobody could ask for it. Otherwise, build a symbol
- and add it into symbol_list. */
-
- if (qq[1] == 'T')
- SYMBOL_NAMESPACE (sym) = STRUCT_NAMESPACE;
- else if (qq[1] == 't')
- SYMBOL_NAMESPACE (sym) = VAR_NAMESPACE;
- else {
- warning ("Unrecognized stab string.\n");
- return NULL;
- }
-
- SYMBOL_CLASS (sym) = LOC_TYPEDEF;
- if (!SYMBOL_NAME (sym))
- SYMBOL_NAME (sym) = obsavestring (name, qq-name);
-
- SYMBOL_DUP (sym, sym2);
- add_symbol_to_list
- (sym2, within_function ? &local_symbols : &file_symbols);
-
- /* For a combination of struct and type, add one more symbol
- for the type. */
-
- if (struct_and_type_combined) {
- SYMBOL_DUP (sym, sym2);
- SYMBOL_NAMESPACE (sym2) = VAR_NAMESPACE;
- add_symbol_to_list
- (sym2, within_function ? &local_symbols : &file_symbols);
- }
-
- /* assign a name to the type node. */
-
- if (!TYPE_NAME (ttype) || *(TYPE_NAME (ttype)) == '\0') {
- if (struct_and_type_combined)
- TYPE_NAME (ttype) = SYMBOL_NAME (sym);
- else if (qq[1] == 'T') /* struct namespace */
- TYPE_NAME (ttype) = concat (
- TYPE_CODE (ttype) == TYPE_CODE_UNION ? "union " :
- TYPE_CODE (ttype) == TYPE_CODE_STRUCT? "struct " : "enum ",
- SYMBOL_NAME (sym), NULL);
- }
- break;
-
-#else /* !NO_TYPEDEFS */
sym = define_symbol (cs->c_value, cs->c_name, 0, 0, objfile);
if (sym != NULL)
SYMBOL_SECTION (sym) = cs->c_secnum;
return sym;
-#endif
case C_GSYM:
add_stab_to_list (name, &global_stabs);