summaryrefslogtreecommitdiff
path: root/gcc/dbxout.c
diff options
context:
space:
mode:
authorghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4>1999-10-26 02:54:22 +0000
committerghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4>1999-10-26 02:54:22 +0000
commit12fc9462de43808cbc51b752d43af145da63f30e (patch)
tree11a94960a3c6ab9a420970d2e6841ece8b067535 /gcc/dbxout.c
parent13823aa850e64a944aec6f0b01d291bc7f60a850 (diff)
downloadgcc-12fc9462de43808cbc51b752d43af145da63f30e.tar.gz
* 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*. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@30173 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/dbxout.c')
-rw-r--r--gcc/dbxout.c57
1 files changed, 28 insertions, 29 deletions
diff --git a/gcc/dbxout.c b/gcc/dbxout.c
index 3ed9c4ba64a..af77dcaf9fc 100644
--- a/gcc/dbxout.c
+++ b/gcc/dbxout.c
@@ -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)
{