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>
* config/mips/mips.h (MIPS_ISA_DEFAULT): Insure it's defined.
......
......@@ -207,11 +207,11 @@ static FILE *asmfile;
/* Last source file name mentioned in a NOTE insn. */
static char *lastfile;
static const char *lastfile;
/* Current working directory. */
static char *cwd;
static const char *cwd;
enum typestatus {TYPE_UNSEEN, TYPE_XREF, TYPE_DEFINED};
......@@ -318,10 +318,6 @@ static int current_sym_nchars;
#define CONTIN
#endif
void dbxout_types ();
void dbxout_args ();
void dbxout_symbol ();
#if defined(ASM_OUTPUT_SECTION_NAME)
static void dbxout_function_end PROTO((void));
#endif
......@@ -331,15 +327,15 @@ static void dbxout_type_index PROTO((tree));
static void dbxout_continue PROTO((void));
#endif
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_range_type PROTO((tree));
static void dbxout_type PROTO((tree, int, int));
static void print_int_cst_octal PROTO((tree));
static void print_octal PROTO((unsigned HOST_WIDE_INT, int));
static void dbxout_type_name PROTO((tree));
static void dbxout_symbol_location PROTO((tree, tree, char *, rtx));
static void dbxout_symbol_name PROTO((tree, char *, int));
static void dbxout_symbol_location PROTO((tree, tree, const char *, rtx));
static void dbxout_symbol_name PROTO((tree, const char *, int));
static void dbxout_prepare_symbol PROTO((tree));
static void dbxout_finish_symbol PROTO((tree));
static void dbxout_block PROTO((tree, int, tree));
......@@ -374,7 +370,7 @@ dbxout_function_end ()
void
dbxout_init (asm_file, input_file_name, syms)
FILE *asm_file;
char *input_file_name;
const char *input_file_name;
tree syms;
{
char ltext_label_name[100];
......@@ -495,7 +491,7 @@ dbxout_typedefs (syms)
void
dbxout_start_new_source_file (filename)
char *filename ATTRIBUTE_UNUSED;
const char *filename ATTRIBUTE_UNUSED;
{
#ifdef DBX_USE_BINCL
struct dbx_file *n = (struct dbx_file *) xmalloc (sizeof *n);
......@@ -530,7 +526,7 @@ dbxout_resume_previous_source_file ()
void
dbxout_source_file (file, filename)
FILE *file;
char *filename;
const char *filename;
{
char ltext_label_name[100];
......@@ -562,7 +558,7 @@ dbxout_source_file (file, filename)
void
dbxout_source_line (file, filename, lineno)
FILE *file;
char *filename;
const char *filename;
int lineno;
{
dbxout_source_file (file, filename);
......@@ -581,7 +577,7 @@ dbxout_source_line (file, filename, lineno)
void
dbxout_finish (file, filename)
FILE *file ATTRIBUTE_UNUSED;
char *filename ATTRIBUTE_UNUSED;
const char *filename ATTRIBUTE_UNUSED;
{
#ifdef DBX_OUTPUT_MAIN_SOURCE_FILE_END
DBX_OUTPUT_MAIN_SOURCE_FILE_END (file, filename);
......@@ -709,7 +705,8 @@ dbxout_type_fields (type)
{
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;
fprintf (asmfile, ":%s;", name);
CHARS (strlen (name));
......@@ -743,7 +740,7 @@ dbxout_type_fields (type)
static void
dbxout_type_method_1 (decl, debug_name)
tree decl;
char *debug_name;
const char *debug_name;
{
char c1 = 'A', c2;
......@@ -807,7 +804,7 @@ dbxout_type_methods (type)
the class names, constructor names, and encodings for assembler
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) */
while (*ptr && *ptr != '<') ptr++;
if (*ptr != 0)
......@@ -847,7 +844,8 @@ dbxout_type_methods (type)
{
/* This is the "mangled" name of the method.
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;
CONTIN;
......@@ -880,8 +878,9 @@ dbxout_type_methods (type)
debug_name += IDENTIFIER_LENGTH (name);
if (debug_name[0] == '_' && debug_name[1] == '_')
{
char *method_name = debug_name + 2;
char *length_ptr = formatted_type_identifier_length;
const char *method_name = debug_name + 2;
const char *length_ptr =
formatted_type_identifier_length;
/* Get past const and volatile qualifiers. */
while (*method_name == 'C' || *method_name == 'V')
method_name++;
......@@ -898,8 +897,8 @@ dbxout_type_methods (type)
/* Detect constructors by their style of name mangling. */
else if (debug_name[0] == '_' && debug_name[1] == '_')
{
char *ctor_name = debug_name + 2;
char *length_ptr = formatted_type_identifier_length;
const char *ctor_name = debug_name + 2;
const char *length_ptr = formatted_type_identifier_length;
while (*ctor_name == 'C' || *ctor_name == 'V')
ctor_name++;
/* Skip digits for length of type_encoding. */
......@@ -1674,7 +1673,7 @@ dbxout_type_name (type)
void
dbxout_symbol (decl, local)
tree decl;
int local;
int local ATTRIBUTE_UNUSED;
{
tree type = TREE_TYPE (decl);
tree context = NULL_TREE;
......@@ -1909,7 +1908,7 @@ dbxout_symbol (decl, local)
if (TREE_PUBLIC (decl) == 0)
{
/* 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
|| TREE_CODE (TREE_TYPE (decl)) == ENUMERAL_TYPE)
{
......@@ -1955,7 +1954,7 @@ dbxout_symbol (decl, local)
static void
dbxout_symbol_location (decl, type, suffix, home)
tree decl, type;
char *suffix;
const char *suffix;
rtx home;
{
int letter = 0;
......@@ -2170,14 +2169,14 @@ dbxout_symbol_location (decl, type, suffix, home)
static void
dbxout_symbol_name (decl, suffix, letter)
tree decl;
char *suffix;
const char *suffix;
int letter;
{
/* 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
DECL_NAME. Note also that static member (variable) names DO NOT begin
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)
name = "(anon)";
fprintf (asmfile, "%s \"%s%s:", ASM_STABS_OP, name,
......@@ -2191,7 +2190,7 @@ dbxout_prepare_symbol (decl)
tree decl ATTRIBUTE_UNUSED;
{
#ifdef WINNING_GDB
char *filename = DECL_SOURCE_FILE (decl);
const char *filename = DECL_SOURCE_FILE (decl);
dbxout_source_file (asmfile, filename);
#endif
......@@ -2570,7 +2569,7 @@ dbxout_block (block, depth, args)
int depth;
tree args;
{
int blocknum;
int blocknum = -1;
while (block)
{
......
......@@ -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,
Boston, MA 02111-1307, USA. */
extern void dbxout_init PROTO ((FILE *, char *, tree));
extern void dbxout_finish PROTO ((FILE *, char *));
extern void dbxout_init PROTO ((FILE *, const char *, tree));
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_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_parms PROTO ((tree));
extern void dbxout_reg_parms PROTO ((tree));
extern void dbxout_syms 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));
......@@ -22,10 +22,10 @@ extern void dwarfout_init PROTO ((FILE *asm_out_file,
char *main_input_filename));
extern void dwarfout_finish PROTO ((void));
extern void dwarfout_define PROTO ((unsigned, char *));
extern void dwarfout_undef PROTO ((unsigned, char *));
extern void dwarfout_define PROTO ((unsigned, const char *));
extern void dwarfout_undef PROTO ((unsigned, const char *));
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_begin_function PROTO ((void));
......@@ -38,5 +38,5 @@ extern void dwarfout_end_block PROTO ((unsigned));
#ifdef RTX_CODE
extern void dwarfout_label PROTO ((rtx));
#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