+2000-04-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * dwarf2out.c (dw_cfi_oprnd_struct, dw_fde_struct, add_fde_cfi,
+ reg_save, dwarf2out_frame_debug_expr, dwarf2out_def_cfa,
+ dwarf2out_window_save, dwarf2out_args_size, dwarf2out_reg_save,
+ dwarf2out_return_save, dwarf2out_return_reg,
+ dwarf2out_stack_adjust, dwarf2out_frame_debug, primary_filename,
+ add_AT_lbl_id, add_AT_lbl_offset, type_tag, decl_start_label,
+ gen_compile_unit_die, dwarf2out_init): Constify a char*.
+
+ * dwarf2out.h (dwarf2out_init): Likewise.
+
+ * dwarfout.c (filename_entry, primary_filename, last_filename,
+ type_tag, output_compile_unit_die, dwarfout_init): Likewise.
+
+ * tree.h (dwarf2out_def_cfa, dwarf2out_window_save,
+ dwarf2out_args_size, dwarf2out_reg_save, dwarf2out_return_save,
+ dwarf2out_return_reg): Likewise.
+
2000-04-26 Andreas Jaeger <aj@suse.de>
* extend.texi (Function Attributes): Fix description of pure
{
unsigned long dw_cfi_reg_num;
long int dw_cfi_offset;
- char *dw_cfi_addr;
+ const char *dw_cfi_addr;
}
dw_cfi_oprnd;
typedef struct dw_fde_struct
{
- char *dw_fde_begin;
- char *dw_fde_current_label;
- char *dw_fde_end;
+ const char *dw_fde_begin;
+ const char *dw_fde_current_label;
+ const char *dw_fde_end;
dw_cfi_ref dw_fde_cfi;
int nothrow;
}
static unsigned long size_of_sleb128 PARAMS ((long));
static void output_uleb128 PARAMS ((unsigned long));
static void output_sleb128 PARAMS ((long));
-static void add_fde_cfi PARAMS ((char *, dw_cfi_ref));
+static void add_fde_cfi PARAMS ((const char *, dw_cfi_ref));
static void lookup_cfa_1 PARAMS ((dw_cfi_ref, unsigned long *,
long *));
static void lookup_cfa PARAMS ((unsigned long *, long *));
-static void reg_save PARAMS ((char *, unsigned, unsigned,
- long));
+static void reg_save PARAMS ((const char *, unsigned,
+ unsigned, long));
static void initial_return_save PARAMS ((rtx));
static void output_cfi PARAMS ((dw_cfi_ref, dw_fde_ref));
static void output_call_frame_info PARAMS ((int));
static unsigned int reg_number PARAMS ((rtx));
static void dwarf2out_stack_adjust PARAMS ((rtx));
-static void dwarf2out_frame_debug_expr PARAMS ((rtx, char *));
+static void dwarf2out_frame_debug_expr PARAMS ((rtx, const char *));
/* Definitions of defaults for assembler-dependent names of various
pseudo-ops and section names.
static void
add_fde_cfi (label, cfi)
- register char *label;
+ register const char *label;
register dw_cfi_ref cfi;
{
if (label)
void
dwarf2out_def_cfa (label, reg, offset)
- register char *label;
+ register const char *label;
register unsigned reg;
register long offset;
{
static void
reg_save (label, reg, sreg, offset)
- register char * label;
+ register const char *label;
register unsigned reg;
register unsigned sreg;
register long offset;
void
dwarf2out_window_save (label)
- register char * label;
+ register const char *label;
{
register dw_cfi_ref cfi = new_cfi ();
cfi->dw_cfi_opc = DW_CFA_GNU_window_save;
void
dwarf2out_args_size (label, size)
- char *label;
+ const char *label;
long size;
{
register dw_cfi_ref cfi;
void
dwarf2out_reg_save (label, reg, offset)
- register char * label;
+ register const char *label;
register unsigned reg;
register long offset;
{
void
dwarf2out_return_save (label, offset)
- register char * label;
+ register const char *label;
register long offset;
{
reg_save (label, DWARF_FRAME_RETURN_COLUMN, -1, offset);
void
dwarf2out_return_reg (label, sreg)
- register char * label;
+ register const char *label;
register unsigned sreg;
{
reg_save (label, DWARF_FRAME_RETURN_COLUMN, sreg, 0);
rtx insn;
{
long offset;
- char *label;
+ const char *label;
if (! asynchronous_exceptions && GET_CODE (insn) == CALL_INSN)
{
static void
dwarf2out_frame_debug_expr (expr, label)
rtx expr;
- char *label;
+ const char *label;
{
rtx src, dest;
long offset;
dwarf2out_frame_debug (insn)
rtx insn;
{
- char *label;
+ const char *label;
rtx src;
if (insn == NULL_RTX)
/* Local pointer to the name of the main input file. Initialized in
dwarf2out_init. */
-static char *primary_filename;
+static const char *primary_filename;
/* A pointer to the base of a table of references to DIE's that describe
declarations. The table is indexed by DECL_UID() which is a unique
rtx));
static void add_AT_lbl_id PARAMS ((dw_die_ref,
enum dwarf_attribute,
- char *));
+ const char *));
static void add_AT_lbl_offset PARAMS ((dw_die_ref,
enum dwarf_attribute,
- char *));
+ const char *));
static dw_attr_ref get_AT PARAMS ((dw_die_ref,
enum dwarf_attribute));
static const char *get_AT_low_pc PARAMS ((dw_die_ref));
static void pop_decl_scope PARAMS ((void));
static void add_type_attribute PARAMS ((dw_die_ref, tree, int, int,
dw_die_ref));
-static char *type_tag PARAMS ((tree));
+static const char *type_tag PARAMS ((tree));
static tree member_declared_type PARAMS ((tree));
#if 0
-static char *decl_start_label PARAMS ((tree));
+static const char *decl_start_label PARAMS ((tree));
#endif
static void gen_array_type_die PARAMS ((tree, dw_die_ref));
static void gen_set_type_die PARAMS ((tree, dw_die_ref));
add_AT_lbl_id (die, attr_kind, lbl_id)
register dw_die_ref die;
register enum dwarf_attribute attr_kind;
- register char *lbl_id;
+ register const char *lbl_id;
{
register dw_attr_ref attr = (dw_attr_ref) xmalloc (sizeof (dw_attr_node));
add_AT_lbl_offset (die, attr_kind, label)
register dw_die_ref die;
register enum dwarf_attribute attr_kind;
- register char *label;
+ register const char *label;
{
register dw_attr_ref attr = (dw_attr_ref) xmalloc (sizeof (dw_attr_node));
a pointer to the (string) tag name for the given type, or zero if the type
was declared without a tag. */
-static char *
+static const char *
type_tag (type)
register tree type;
{
- register char *name = 0;
+ register const char *name = 0;
if (TYPE_NAME (type) != 0)
{
from the DECL_NAME name used in the source file. */
#if 0
-static char *
+static const char *
decl_start_label (decl)
register tree decl;
{
rtx x;
- char *fnname;
+ const char *fnname;
x = DECL_RTL (decl);
if (GET_CODE (x) != MEM)
abort ();
{
register dw_die_ref die;
char producer[250];
- char *wd = getpwd ();
+ const char *wd = getpwd ();
int language;
die = new_die (DW_TAG_compile_unit, NULL);
void
dwarf2out_init (asm_out_file, main_input_filename)
register FILE *asm_out_file;
- register char *main_input_filename;
+ register const char *main_input_filename;
{
/* Remember the name of the primary input file. */
primary_filename = main_input_filename;
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-extern void dwarf2out_init PARAMS ((FILE *asm_out_file,
- char *main_input_filename));
+extern void dwarf2out_init PARAMS ((FILE *, const char *));
extern void dwarf2out_finish PARAMS ((void));
extern void dwarf2out_define PARAMS ((unsigned, const char *));
struct filename_entry {
unsigned number;
- char * name;
+ const char * name;
};
typedef struct filename_entry filename_entry;
/* Local pointer to the name of the main input file. Initialized in
dwarfout_init. */
-static char *primary_filename;
+static const char *primary_filename;
/* Pointer to the most recent filename for which we produced some line info. */
-static char *last_filename;
+static const char *last_filename;
/* Counter to generate unique names for DIEs. */
static inline void pure_or_virtual_attribute PARAMS ((tree));
static void name_and_src_coords_attributes PARAMS ((tree));
static void type_attribute PARAMS ((tree, int, int));
-static char *type_tag PARAMS ((tree));
+static const char *type_tag PARAMS ((tree));
static inline void dienum_push PARAMS ((void));
static inline void dienum_pop PARAMS ((void));
static inline tree member_declared_type PARAMS ((tree));
a pointer to the (string) tag name for the given type, or zero if the
type was declared without a tag. */
-static char *
+static const char *
type_tag (type)
register tree type;
{
- register char *name = 0;
+ register const char *name = 0;
if (TYPE_NAME (type) != 0)
{
output_compile_unit_die (arg)
register void *arg;
{
- register char *main_input_filename = arg;
+ register const char *main_input_filename = arg;
ASM_OUTPUT_DWARF_TAG (asm_out_file, TAG_compile_unit);
sibling_attribute ();
last_filename = xstrdup (main_input_filename);
{
- char *wd = getpwd ();
+ const char *wd = getpwd ();
if (wd)
comp_dir_attribute (wd);
}
ASM_OUTPUT_PUSH_SECTION (asm_out_file, SFNAMES_SECTION);
ASM_OUTPUT_LABEL (asm_out_file, SFNAMES_BEGIN_LABEL);
{
- register char *pwd = getpwd ();
+ register const char *pwd = getpwd ();
register char *dirname;
if (!pwd)
/* Entry point to update the canonical frame address (CFA). */
-extern void dwarf2out_def_cfa PARAMS ((char *, unsigned, long));
+extern void dwarf2out_def_cfa PARAMS ((const char *, unsigned, long));
/* Add the CFI for saving a register window. */
-extern void dwarf2out_window_save PARAMS ((char *));
+extern void dwarf2out_window_save PARAMS ((const char *));
/* Add a CFI to update the running total of the size of arguments pushed
onto the stack. */
-extern void dwarf2out_args_size PARAMS ((char *, long));
+extern void dwarf2out_args_size PARAMS ((const char *, long));
/* Entry point for saving a register to the stack. */
-extern void dwarf2out_reg_save PARAMS ((char *, unsigned, long));
+extern void dwarf2out_reg_save PARAMS ((const char *, unsigned, long));
/* Entry point for saving the return address in the stack. */
-extern void dwarf2out_return_save PARAMS ((char *, long));
+extern void dwarf2out_return_save PARAMS ((const char *, long));
/* Entry point for saving the return address in a register. */
-extern void dwarf2out_return_reg PARAMS ((char *, unsigned));
+extern void dwarf2out_return_reg PARAMS ((const char *, unsigned));
/* Output a marker (i.e. a label) for the beginning of a function, before
the prologue. */
/* Entry point to update the canonical frame address (CFA). */
-extern void dwarf2out_def_cfa PARAMS ((char *, unsigned, long));
+extern void dwarf2out_def_cfa PARAMS ((const char *, unsigned, long));
/* Add the CFI for saving a register window. */
-extern void dwarf2out_window_save PARAMS ((char *));
+extern void dwarf2out_window_save PARAMS ((const char *));
/* Add a CFI to update the running total of the size of arguments pushed
onto the stack. */
-extern void dwarf2out_args_size PARAMS ((char *, long));
+extern void dwarf2out_args_size PARAMS ((const char *, long));
/* Entry point for saving a register to the stack. */
-extern void dwarf2out_reg_save PARAMS ((char *, unsigned, long));
+extern void dwarf2out_reg_save PARAMS ((const char *, unsigned, long));
/* Entry point for saving the return address in the stack. */
-extern void dwarf2out_return_save PARAMS ((char *, long));
+extern void dwarf2out_return_save PARAMS ((const char *, long));
/* Entry point for saving the return address in a register. */
-extern void dwarf2out_return_reg PARAMS ((char *, unsigned));
+extern void dwarf2out_return_reg PARAMS ((const char *, unsigned));
/* Output a marker (i.e. a label) for the beginning of a function, before
the prologue. */