Commit a996cbd4 by Kaveh R. Ghazi Committed by Kaveh Ghazi

dbxout.c (lastfile, [...]): Constify a char*.

	* dbxout.c (lastfile, cwd, dbxout_type_method_1,
	dbxout_symbol_location, dbxout_symbol_name, dbxout_init,
	dbxout_start_new_source_file, dbxout_source_file,
	dbxout_source_line, dbxout_finish, dbxout_type_fields,
	dbxout_type_methods, dbxout_symbol, dbxout_prepare_symbol):
	Constify a char*.
	(dbxout_types, dbxout_args, dbxout_symbol): Delete prototypes.
	(dbxout_symbol): Mark parameter `local' with ATTRIBUTE_UNUSED.
	(dbxout_block): Initialize variable `blocknum'.

	* dbxout.h (dbxout_init, dbxout_finish,
	dbxout_start_new_source_file, dbxout_source_file, dbxout_types,
	dbxout_args, dbxout_source_line): Constify a char*.

	* dwarfout.c (dwarf_tag_name, dwarf_attr_name,
	dwarf_stack_op_name, dwarf_typemod_name, dwarf_fmt_byte_name,
	dwarf_fund_type_name, name_attribute, stmt_list_attribute,
	low_pc_attribute, high_pc_attribute, body_begin_attribute,
	body_end_attribute, comp_dir_attribute, sf_names_attribute,
	src_info_attribute, mac_info_attribute, producer_attribute,
	lookup_filename, generate_macinfo_entry, fundamental_type_code,
	dwarfout_line, dwarfout_start_new_source_file, dwarfout_define,
	dwarfout_undef): Constify a char*.
	(add_incomplete_type, retry_incomplete_types): Add prototypes.

	* dwarfout.h (dwarfout_define, dwarfout_undef,
	dwarfout_start_new_source_file, dwarfout_line): Constify a char*.

From-SVN: r30173
parent ea09f032
Mon Oct 25 22:49:34 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* dbxout.c (lastfile, cwd, dbxout_type_method_1,
dbxout_symbol_location, dbxout_symbol_name, dbxout_init,
dbxout_start_new_source_file, dbxout_source_file,
dbxout_source_line, dbxout_finish, dbxout_type_fields,
dbxout_type_methods, dbxout_symbol, dbxout_prepare_symbol):
Constify a char*.
(dbxout_types, dbxout_args, dbxout_symbol): Delete prototypes.
(dbxout_symbol): Mark parameter `local' with ATTRIBUTE_UNUSED.
(dbxout_block): Initialize variable `blocknum'.
* dbxout.h (dbxout_init, dbxout_finish,
dbxout_start_new_source_file, dbxout_source_file, dbxout_types,
dbxout_args, dbxout_source_line): Constify a char*.
* dwarfout.c (dwarf_tag_name, dwarf_attr_name,
dwarf_stack_op_name, dwarf_typemod_name, dwarf_fmt_byte_name,
dwarf_fund_type_name, name_attribute, stmt_list_attribute,
low_pc_attribute, high_pc_attribute, body_begin_attribute,
body_end_attribute, comp_dir_attribute, sf_names_attribute,
src_info_attribute, mac_info_attribute, producer_attribute,
lookup_filename, generate_macinfo_entry, fundamental_type_code,
dwarfout_line, dwarfout_start_new_source_file, dwarfout_define,
dwarfout_undef): Constify a char*.
(add_incomplete_type, retry_incomplete_types): Add prototypes.
* dwarfout.h (dwarfout_define, dwarfout_undef,
dwarfout_start_new_source_file, dwarfout_line): Constify a char*.
1999-10-25 Gavin Romig-Koch <gavin@cygnus.com> 1999-10-25 Gavin Romig-Koch <gavin@cygnus.com>
* config/mips/mips.h (MIPS_ISA_DEFAULT): Insure it's defined. * config/mips/mips.h (MIPS_ISA_DEFAULT): Insure it's defined.
......
...@@ -207,11 +207,11 @@ static FILE *asmfile; ...@@ -207,11 +207,11 @@ static FILE *asmfile;
/* Last source file name mentioned in a NOTE insn. */ /* Last source file name mentioned in a NOTE insn. */
static char *lastfile; static const char *lastfile;
/* Current working directory. */ /* Current working directory. */
static char *cwd; static const char *cwd;
enum typestatus {TYPE_UNSEEN, TYPE_XREF, TYPE_DEFINED}; enum typestatus {TYPE_UNSEEN, TYPE_XREF, TYPE_DEFINED};
...@@ -318,10 +318,6 @@ static int current_sym_nchars; ...@@ -318,10 +318,6 @@ static int current_sym_nchars;
#define CONTIN #define CONTIN
#endif #endif
void dbxout_types ();
void dbxout_args ();
void dbxout_symbol ();
#if defined(ASM_OUTPUT_SECTION_NAME) #if defined(ASM_OUTPUT_SECTION_NAME)
static void dbxout_function_end PROTO((void)); static void dbxout_function_end PROTO((void));
#endif #endif
...@@ -331,15 +327,15 @@ static void dbxout_type_index PROTO((tree)); ...@@ -331,15 +327,15 @@ static void dbxout_type_index PROTO((tree));
static void dbxout_continue PROTO((void)); static void dbxout_continue PROTO((void));
#endif #endif
static void dbxout_type_fields PROTO((tree)); static void dbxout_type_fields PROTO((tree));
static void dbxout_type_method_1 PROTO((tree, char *)); static void dbxout_type_method_1 PROTO((tree, const char *));
static void dbxout_type_methods PROTO((tree)); static void dbxout_type_methods PROTO((tree));
static void dbxout_range_type PROTO((tree)); static void dbxout_range_type PROTO((tree));
static void dbxout_type PROTO((tree, int, int)); static void dbxout_type PROTO((tree, int, int));
static void print_int_cst_octal PROTO((tree)); static void print_int_cst_octal PROTO((tree));
static void print_octal PROTO((unsigned HOST_WIDE_INT, int)); static void print_octal PROTO((unsigned HOST_WIDE_INT, int));
static void dbxout_type_name PROTO((tree)); static void dbxout_type_name PROTO((tree));
static void dbxout_symbol_location PROTO((tree, tree, char *, rtx)); static void dbxout_symbol_location PROTO((tree, tree, const char *, rtx));
static void dbxout_symbol_name PROTO((tree, char *, int)); static void dbxout_symbol_name PROTO((tree, const char *, int));
static void dbxout_prepare_symbol PROTO((tree)); static void dbxout_prepare_symbol PROTO((tree));
static void dbxout_finish_symbol PROTO((tree)); static void dbxout_finish_symbol PROTO((tree));
static void dbxout_block PROTO((tree, int, tree)); static void dbxout_block PROTO((tree, int, tree));
...@@ -374,7 +370,7 @@ dbxout_function_end () ...@@ -374,7 +370,7 @@ dbxout_function_end ()
void void
dbxout_init (asm_file, input_file_name, syms) dbxout_init (asm_file, input_file_name, syms)
FILE *asm_file; FILE *asm_file;
char *input_file_name; const char *input_file_name;
tree syms; tree syms;
{ {
char ltext_label_name[100]; char ltext_label_name[100];
...@@ -495,7 +491,7 @@ dbxout_typedefs (syms) ...@@ -495,7 +491,7 @@ dbxout_typedefs (syms)
void void
dbxout_start_new_source_file (filename) dbxout_start_new_source_file (filename)
char *filename ATTRIBUTE_UNUSED; const char *filename ATTRIBUTE_UNUSED;
{ {
#ifdef DBX_USE_BINCL #ifdef DBX_USE_BINCL
struct dbx_file *n = (struct dbx_file *) xmalloc (sizeof *n); struct dbx_file *n = (struct dbx_file *) xmalloc (sizeof *n);
...@@ -530,7 +526,7 @@ dbxout_resume_previous_source_file () ...@@ -530,7 +526,7 @@ dbxout_resume_previous_source_file ()
void void
dbxout_source_file (file, filename) dbxout_source_file (file, filename)
FILE *file; FILE *file;
char *filename; const char *filename;
{ {
char ltext_label_name[100]; char ltext_label_name[100];
...@@ -562,7 +558,7 @@ dbxout_source_file (file, filename) ...@@ -562,7 +558,7 @@ dbxout_source_file (file, filename)
void void
dbxout_source_line (file, filename, lineno) dbxout_source_line (file, filename, lineno)
FILE *file; FILE *file;
char *filename; const char *filename;
int lineno; int lineno;
{ {
dbxout_source_file (file, filename); dbxout_source_file (file, filename);
...@@ -581,7 +577,7 @@ dbxout_source_line (file, filename, lineno) ...@@ -581,7 +577,7 @@ dbxout_source_line (file, filename, lineno)
void void
dbxout_finish (file, filename) dbxout_finish (file, filename)
FILE *file ATTRIBUTE_UNUSED; FILE *file ATTRIBUTE_UNUSED;
char *filename ATTRIBUTE_UNUSED; const char *filename ATTRIBUTE_UNUSED;
{ {
#ifdef DBX_OUTPUT_MAIN_SOURCE_FILE_END #ifdef DBX_OUTPUT_MAIN_SOURCE_FILE_END
DBX_OUTPUT_MAIN_SOURCE_FILE_END (file, filename); DBX_OUTPUT_MAIN_SOURCE_FILE_END (file, filename);
...@@ -709,7 +705,8 @@ dbxout_type_fields (type) ...@@ -709,7 +705,8 @@ dbxout_type_fields (type)
{ {
if (TREE_STATIC (tem) && use_gnu_debug_info_extensions) if (TREE_STATIC (tem) && use_gnu_debug_info_extensions)
{ {
char *name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (tem)); const char *name =
IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (tem));
have_used_extensions = 1; have_used_extensions = 1;
fprintf (asmfile, ":%s;", name); fprintf (asmfile, ":%s;", name);
CHARS (strlen (name)); CHARS (strlen (name));
...@@ -743,7 +740,7 @@ dbxout_type_fields (type) ...@@ -743,7 +740,7 @@ dbxout_type_fields (type)
static void static void
dbxout_type_method_1 (decl, debug_name) dbxout_type_method_1 (decl, debug_name)
tree decl; tree decl;
char *debug_name; const char *debug_name;
{ {
char c1 = 'A', c2; char c1 = 'A', c2;
...@@ -807,7 +804,7 @@ dbxout_type_methods (type) ...@@ -807,7 +804,7 @@ dbxout_type_methods (type)
the class names, constructor names, and encodings for assembler the class names, constructor names, and encodings for assembler
label names. For now, disable output of dbx info for them. */ label names. For now, disable output of dbx info for them. */
{ {
char *ptr = IDENTIFIER_POINTER (type_encoding); const char *ptr = IDENTIFIER_POINTER (type_encoding);
/* This should use index. (mrs) */ /* This should use index. (mrs) */
while (*ptr && *ptr != '<') ptr++; while (*ptr && *ptr != '<') ptr++;
if (*ptr != 0) if (*ptr != 0)
...@@ -847,7 +844,8 @@ dbxout_type_methods (type) ...@@ -847,7 +844,8 @@ dbxout_type_methods (type)
{ {
/* This is the "mangled" name of the method. /* This is the "mangled" name of the method.
It encodes the argument types. */ It encodes the argument types. */
char *debug_name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (fndecl)); const char *debug_name =
IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (fndecl));
int show_arg_types = 0; int show_arg_types = 0;
CONTIN; CONTIN;
...@@ -880,8 +878,9 @@ dbxout_type_methods (type) ...@@ -880,8 +878,9 @@ dbxout_type_methods (type)
debug_name += IDENTIFIER_LENGTH (name); debug_name += IDENTIFIER_LENGTH (name);
if (debug_name[0] == '_' && debug_name[1] == '_') if (debug_name[0] == '_' && debug_name[1] == '_')
{ {
char *method_name = debug_name + 2; const char *method_name = debug_name + 2;
char *length_ptr = formatted_type_identifier_length; const char *length_ptr =
formatted_type_identifier_length;
/* Get past const and volatile qualifiers. */ /* Get past const and volatile qualifiers. */
while (*method_name == 'C' || *method_name == 'V') while (*method_name == 'C' || *method_name == 'V')
method_name++; method_name++;
...@@ -898,8 +897,8 @@ dbxout_type_methods (type) ...@@ -898,8 +897,8 @@ dbxout_type_methods (type)
/* Detect constructors by their style of name mangling. */ /* Detect constructors by their style of name mangling. */
else if (debug_name[0] == '_' && debug_name[1] == '_') else if (debug_name[0] == '_' && debug_name[1] == '_')
{ {
char *ctor_name = debug_name + 2; const char *ctor_name = debug_name + 2;
char *length_ptr = formatted_type_identifier_length; const char *length_ptr = formatted_type_identifier_length;
while (*ctor_name == 'C' || *ctor_name == 'V') while (*ctor_name == 'C' || *ctor_name == 'V')
ctor_name++; ctor_name++;
/* Skip digits for length of type_encoding. */ /* Skip digits for length of type_encoding. */
...@@ -1674,7 +1673,7 @@ dbxout_type_name (type) ...@@ -1674,7 +1673,7 @@ dbxout_type_name (type)
void void
dbxout_symbol (decl, local) dbxout_symbol (decl, local)
tree decl; tree decl;
int local; int local ATTRIBUTE_UNUSED;
{ {
tree type = TREE_TYPE (decl); tree type = TREE_TYPE (decl);
tree context = NULL_TREE; tree context = NULL_TREE;
...@@ -1909,7 +1908,7 @@ dbxout_symbol (decl, local) ...@@ -1909,7 +1908,7 @@ dbxout_symbol (decl, local)
if (TREE_PUBLIC (decl) == 0) if (TREE_PUBLIC (decl) == 0)
{ {
/* The sun4 assembler does not grok this. */ /* The sun4 assembler does not grok this. */
char *name = IDENTIFIER_POINTER (DECL_NAME (decl)); const char *name = IDENTIFIER_POINTER (DECL_NAME (decl));
if (TREE_CODE (TREE_TYPE (decl)) == INTEGER_TYPE if (TREE_CODE (TREE_TYPE (decl)) == INTEGER_TYPE
|| TREE_CODE (TREE_TYPE (decl)) == ENUMERAL_TYPE) || TREE_CODE (TREE_TYPE (decl)) == ENUMERAL_TYPE)
{ {
...@@ -1955,7 +1954,7 @@ dbxout_symbol (decl, local) ...@@ -1955,7 +1954,7 @@ dbxout_symbol (decl, local)
static void static void
dbxout_symbol_location (decl, type, suffix, home) dbxout_symbol_location (decl, type, suffix, home)
tree decl, type; tree decl, type;
char *suffix; const char *suffix;
rtx home; rtx home;
{ {
int letter = 0; int letter = 0;
...@@ -2170,14 +2169,14 @@ dbxout_symbol_location (decl, type, suffix, home) ...@@ -2170,14 +2169,14 @@ dbxout_symbol_location (decl, type, suffix, home)
static void static void
dbxout_symbol_name (decl, suffix, letter) dbxout_symbol_name (decl, suffix, letter)
tree decl; tree decl;
char *suffix; const char *suffix;
int letter; int letter;
{ {
/* One slight hitch: if this is a VAR_DECL which is a static /* One slight hitch: if this is a VAR_DECL which is a static
class member, we must put out the mangled name instead of the class member, we must put out the mangled name instead of the
DECL_NAME. Note also that static member (variable) names DO NOT begin DECL_NAME. Note also that static member (variable) names DO NOT begin
with underscores in .stabs directives. */ with underscores in .stabs directives. */
char *name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl)); const char *name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl));
if (name == 0) if (name == 0)
name = "(anon)"; name = "(anon)";
fprintf (asmfile, "%s \"%s%s:", ASM_STABS_OP, name, fprintf (asmfile, "%s \"%s%s:", ASM_STABS_OP, name,
...@@ -2191,7 +2190,7 @@ dbxout_prepare_symbol (decl) ...@@ -2191,7 +2190,7 @@ dbxout_prepare_symbol (decl)
tree decl ATTRIBUTE_UNUSED; tree decl ATTRIBUTE_UNUSED;
{ {
#ifdef WINNING_GDB #ifdef WINNING_GDB
char *filename = DECL_SOURCE_FILE (decl); const char *filename = DECL_SOURCE_FILE (decl);
dbxout_source_file (asmfile, filename); dbxout_source_file (asmfile, filename);
#endif #endif
...@@ -2570,7 +2569,7 @@ dbxout_block (block, depth, args) ...@@ -2570,7 +2569,7 @@ dbxout_block (block, depth, args)
int depth; int depth;
tree args; tree args;
{ {
int blocknum; int blocknum = -1;
while (block) while (block)
{ {
......
...@@ -18,16 +18,19 @@ along with GNU CC; see the file COPYING. If not, write to ...@@ -18,16 +18,19 @@ along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330, the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */ Boston, MA 02111-1307, USA. */
extern void dbxout_init PROTO ((FILE *, char *, tree)); extern void dbxout_init PROTO ((FILE *, const char *, tree));
extern void dbxout_finish PROTO ((FILE *, char *)); extern void dbxout_finish PROTO ((FILE *, const char *));
extern void dbxout_start_new_source_file PROTO ((char *)); extern void dbxout_start_new_source_file PROTO ((const char *));
extern void dbxout_resume_previous_source_file PROTO ((void)); extern void dbxout_resume_previous_source_file PROTO ((void));
extern void dbxout_source_file PROTO ((FILE *, const char *));
extern void dbxout_types PROTO ((tree));
extern void dbxout_args PROTO ((tree));
extern void dbxout_symbol PROTO ((tree, int)); extern void dbxout_symbol PROTO ((tree, int));
extern void dbxout_parms PROTO ((tree)); extern void dbxout_parms PROTO ((tree));
extern void dbxout_reg_parms PROTO ((tree)); extern void dbxout_reg_parms PROTO ((tree));
extern void dbxout_syms PROTO ((tree)); extern void dbxout_syms PROTO ((tree));
extern void dbxout_function PROTO ((tree)); extern void dbxout_function PROTO ((tree));
extern void dbxout_source_line PROTO ((FILE *, char*, int)); extern void dbxout_source_line PROTO ((FILE *, const char *, int));
extern void dbxout_begin_function PROTO ((tree)); extern void dbxout_begin_function PROTO ((tree));
...@@ -314,12 +314,12 @@ static int in_class; ...@@ -314,12 +314,12 @@ static int in_class;
/* Forward declarations for functions defined in this file. */ /* Forward declarations for functions defined in this file. */
static char *dwarf_tag_name PROTO((unsigned)); static const char *dwarf_tag_name PROTO((unsigned));
static char *dwarf_attr_name PROTO((unsigned)); static const char *dwarf_attr_name PROTO((unsigned));
static char *dwarf_stack_op_name PROTO((unsigned)); static const char *dwarf_stack_op_name PROTO((unsigned));
static char *dwarf_typemod_name PROTO((unsigned)); static const char *dwarf_typemod_name PROTO((unsigned));
static char *dwarf_fmt_byte_name PROTO((unsigned)); static const char *dwarf_fmt_byte_name PROTO((unsigned));
static char *dwarf_fund_type_name PROTO((unsigned)); static const char *dwarf_fund_type_name PROTO((unsigned));
static tree decl_ultimate_origin PROTO((tree)); static tree decl_ultimate_origin PROTO((tree));
static tree block_ultimate_origin PROTO((tree)); static tree block_ultimate_origin PROTO((tree));
static tree decl_class_context PROTO((tree)); static tree decl_class_context PROTO((tree));
...@@ -351,7 +351,7 @@ static void location_attribute PROTO((rtx)); ...@@ -351,7 +351,7 @@ static void location_attribute PROTO((rtx));
static void data_member_location_attribute PROTO((tree)); static void data_member_location_attribute PROTO((tree));
static void const_value_attribute PROTO((rtx)); static void const_value_attribute PROTO((rtx));
static void location_or_const_value_attribute PROTO((tree)); static void location_or_const_value_attribute PROTO((tree));
static inline void name_attribute PROTO((char *)); static inline void name_attribute PROTO((const char *));
static inline void fund_type_attribute PROTO((unsigned)); static inline void fund_type_attribute PROTO((unsigned));
static void mod_fund_type_attribute PROTO((tree, int, int)); static void mod_fund_type_attribute PROTO((tree, int, int));
static inline void user_def_type_attribute PROTO((tree)); static inline void user_def_type_attribute PROTO((tree));
...@@ -364,22 +364,22 @@ static void byte_size_attribute PROTO((tree)); ...@@ -364,22 +364,22 @@ static void byte_size_attribute PROTO((tree));
static inline void bit_offset_attribute PROTO((tree)); static inline void bit_offset_attribute PROTO((tree));
static inline void bit_size_attribute PROTO((tree)); static inline void bit_size_attribute PROTO((tree));
static inline void element_list_attribute PROTO((tree)); static inline void element_list_attribute PROTO((tree));
static inline void stmt_list_attribute PROTO((char *)); static inline void stmt_list_attribute PROTO((const char *));
static inline void low_pc_attribute PROTO((char *)); static inline void low_pc_attribute PROTO((const char *));
static inline void high_pc_attribute PROTO((char *)); static inline void high_pc_attribute PROTO((const char *));
static inline void body_begin_attribute PROTO((char *)); static inline void body_begin_attribute PROTO((const char *));
static inline void body_end_attribute PROTO((char *)); static inline void body_end_attribute PROTO((const char *));
static inline void language_attribute PROTO((unsigned)); static inline void language_attribute PROTO((unsigned));
static inline void member_attribute PROTO((tree)); static inline void member_attribute PROTO((tree));
#if 0 #if 0
static inline void string_length_attribute PROTO((tree)); static inline void string_length_attribute PROTO((tree));
#endif #endif
static inline void comp_dir_attribute PROTO((char *)); static inline void comp_dir_attribute PROTO((const char *));
static inline void sf_names_attribute PROTO((char *)); static inline void sf_names_attribute PROTO((const char *));
static inline void src_info_attribute PROTO((char *)); static inline void src_info_attribute PROTO((const char *));
static inline void mac_info_attribute PROTO((char *)); static inline void mac_info_attribute PROTO((const char *));
static inline void prototyped_attribute PROTO((tree)); static inline void prototyped_attribute PROTO((tree));
static inline void producer_attribute PROTO((char *)); static inline void producer_attribute PROTO((const char *));
static inline void inline_attribute PROTO((tree)); static inline void inline_attribute PROTO((tree));
static inline void containing_type_attribute PROTO((tree)); static inline void containing_type_attribute PROTO((tree));
static inline void abstract_origin_attribute PROTO((tree)); static inline void abstract_origin_attribute PROTO((tree));
...@@ -439,13 +439,15 @@ static void output_decls_for_scope PROTO((tree, int)); ...@@ -439,13 +439,15 @@ static void output_decls_for_scope PROTO((tree, int));
static void output_decl PROTO((tree, tree)); static void output_decl PROTO((tree, tree));
static void shuffle_filename_entry PROTO((filename_entry *)); static void shuffle_filename_entry PROTO((filename_entry *));
static void generate_new_sfname_entry PROTO((void)); static void generate_new_sfname_entry PROTO((void));
static unsigned lookup_filename PROTO((char *)); static unsigned lookup_filename PROTO((const char *));
static void generate_srcinfo_entry PROTO((unsigned, unsigned)); static void generate_srcinfo_entry PROTO((unsigned, unsigned));
static void generate_macinfo_entry PROTO((char *, char *)); static void generate_macinfo_entry PROTO((const char *, const char *));
static int is_pseudo_reg PROTO((rtx)); static int is_pseudo_reg PROTO((rtx));
static tree type_main_variant PROTO((tree)); static tree type_main_variant PROTO((tree));
static int is_tagged_type PROTO((tree)); static int is_tagged_type PROTO((tree));
static int is_redundant_typedef PROTO((tree)); static int is_redundant_typedef PROTO((tree));
static void add_incomplete_type PROTO((tree));
static void retry_incomplete_types PROTO((void));
/* Definitions of defaults for assembler-dependent names of various /* Definitions of defaults for assembler-dependent names of various
pseudo-ops and section names. pseudo-ops and section names.
...@@ -924,7 +926,7 @@ is_tagged_type (type) ...@@ -924,7 +926,7 @@ is_tagged_type (type)
|| code == QUAL_UNION_TYPE || code == ENUMERAL_TYPE); || code == QUAL_UNION_TYPE || code == ENUMERAL_TYPE);
} }
static char * static const char *
dwarf_tag_name (tag) dwarf_tag_name (tag)
register unsigned tag; register unsigned tag;
{ {
...@@ -974,7 +976,7 @@ dwarf_tag_name (tag) ...@@ -974,7 +976,7 @@ dwarf_tag_name (tag)
} }
} }
static char * static const char *
dwarf_attr_name (attr) dwarf_attr_name (attr)
register unsigned attr; register unsigned attr;
{ {
...@@ -1052,7 +1054,7 @@ dwarf_attr_name (attr) ...@@ -1052,7 +1054,7 @@ dwarf_attr_name (attr)
} }
} }
static char * static const char *
dwarf_stack_op_name (op) dwarf_stack_op_name (op)
register unsigned op; register unsigned op;
{ {
...@@ -1069,7 +1071,7 @@ dwarf_stack_op_name (op) ...@@ -1069,7 +1071,7 @@ dwarf_stack_op_name (op)
} }
} }
static char * static const char *
dwarf_typemod_name (mod) dwarf_typemod_name (mod)
register unsigned mod; register unsigned mod;
{ {
...@@ -1083,7 +1085,7 @@ dwarf_typemod_name (mod) ...@@ -1083,7 +1085,7 @@ dwarf_typemod_name (mod)
} }
} }
static char * static const char *
dwarf_fmt_byte_name (fmt) dwarf_fmt_byte_name (fmt)
register unsigned fmt; register unsigned fmt;
{ {
...@@ -1102,7 +1104,7 @@ dwarf_fmt_byte_name (fmt) ...@@ -1102,7 +1104,7 @@ dwarf_fmt_byte_name (fmt)
} }
} }
static char * static const char *
dwarf_fund_type_name (ft) dwarf_fund_type_name (ft)
register unsigned ft; register unsigned ft;
{ {
...@@ -1369,7 +1371,8 @@ fundamental_type_code (type) ...@@ -1369,7 +1371,8 @@ fundamental_type_code (type)
&& DECL_NAME (TYPE_NAME (type)) != 0 && DECL_NAME (TYPE_NAME (type)) != 0
&& TREE_CODE (DECL_NAME (TYPE_NAME (type))) == IDENTIFIER_NODE) && TREE_CODE (DECL_NAME (TYPE_NAME (type))) == IDENTIFIER_NODE)
{ {
char *name = IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (type))); const char *name =
IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (type)));
if (!strcmp (name, "unsigned char")) if (!strcmp (name, "unsigned char"))
return FT_unsigned_char; return FT_unsigned_char;
...@@ -1424,7 +1427,8 @@ fundamental_type_code (type) ...@@ -1424,7 +1427,8 @@ fundamental_type_code (type)
&& DECL_NAME (TYPE_NAME (type)) != 0 && DECL_NAME (TYPE_NAME (type)) != 0
&& TREE_CODE (DECL_NAME (TYPE_NAME (type))) == IDENTIFIER_NODE) && TREE_CODE (DECL_NAME (TYPE_NAME (type))) == IDENTIFIER_NODE)
{ {
char *name = IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (type))); const char *name =
IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (type)));
/* Note that here we can run afowl of a serious bug in "classic" /* Note that here we can run afowl of a serious bug in "classic"
svr4 SDB debuggers. They don't seem to understand the svr4 SDB debuggers. They don't seem to understand the
...@@ -2492,7 +2496,7 @@ location_or_const_value_attribute (decl) ...@@ -2492,7 +2496,7 @@ location_or_const_value_attribute (decl)
static inline void static inline void
name_attribute (name_string) name_attribute (name_string)
register char *name_string; register const char *name_string;
{ {
if (name_string && *name_string) if (name_string && *name_string)
{ {
...@@ -2836,7 +2840,7 @@ element_list_attribute (element) ...@@ -2836,7 +2840,7 @@ element_list_attribute (element)
static inline void static inline void
stmt_list_attribute (label) stmt_list_attribute (label)
register char *label; register const char *label;
{ {
ASM_OUTPUT_DWARF_ATTRIBUTE (asm_out_file, AT_stmt_list); ASM_OUTPUT_DWARF_ATTRIBUTE (asm_out_file, AT_stmt_list);
/* Don't use ASM_OUTPUT_DWARF_DATA4 here. */ /* Don't use ASM_OUTPUT_DWARF_DATA4 here. */
...@@ -2848,7 +2852,7 @@ stmt_list_attribute (label) ...@@ -2848,7 +2852,7 @@ stmt_list_attribute (label)
static inline void static inline void
low_pc_attribute (asm_low_label) low_pc_attribute (asm_low_label)
register char *asm_low_label; register const char *asm_low_label;
{ {
ASM_OUTPUT_DWARF_ATTRIBUTE (asm_out_file, AT_low_pc); ASM_OUTPUT_DWARF_ATTRIBUTE (asm_out_file, AT_low_pc);
ASM_OUTPUT_DWARF_ADDR (asm_out_file, asm_low_label); ASM_OUTPUT_DWARF_ADDR (asm_out_file, asm_low_label);
...@@ -2859,7 +2863,7 @@ low_pc_attribute (asm_low_label) ...@@ -2859,7 +2863,7 @@ low_pc_attribute (asm_low_label)
static inline void static inline void
high_pc_attribute (asm_high_label) high_pc_attribute (asm_high_label)
register char *asm_high_label; register const char *asm_high_label;
{ {
ASM_OUTPUT_DWARF_ATTRIBUTE (asm_out_file, AT_high_pc); ASM_OUTPUT_DWARF_ATTRIBUTE (asm_out_file, AT_high_pc);
ASM_OUTPUT_DWARF_ADDR (asm_out_file, asm_high_label); ASM_OUTPUT_DWARF_ADDR (asm_out_file, asm_high_label);
...@@ -2869,7 +2873,7 @@ high_pc_attribute (asm_high_label) ...@@ -2869,7 +2873,7 @@ high_pc_attribute (asm_high_label)
static inline void static inline void
body_begin_attribute (asm_begin_label) body_begin_attribute (asm_begin_label)
register char *asm_begin_label; register const char *asm_begin_label;
{ {
ASM_OUTPUT_DWARF_ATTRIBUTE (asm_out_file, AT_body_begin); ASM_OUTPUT_DWARF_ATTRIBUTE (asm_out_file, AT_body_begin);
ASM_OUTPUT_DWARF_ADDR (asm_out_file, asm_begin_label); ASM_OUTPUT_DWARF_ADDR (asm_out_file, asm_begin_label);
...@@ -2879,7 +2883,7 @@ body_begin_attribute (asm_begin_label) ...@@ -2879,7 +2883,7 @@ body_begin_attribute (asm_begin_label)
static inline void static inline void
body_end_attribute (asm_end_label) body_end_attribute (asm_end_label)
register char *asm_end_label; register const char *asm_end_label;
{ {
ASM_OUTPUT_DWARF_ATTRIBUTE (asm_out_file, AT_body_end); ASM_OUTPUT_DWARF_ATTRIBUTE (asm_out_file, AT_body_end);
ASM_OUTPUT_DWARF_ADDR (asm_out_file, asm_end_label); ASM_OUTPUT_DWARF_ADDR (asm_out_file, asm_end_label);
...@@ -2932,7 +2936,7 @@ string_length_attribute (upper_bound) ...@@ -2932,7 +2936,7 @@ string_length_attribute (upper_bound)
static inline void static inline void
comp_dir_attribute (dirname) comp_dir_attribute (dirname)
register char *dirname; register const char *dirname;
{ {
ASM_OUTPUT_DWARF_ATTRIBUTE (asm_out_file, AT_comp_dir); ASM_OUTPUT_DWARF_ATTRIBUTE (asm_out_file, AT_comp_dir);
ASM_OUTPUT_DWARF_STRING_NEWLINE (asm_out_file, dirname); ASM_OUTPUT_DWARF_STRING_NEWLINE (asm_out_file, dirname);
...@@ -2940,7 +2944,7 @@ comp_dir_attribute (dirname) ...@@ -2940,7 +2944,7 @@ comp_dir_attribute (dirname)
static inline void static inline void
sf_names_attribute (sf_names_start_label) sf_names_attribute (sf_names_start_label)
register char *sf_names_start_label; register const char *sf_names_start_label;
{ {
ASM_OUTPUT_DWARF_ATTRIBUTE (asm_out_file, AT_sf_names); ASM_OUTPUT_DWARF_ATTRIBUTE (asm_out_file, AT_sf_names);
/* Don't use ASM_OUTPUT_DWARF_DATA4 here. */ /* Don't use ASM_OUTPUT_DWARF_DATA4 here. */
...@@ -2949,7 +2953,7 @@ sf_names_attribute (sf_names_start_label) ...@@ -2949,7 +2953,7 @@ sf_names_attribute (sf_names_start_label)
static inline void static inline void
src_info_attribute (src_info_start_label) src_info_attribute (src_info_start_label)
register char *src_info_start_label; register const char *src_info_start_label;
{ {
ASM_OUTPUT_DWARF_ATTRIBUTE (asm_out_file, AT_src_info); ASM_OUTPUT_DWARF_ATTRIBUTE (asm_out_file, AT_src_info);
/* Don't use ASM_OUTPUT_DWARF_DATA4 here. */ /* Don't use ASM_OUTPUT_DWARF_DATA4 here. */
...@@ -2958,7 +2962,7 @@ src_info_attribute (src_info_start_label) ...@@ -2958,7 +2962,7 @@ src_info_attribute (src_info_start_label)
static inline void static inline void
mac_info_attribute (mac_info_start_label) mac_info_attribute (mac_info_start_label)
register char *mac_info_start_label; register const char *mac_info_start_label;
{ {
ASM_OUTPUT_DWARF_ATTRIBUTE (asm_out_file, AT_mac_info); ASM_OUTPUT_DWARF_ATTRIBUTE (asm_out_file, AT_mac_info);
/* Don't use ASM_OUTPUT_DWARF_DATA4 here. */ /* Don't use ASM_OUTPUT_DWARF_DATA4 here. */
...@@ -2979,7 +2983,7 @@ prototyped_attribute (func_type) ...@@ -2979,7 +2983,7 @@ prototyped_attribute (func_type)
static inline void static inline void
producer_attribute (producer) producer_attribute (producer)
register char *producer; register const char *producer;
{ {
ASM_OUTPUT_DWARF_ATTRIBUTE (asm_out_file, AT_producer); ASM_OUTPUT_DWARF_ATTRIBUTE (asm_out_file, AT_producer);
ASM_OUTPUT_DWARF_STRING_NEWLINE (asm_out_file, producer); ASM_OUTPUT_DWARF_STRING_NEWLINE (asm_out_file, producer);
...@@ -5512,7 +5516,7 @@ generate_new_sfname_entry () ...@@ -5512,7 +5516,7 @@ generate_new_sfname_entry ()
static unsigned static unsigned
lookup_filename (file_name) lookup_filename (file_name)
char *file_name; const char *file_name;
{ {
register filename_entry *search_p; register filename_entry *search_p;
register filename_entry *limit_p = &filename_table[ft_entries]; register filename_entry *limit_p = &filename_table[ft_entries];
...@@ -5579,7 +5583,7 @@ generate_srcinfo_entry (line_entry_num, files_entry_num) ...@@ -5579,7 +5583,7 @@ generate_srcinfo_entry (line_entry_num, files_entry_num)
void void
dwarfout_line (filename, line) dwarfout_line (filename, line)
register char *filename; register const char *filename;
register unsigned line; register unsigned line;
{ {
if (debug_info_level >= DINFO_LEVEL_NORMAL if (debug_info_level >= DINFO_LEVEL_NORMAL
...@@ -5613,7 +5617,7 @@ dwarfout_line (filename, line) ...@@ -5613,7 +5617,7 @@ dwarfout_line (filename, line)
} }
{ {
register char *tail = rindex (filename, '/'); register const char *tail = rindex (filename, '/');
if (tail != NULL) if (tail != NULL)
filename = tail; filename = tail;
...@@ -5636,8 +5640,8 @@ dwarfout_line (filename, line) ...@@ -5636,8 +5640,8 @@ dwarfout_line (filename, line)
static void static void
generate_macinfo_entry (type_and_offset, string) generate_macinfo_entry (type_and_offset, string)
register char *type_and_offset; register const char *type_and_offset;
register char *string; register const char *string;
{ {
if (! use_gnu_debug_info_extensions) if (! use_gnu_debug_info_extensions)
return; return;
...@@ -5651,7 +5655,7 @@ generate_macinfo_entry (type_and_offset, string) ...@@ -5651,7 +5655,7 @@ generate_macinfo_entry (type_and_offset, string)
void void
dwarfout_start_new_source_file (filename) dwarfout_start_new_source_file (filename)
register char *filename; register const char *filename;
{ {
char label[MAX_ARTIFICIAL_LABEL_BYTES]; char label[MAX_ARTIFICIAL_LABEL_BYTES];
char type_and_offset[MAX_ARTIFICIAL_LABEL_BYTES*3]; char type_and_offset[MAX_ARTIFICIAL_LABEL_BYTES*3];
...@@ -5684,7 +5688,7 @@ dwarfout_resume_previous_source_file (lineno) ...@@ -5684,7 +5688,7 @@ dwarfout_resume_previous_source_file (lineno)
void void
dwarfout_define (lineno, buffer) dwarfout_define (lineno, buffer)
register unsigned lineno; register unsigned lineno;
register char *buffer; register const char *buffer;
{ {
static int initialized = 0; static int initialized = 0;
char type_and_offset[MAX_ARTIFICIAL_LABEL_BYTES*2]; char type_and_offset[MAX_ARTIFICIAL_LABEL_BYTES*2];
...@@ -5707,7 +5711,7 @@ dwarfout_define (lineno, buffer) ...@@ -5707,7 +5711,7 @@ dwarfout_define (lineno, buffer)
void void
dwarfout_undef (lineno, buffer) dwarfout_undef (lineno, buffer)
register unsigned lineno; register unsigned lineno;
register char *buffer; register const char *buffer;
{ {
char type_and_offset[MAX_ARTIFICIAL_LABEL_BYTES*2]; char type_and_offset[MAX_ARTIFICIAL_LABEL_BYTES*2];
......
...@@ -22,10 +22,10 @@ extern void dwarfout_init PROTO ((FILE *asm_out_file, ...@@ -22,10 +22,10 @@ extern void dwarfout_init PROTO ((FILE *asm_out_file,
char *main_input_filename)); char *main_input_filename));
extern void dwarfout_finish PROTO ((void)); extern void dwarfout_finish PROTO ((void));
extern void dwarfout_define PROTO ((unsigned, char *)); extern void dwarfout_define PROTO ((unsigned, const char *));
extern void dwarfout_undef PROTO ((unsigned, char *)); extern void dwarfout_undef PROTO ((unsigned, const char *));
extern void dwarfout_file_scope_decl PROTO ((tree , int)); extern void dwarfout_file_scope_decl PROTO ((tree , int));
extern void dwarfout_start_new_source_file PROTO ((char *)); extern void dwarfout_start_new_source_file PROTO ((const char *));
extern void dwarfout_resume_previous_source_file PROTO((unsigned)); extern void dwarfout_resume_previous_source_file PROTO((unsigned));
extern void dwarfout_begin_function PROTO ((void)); extern void dwarfout_begin_function PROTO ((void));
...@@ -38,5 +38,5 @@ extern void dwarfout_end_block PROTO ((unsigned)); ...@@ -38,5 +38,5 @@ extern void dwarfout_end_block PROTO ((unsigned));
#ifdef RTX_CODE #ifdef RTX_CODE
extern void dwarfout_label PROTO ((rtx)); extern void dwarfout_label PROTO ((rtx));
#endif #endif
extern void dwarfout_line PROTO ((char *, unsigned)); extern void dwarfout_line PROTO ((const char *, unsigned));
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment