summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/ChangeLog147
-rw-r--r--gcc/config/alpha/alpha-protos.h1
-rw-r--r--gcc/config/alpha/alpha.c42
-rw-r--r--gcc/config/alpha/alpha.h11
-rw-r--r--gcc/config/alpha/unicosmk.h2
-rw-r--r--gcc/config/arm/aout.h13
-rw-r--r--gcc/config/avr/avr.h3
-rw-r--r--gcc/config/c4x/c4x.h2
-rw-r--r--gcc/config/darwin.h7
-rw-r--r--gcc/config/dbxcoff.h25
-rw-r--r--gcc/config/dbxelf.h24
-rw-r--r--gcc/config/h8300/coff.h6
-rw-r--r--gcc/config/m32r/m32r.h3
-rw-r--r--gcc/config/mcore/mcore-pe.h18
-rw-r--r--gcc/config/mips/mips-protos.h1
-rw-r--r--gcc/config/mips/mips.c40
-rw-r--r--gcc/config/mips/mips.h23
-rw-r--r--gcc/config/mips/sdb.h2
-rw-r--r--gcc/config/mmix/mmix.c10
-rw-r--r--gcc/config/mmix/mmix.h4
-rw-r--r--gcc/config/pa/pa.h4
-rw-r--r--gcc/config/pa/som.h26
-rw-r--r--gcc/config/ptx4.h17
-rw-r--r--gcc/config/rs6000/linux64.h16
-rw-r--r--gcc/config/sh/elf.h20
-rw-r--r--gcc/config/vax/elf.h3
-rw-r--r--gcc/dbxout.c464
-rw-r--r--gcc/doc/tm.texi48
-rw-r--r--gcc/sdbout.c18
-rw-r--r--gcc/xcoffout.c8
30 files changed, 430 insertions, 578 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 792b602d007..7b3b80ce182 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,68 @@
+2004-10-20 Zack Weinberg <zack@codesourcery.com>
+
+ * dbxout.c (asmfile): Delete. All uses changed to asm_out_file.
+ (DBX_BLOCKS_FUNCTION_RELATIVE, DBX_LINES_FUNCTION_RELATIVE):
+ Default to 0.
+ (dbxout_source_line): Use DBX_OUTPUT_SOURCE_LINE when defined.
+ When it is not, but DBX_LINES_FUNCTION_RELATIVE is true, emit
+ an internal label and an N_SLINE .stabn whose value is the
+ difference between that label and the function entry label.
+ (dbxout_finish): If DBX_OUTPUT_MAIN_SOURCE_FILE_END is not defined,
+ but DBX_OUTPUT_NULL_N_SO_AT_MAIN_SOURCE_FILE_END is, emit a
+ label and an N_SO stab with an empty string referring to it.
+ (dbx_output_lbrac, dbx_output_rbrac): Use if statement instead
+ of #ifdef directive to test DBX_BLOCKS_FUNCTION_RELATIVE.
+ (dbxout_type_methods, dbxout_symbol): Remove #if 0 block.
+ (dbxout_prepare_symbol): Remove #ifdef WINNING_GDB block, this
+ macro is never defined.
+ * sdbout.c (sdbout_source_line_counter): Delete.
+ (PUT_SDB_SRC_FILE): Delete. Uses replaced with sole definition.
+ (sdbout_source_line): Use SDB_OUTPUT_SOURCE_LINE, which takes
+ only two arguments.
+ * xcoffout.c (ASM_OUTPUT_SOURCE_LINE): Rename ASM_OUTPUT_LINE.
+
+ * config/dbxcoff.h, config/dbxelf.h: Remove unncessary #undefs.
+ * config/c4x/c4x.h, config/pa/pa.h: Remove unnecessary macro
+ definitions (identical to default).
+ * config/darwin.h, config/dbxcoff.h, config/dbxelf.h, config/ptx4.h
+ * config/h8300/coff.h, config/pa/som.h, config/sh/elf.h:
+ Define DBX_OUTPUT_NULL_N_SO_AT_MAIN_SOURCE_FILE_END, not
+ DBX_OUTPUT_MAIN_SOURCE_FILE_END.
+ * config/dbxcoff.h, config/dbxelf.h, config/ptx4.h
+ * config/mcore/mcore-pe.h, config/pa/som.h, config/sh/elf.h:
+ Define DBX_LINES_FUNCTION_RELATIVE, not ASM_OUTPUT_SOURCE_LINE.
+ * config/alpha/alpha-protos.h: Don't prototype alpha_output_lineno.
+ * config/alpha/alpha.c: Move declaration of num_source_filenames up.
+ (alpha_start_function): Use SDB_OUTPUT_SOURCE_LINE.
+ (sym_lineno): Delete.
+ (alpha_output_filename): Do not emit N_SOL stabs here. Remove
+ now-unused variable.
+ (alpha_output_lineno): Delete.
+ * config/mips/mips-protos.h: Don't prototype mips_output_lineno.
+ * config/mips/mips.c (mips_output_filename): Don't use
+ ASM_OUTPUT_FILENAME. Don't emit N_SOL stabs here.
+ (mips_output_lineno): Delete.
+ (mips_output_function_prologue: Use SDB_OUTPUT_SOURCE_LINE.
+ * config/alpha/alpha.h: Define DBX_OUTPUT_SOURCE_LINE and
+ SDB_OUTPUT_SOURCE_LINE, not ASM_OUTPUT_SOURCE_LINE.
+ * config/mips/mips.h: Likewise. Don't define ASM_OUTPUT_FILENAME.
+ * config/mips/sdb.h: Use SDB_OUTPUT_SOURCE_LINE.
+ * config/avr/avr.h: Don't define ASM_OUTPUT_SOURCE_LINE.
+ * config/mmix/mmix.h: Likewise.
+ * config/mmix/mmix.c (mmix_asm_output_source_line): Delete.
+ * config/mmix/mmix-protos.h: Don't prototype it.
+ * config/alpha/unicosmk.h: Also #undef PREFERRED_DEBUGGING_TYPE;
+ no need to #undef ASM_OUTPUT_SOURCE_LINE.
+ * config/arm/aout.h: Remove RISCiX-specific definition of
+ DBX_OUTPUT_MAIN_SOURCE_FILENAME.
+ * config/m32r/m32r.h: Define DBX_OUTPUT_SOURCE_LINE, not
+ ASM_OUTPUT_SOURCE_LINE.
+ * config/rs6000/rs6000.h: (ASM_OUTPUT_SOURCE_LINE): Rename
+ DBX_OUTPUT_SOURCE_LINE. Don't use current_function_func_begin_label.
+ * config/vax/elf.h: No need to define DBX_OUTPUT_FUNCTION_END.
+
+ * doc/tm.texi: Update.
+
2004-10-20 Richard Henderson <rth@redhat.com>
* tree-sra.c (instantiate_element): Copy DECL_IGNORED_P also.
@@ -141,7 +206,7 @@
* c-parse.in (reservedwords): Add OBJC_TYPE_QUAL as alternative.
2004-10-18 Eric Botcazou <ebotcazou@libertysurf.fr>
- Roger Sayle <roger@eyesopen.com>
+ Roger Sayle <roger@eyesopen.com>
PR middle-end/17813
* dojump.c (discard_pending_stack_adjust): New function.
@@ -154,7 +219,7 @@
2004-10-18 Richard Henderson <rth@redhat.com>
- * c-common.c (handle_mode_attribute): Allow scalar->vector
+ * c-common.c (handle_mode_attribute): Allow scalar->vector
type changes yet.
2004-10-18 Kazu Hirata <kazu@cs.umass.edu>
@@ -303,7 +368,7 @@
* params.def: Add parameter to restrict the number of expansions.
* params.h: (MAX_VARIABLE_EXPANSIONS): New define to restrict
the number of expansions.
- * common.opt: (fvariable-expansion-in-unroller): New flag.
+ * common.opt: (fvariable-expansion-in-unroller): New flag.
* doc/invoke.texi: (fvariable-expansion-in-unroller): Document.
2004-10-18 Danny Smith <dannysmith@users.sourceforge.net>
@@ -333,9 +398,9 @@
Revert:
2004-10-17 Andrew Pinski <pinskia@physics.uc.edu>
- * c-typeck.c (default_function_array_conversion): Always create
- &a[0] for array types.
- (build_unary_op): Do not fold &a[x] into a + x.
+ * c-typeck.c (default_function_array_conversion): Always create
+ &a[0] for array types.
+ (build_unary_op): Do not fold &a[x] into a + x.
2004-10-17 Andrew Pinski <pinskia@physics.uc.edu>
@@ -534,7 +599,7 @@
* tree.h (struct pointer_set_t): Declare as opaque type.
(tree_walk): Last argument is pointer_set_t* now.
* tree-inline.c (WALK_SUBTREE): Convert from htab to pset.
- (walk_type_fields):
+ (walk_type_fields):
(walk_tree): Convert from htab_t to pointer_set_t for keeping
track of which nodes have already been visited.
(walk_tree_without_duplicates): Convert from htab_t to pointer_set_t.
@@ -550,7 +615,7 @@
(tree-inline.o): Depends on pointer-set.h
(tree-dfa.o): Likewise
(cgraphunit.o): Likewise
-
+
2004-10-14 Geoffrey Keating <geoffk@apple.com>
* config/rs6000/darwin.h (ASM_SPEC): Delete.
@@ -601,7 +666,7 @@
PR 17635
* tree-if-conv.c (process_phi_nodes): Process latch block.
(combine_blocks): Process latch block and update loop structure.
-
+
2004-10-14 Olga Golovanevsky <olga@il.ibm.com>
* tree-vectorizer.c (vect_generate_tmps_on_preheader):
@@ -621,7 +686,7 @@
(tree_duplicate_loop_to_edge_cfg):
(add_loop_guard):
(vect_analyze_loop_with_symbolic_num_of_iters):
- (verify_loop_for_duplication):
+ (verify_loop_for_duplication):
(vect_gen_niters_for_prolog_loop):
(vect_update_niters_after_peeling):
(vect_update_inits_of_dr):
@@ -629,7 +694,7 @@
(vect_build_loop_niters):
(vect_do_peeling_for_alignment): New functions.
(vect_transform_loop): Add unknown and known but indivisible loop
- bound support; add peeling for unalignment support.
+ bound support; add peeling for unalignment support.
(vect_analyze_loop_form): Support symbolic number of iterations.
(vect_transform_loop_bound): New input parameter.
(vect_get_loop_niters): Change input parameter type.
@@ -638,7 +703,7 @@
(vectorize_loops): Add rewrite_into_loop_closed_ssa.
(vect_analyze_data_refs_alignment): Allowed one unaligned
store.
- * tree-vectorizer.h (LOOP_VINFO_NITERS_KNOWN_P): Redefined
+ * tree-vectorizer.h (LOOP_VINFO_NITERS_KNOWN_P): Redefined
to use tree.
(LOOP_VINFO_INT_NITERS): New macro.
(MAX_NUMBER_OF_UNALIGNED_DATA_REFS): New define.
@@ -738,18 +803,18 @@
2004-10-13 Richard Henderson <rth@redhat.com>
- PR c/17384
- * c-common.c (handle_mode_attribute): Disallow mode changes that
- alter the CODE of the top-level type.
-
- * crtstuff.c (__FRAME_END__): Remove mode attribute. Find 32-bit
- integer from internal limits macros.
- * config/i386/mm3dnow.h (__v2sf): Fix base type.
+ PR c/17384
+ * c-common.c (handle_mode_attribute): Disallow mode changes that
+ alter the CODE of the top-level type.
+
+ * crtstuff.c (__FRAME_END__): Remove mode attribute. Find 32-bit
+ integer from internal limits macros.
+ * config/i386/mm3dnow.h (__v2sf): Fix base type.
2004-10-13 Richard Henderson <rth@redhat.com>
-
- PR debug/13841
- * function.c (instantiate_decl): Recurse for CONCAT.
+
+ PR debug/13841
+ * function.c (instantiate_decl): Recurse for CONCAT.
2004-10-13 David Edelsohn <edelsohn@gnu.org>
@@ -848,56 +913,56 @@
* Makefile.in (tree-ssa-loop-niter.o): Depends on tree-data-ref.h.
* cfgloop.c (initialize_loops_parallel_p): New.
- (flow_loops_find): Initialize the parallel_p field to true for all
+ (flow_loops_find): Initialize the parallel_p field to true for all
the loops.
* tree-ssa-loop-niter.c: Include "tree-data-ref.h".
- (estimate_numbers_of_iterations_loop): Infers the loop bounds from
+ (estimate_numbers_of_iterations_loop): Infers the loop bounds from
the size of the data accessed in the loop.
- (struct nb_iter_bound): Moved...
+ (struct nb_iter_bound): Moved...
* cfgloop.h (struct nb_iter_bound): ... here.
(estimated_nb_iterations, parallel_p): New fields in struct loop.
(record_estimate): Declare extern here.
* tree-chrec.c: Fix comments.
(nb_vars_in_chrec): New function.
* tree-chrec.h (nb_vars_in_chrec): Declared here.
- * tree-data-ref.c: Don't include lambda.h, that is already included
+ * tree-data-ref.c: Don't include lambda.h, that is already included
in tree-data-ref.h.
(tree_fold_divides_p): Don't check for integer_onep.
(tree_fold_bezout): Removed.
(gcd): New static duplicated function.
(int_divides_p, dump_subscript): New.
(dump_data_dependence_relation): Use dump_subscript.
- (dump_dist_dir_vectors, dump_ddrs, compute_estimated_nb_iterations,
+ (dump_dist_dir_vectors, dump_ddrs, compute_estimated_nb_iterations,
estimate_niter_from_size_of_data): New.
- (analyze_array_indexes, analyze_array): Call
- estimate_niter_from_size_of_data during the detection of array
- references. Pass in a pointer to the statement that contains the
+ (analyze_array_indexes, analyze_array): Call
+ estimate_niter_from_size_of_data during the detection of array
+ references. Pass in a pointer to the statement that contains the
array reference.
(all_chrecs_equal_p): New.
(compute_distance_vector): Renamed compute_subscript_distance.
Deal with multivariate conflict functions.
- (initialize_data_dependence_relation): Initialize DDR_AFFINE_P,
+ (initialize_data_dependence_relation): Initialize DDR_AFFINE_P,
DDR_SIZE_VECT, DDR_DIST_VECT, and DDR_DIR_VECT.
(non_affine_dependence_relation): New.
- (analyze_ziv_subscript, analyze_siv_subscript_cst_affine,
- analyze_siv_subscript, analyze_miv_subscript,
- analyze_overlapping_iterations, subscript_dependence_tester):
+ (analyze_ziv_subscript, analyze_siv_subscript_cst_affine,
+ analyze_siv_subscript, analyze_miv_subscript,
+ analyze_overlapping_iterations, subscript_dependence_tester):
Initialize and return last_conflicts function.
(initialize_matrix_A, FLOOR, compute_overlap_steps_for_affine_univar,
compute_overlap_steps_for_affine_1_2): New.
(analyze_siv_subscript_affine_cst): Removed.
- (analyze_subscript_affine_affine): Disprove dependences based on the
- iteration domains. Solve the univariate dependence case as before,
+ (analyze_subscript_affine_affine): Disprove dependences based on the
+ iteration domains. Solve the univariate dependence case as before,
but use lambda_matrix_right_hermite instead of tree_fold_bezout.
Implement the multivariate case of 2 versus 1 variables.
- (build_classic_dist_vector, build_classic_dir_vector): Implement some
+ (build_classic_dist_vector, build_classic_dir_vector): Implement some
unhandled cases.
- (find_data_references_in_loop): Compute and initialize
+ (find_data_references_in_loop): Compute and initialize
loop->estimated_nb_iterations and loop->parallel_p.
(analyze_all_data_dependences): Modify the debug dump order.
* tree-data-ref.h (SUB_LAST_CONFLICT_IN_A, SUB_LAST_CONFLICT_IN_B,
subscript->last_conflict_in_a, subscript->last_conflict_in_b): Removed.
- (SUB_LAST_CONFLICT, subscript->last_conflict,
+ (SUB_LAST_CONFLICT, subscript->last_conflict,
data_dependence_relation->affine_p, data_dependence_relation->size_vect,
DDR_AFFINE_P, DDR_SIZE_VECT): New.
(find_data_references_in_loop, initialize_data_dependence_relation,
@@ -912,7 +977,7 @@
PR 17892
* tree-ssa-dom.c (unsafe_associative_fp_binop): New function.
(simplify_rhs_and_lookup_avail_expr): Disallow associativity
- and constant folding of floating point MULT_EXPR/PLUS_EXPR
+ and constant folding of floating point MULT_EXPR/PLUS_EXPR
expressions.
2004-10-12 Ulrich Weigand <uweigand@de.ibm.com>
@@ -1054,7 +1119,7 @@
PR middle-end/17657
* stmt.c (add_case_node): Add additional type argument. Declare
as static to match prototype. Convert the upper and lower bounds
- to the specified index type. Optimize away case ranges/values
+ to the specified index type. Optimize away case ranges/values
that are outside the index type's bounds. Truncate case ranges
that span the index type's bounds.
(expand_case): Avoid unnessary computation and memory allocation
diff --git a/gcc/config/alpha/alpha-protos.h b/gcc/config/alpha/alpha-protos.h
index c5d0157baef..07d70649908 100644
--- a/gcc/config/alpha/alpha-protos.h
+++ b/gcc/config/alpha/alpha-protos.h
@@ -34,7 +34,6 @@ extern int alpha_using_fp (void);
extern void alpha_expand_prologue (void);
extern void alpha_expand_epilogue (void);
extern void alpha_output_filename (FILE *, const char *);
-extern void alpha_output_lineno (FILE *, int);
extern bool alpha_const_ok_for_letter_p (HOST_WIDE_INT, int);
extern bool alpha_const_double_ok_for_letter_p (rtx, int);
diff --git a/gcc/config/alpha/alpha.c b/gcc/config/alpha/alpha.c
index b1de390bc53..eeff191dd2a 100644
--- a/gcc/config/alpha/alpha.c
+++ b/gcc/config/alpha/alpha.c
@@ -6547,6 +6547,9 @@ alpha_expand_prologue (void)
emit_insn (gen_blockage ());
}
+/* Count the number of .file directives, so that .loc is up to date. */
+static int num_source_filenames = 0;
+
/* Output the textual info surrounding the prologue. */
void
@@ -6613,10 +6616,10 @@ alpha_start_function (FILE *file, const char *fnname,
ASM_OUTPUT_SOURCE_FILENAME (file,
DECL_SOURCE_FILE (current_function_decl));
#endif
-#ifdef ASM_OUTPUT_SOURCE_LINE
+#ifdef SDB_OUTPUT_SOURCE_LINE
if (debug_info_level != DINFO_LEVEL_TERSE)
- ASM_OUTPUT_SOURCE_LINE (file,
- DECL_SOURCE_LINE (current_function_decl), 0);
+ SDB_OUTPUT_SOURCE_LINE (file,
+ DECL_SOURCE_LINE (current_function_decl));
#endif
}
@@ -7149,14 +7152,6 @@ alpha_output_mi_thunk_osf (FILE *file, tree thunk_fndecl ATTRIBUTE_UNUSED,
int sdb_label_count = 0;
-/* Next label # for each statement. */
-
-static int sym_lineno = 0;
-
-/* Count the number of .file directives, so that .loc is up to date. */
-
-static int num_source_filenames = 0;
-
/* Name of the file containing the current function. */
static const char *current_function_file = "";
@@ -7172,7 +7167,6 @@ void
alpha_output_filename (FILE *stream, const char *name)
{
static int first_time = TRUE;
- char ltext_label_name[100];
if (first_time)
{
@@ -7187,12 +7181,8 @@ alpha_output_filename (FILE *stream, const char *name)
}
else if (write_symbols == DBX_DEBUG)
- {
- ASM_GENERATE_INTERNAL_LABEL (ltext_label_name, "Ltext", 0);
- fprintf (stream, "%s", ASM_STABS_OP);
- output_quoted_string (stream, name);
- fprintf (stream, ",%d,0,0,%s\n", N_SOL, &ltext_label_name[1]);
- }
+ /* dbxout.c will emit an appropriate .stabs directive. */
+ return;
else if (name != current_function_file
&& strcmp (name, current_function_file) != 0)
@@ -7210,22 +7200,6 @@ alpha_output_filename (FILE *stream, const char *name)
fprintf (stream, "\n");
}
}
-
-/* Emit a linenumber to a stream. */
-
-void
-alpha_output_lineno (FILE *stream, int line)
-{
- if (write_symbols == DBX_DEBUG)
- {
- /* mips-tfile doesn't understand .stabd directives. */
- ++sym_lineno;
- fprintf (stream, "$LM%d:\n%s%d,0,%d,$LM%d\n",
- sym_lineno, ASM_STABN_OP, N_SLINE, line, sym_lineno);
- }
- else
- fprintf (stream, "\n\t.loc\t%d %d\n", num_source_filenames, line);
-}
/* Structure to show the current status of registers and memory. */
diff --git a/gcc/config/alpha/alpha.h b/gcc/config/alpha/alpha.h
index fe3cedcb520..edda309d1be 100644
--- a/gcc/config/alpha/alpha.h
+++ b/gcc/config/alpha/alpha.h
@@ -1661,9 +1661,14 @@ extern long alpha_auto_offset;
((GET_CODE (X) == PLUS ? INTVAL (XEXP (X, 1)) : 0) + alpha_auto_offset)
#define DEBUGGER_ARG_OFFSET(OFFSET, X) (OFFSET + alpha_arg_offset)
-
-#define ASM_OUTPUT_SOURCE_LINE(STREAM, LINE, COUNTER) \
- alpha_output_lineno (STREAM, LINE)
+/* mips-tfile doesn't understand .stabd directives. */
+#define DBX_OUTPUT_SOURCE_LINE(STREAM, LINE, COUNTER) \
+ fprintf (STREAM, "$LM%d:\n%s%d,0,%d,$LM%d\n", COUNTER, ASM_STABN_OP, \
+ N_SLINE, LINE, COUNTER)
+
+/* We want to use MIPS-style .loc directives for SDB line numbers. */
+#define SDB_OUTPUT_SOURCE_LINE(STREAM, LINE) \
+ fprintf (STREAM, "\t.loc\t%d %d", num_source_filenames, LINE)
#define ASM_OUTPUT_SOURCE_FILENAME(STREAM, NAME) \
alpha_output_filename (STREAM, NAME)
diff --git a/gcc/config/alpha/unicosmk.h b/gcc/config/alpha/unicosmk.h
index c0aac5330e8..1f6be35e09b 100644
--- a/gcc/config/alpha/unicosmk.h
+++ b/gcc/config/alpha/unicosmk.h
@@ -470,7 +470,7 @@ ssib_section (void) \
#undef DWARF2_DEBUGGING_INFO
#undef DWARF2_UNWIND_INFO
#undef INCOMING_RETURN_ADDR_RTX
-#undef ASM_OUTPUT_SOURCE_LINE
+#undef PREFERRED_DEBUGGING_TYPE
/* We don't need a start file. */
diff --git a/gcc/config/arm/aout.h b/gcc/config/arm/aout.h
index fb27dc5c383..91fc6d266c1 100644
--- a/gcc/config/arm/aout.h
+++ b/gcc/config/arm/aout.h
@@ -193,19 +193,6 @@
#define DBX_CONTIN_LENGTH 0
#endif
-/* Output a source filename for the debugger. RISCiX dbx insists that the
- ``desc'' field is set to compiler version number >= 315 (sic). */
-#define DBX_OUTPUT_MAIN_SOURCE_FILENAME(STREAM, NAME) \
- do \
- { \
- fprintf (STREAM, ".stabs "); \
- output_quoted_string (STREAM, NAME); \
- fprintf (STREAM, ",%d,0,315,%s\n", N_SO, &ltext_label_name[1]); \
- text_section (); \
- (*targetm.asm_out.internal_label) (STREAM, "Ltext", 0); \
- } \
- while (0)
-
/* Output a function label definition. */
#ifndef ASM_DECLARE_FUNCTION_NAME
#define ASM_DECLARE_FUNCTION_NAME(STREAM, NAME, DECL) \
diff --git a/gcc/config/avr/avr.h b/gcc/config/avr/avr.h
index da06c207604..669ca36d26a 100644
--- a/gcc/config/avr/avr.h
+++ b/gcc/config/avr/avr.h
@@ -557,9 +557,6 @@ progmem_section (void) \
#define ASM_APP_OFF "/* #NOAPP */\n"
-#define ASM_OUTPUT_SOURCE_LINE(STREAM, LINE, COUNTER) \
- fprintf (STREAM,"/* line: %d */\n",LINE)
-
/* Switch into a generic section. */
#define TARGET_ASM_NAMED_SECTION default_elf_asm_named_section
diff --git a/gcc/config/c4x/c4x.h b/gcc/config/c4x/c4x.h
index 18f31805d6f..d514e5aa806 100644
--- a/gcc/config/c4x/c4x.h
+++ b/gcc/config/c4x/c4x.h
@@ -1452,8 +1452,6 @@ fini_section () \
} \
}
-#define ASM_STABS_OP "\t.stabs\t"
-
/* Switch into a generic section. */
#define TARGET_ASM_NAMED_SECTION c4x_asm_named_section
diff --git a/gcc/config/darwin.h b/gcc/config/darwin.h
index 75ac884c5e4..554ae9f89ed 100644
--- a/gcc/config/darwin.h
+++ b/gcc/config/darwin.h
@@ -362,12 +362,7 @@ extern const char *darwin_fix_and_continue_switch;
/* gdb needs a null N_SO at the end of each file for scattered loading. */
-#undef DBX_OUTPUT_MAIN_SOURCE_FILE_END
-#define DBX_OUTPUT_MAIN_SOURCE_FILE_END(FILE, FILENAME) \
-do { text_section (); \
- fprintf (FILE, \
- "\t.stabs \"%s\",%d,0,0,Letext\nLetext:\n", "" , N_SO); \
- } while (0)
+#define DBX_OUTPUT_NULL_N_SO_AT_MAIN_SOURCE_FILE_END
/* Making a symbols weak on Darwin requires more than just setting DECL_WEAK. */
#define MAKE_DECL_ONE_ONLY(DECL) darwin_make_decl_one_only (DECL)
diff --git a/gcc/config/dbxcoff.h b/gcc/config/dbxcoff.h
index 76a910f3225..e9e9acaec75 100644
--- a/gcc/config/dbxcoff.h
+++ b/gcc/config/dbxcoff.h
@@ -34,43 +34,22 @@ Boston, MA 02111-1307, USA. */
/* Be function-relative for block and source line stab directives. */
-#undef DBX_BLOCKS_FUNCTION_RELATIVE
#define DBX_BLOCKS_FUNCTION_RELATIVE 1
/* but, to make this work, functions must appear prior to line info. */
-#undef DBX_FUNCTION_FIRST
#define DBX_FUNCTION_FIRST
/* Generate a blank trailing N_SO to mark the end of the .o file, since
we can't depend upon the linker to mark .o file boundaries with
embedded stabs. */
-#undef DBX_OUTPUT_MAIN_SOURCE_FILE_END
-#define DBX_OUTPUT_MAIN_SOURCE_FILE_END(FILE, FILENAME) \
- asm_fprintf (FILE, \
- "\t.text\n\t.stabs \"\",%d,0,0,%LLetext\n%LLetext:\n", N_SO)
+#define DBX_OUTPUT_NULL_N_SO_AT_MAIN_SOURCE_FILE_END
/* Like block addresses, stabs line numbers are relative to the
current function. */
-#undef ASM_OUTPUT_SOURCE_LINE
-#define ASM_OUTPUT_SOURCE_LINE(FILE, LINE, COUNTER) \
-{ if (write_symbols == SDB_DEBUG) { \
- fprintf ((FILE), "\t.ln\t%d\n", \
- ((sdb_begin_function_line > -1) \
- ? (LINE) - sdb_begin_function_line : 1)); \
- } else if (write_symbols == DBX_DEBUG) { \
- char buffer[256]; \
- ASM_GENERATE_INTERNAL_LABEL (buffer, "LM", COUNTER); \
- fprintf (FILE, ".stabn 68,0,%d,", LINE); \
- assemble_name (FILE, buffer); \
- putc ('-', FILE); \
- assemble_name (FILE, \
- XSTR (XEXP (DECL_RTL (current_function_decl), 0), 0)); \
- putc ('\n', FILE); \
- (*targetm.asm_out.internal_label) (FILE, "LM", COUNTER); \
- } }
+#define DBX_LINES_FUNCTION_RELATIVE 1
/* When generating stabs debugging, use N_BINCL entries. */
diff --git a/gcc/config/dbxelf.h b/gcc/config/dbxelf.h
index e636daddc87..b26b005a864 100644
--- a/gcc/config/dbxelf.h
+++ b/gcc/config/dbxelf.h
@@ -34,17 +34,14 @@ Boston, MA 02111-1307, USA. */
way, gdb expects it, and it reduces the number of relocation
entries... */
-#undef DBX_BLOCKS_FUNCTION_RELATIVE
#define DBX_BLOCKS_FUNCTION_RELATIVE 1
/* ... but, to make this work, functions must appear prior to line info. */
-#undef DBX_FUNCTION_FIRST
#define DBX_FUNCTION_FIRST
/* When generating stabs debugging, use N_BINCL entries. */
-#undef DBX_USE_BINCL
#define DBX_USE_BINCL
/* There is no limit to the length of stabs strings. */
@@ -56,29 +53,12 @@ Boston, MA 02111-1307, USA. */
/* Like block addresses, stabs line numbers are relative to the
current function. */
-#undef ASM_OUTPUT_SOURCE_LINE
-#define ASM_OUTPUT_SOURCE_LINE(FILE, LINE, COUNTER) \
-do \
- { \
- char temp[256]; \
- ASM_GENERATE_INTERNAL_LABEL (temp, "LM", COUNTER); \
- fprintf (FILE, "\t.stabn 68,0,%d,", LINE); \
- assemble_name (FILE, temp); \
- putc ('-', FILE); \
- assemble_name (FILE, \
- XSTR (XEXP (DECL_RTL (current_function_decl), 0), 0));\
- putc ('\n', FILE); \
- (*targetm.asm_out.internal_label) (FILE, "LM", COUNTER); \
- } \
-while (0)
+#define DBX_LINES_FUNCTION_RELATIVE 1
/* Generate a blank trailing N_SO to mark the end of the .o file, since
we can't depend upon the linker to mark .o file boundaries with
embedded stabs. */
-#undef DBX_OUTPUT_MAIN_SOURCE_FILE_END
-#define DBX_OUTPUT_MAIN_SOURCE_FILE_END(FILE, FILENAME) \
- asm_fprintf (FILE, \
- "\t.text\n\t.stabs \"\",%d,0,0,%LLetext\n%LLetext:\n", N_SO)
+#define DBX_OUTPUT_NULL_N_SO_AT_MAIN_SOURCE_FILE_END
#endif /* ! GCC_DBX_ELF_H */
diff --git a/gcc/config/h8300/coff.h b/gcc/config/h8300/coff.h
index 7d173193ad1..0420277d078 100644
--- a/gcc/config/h8300/coff.h
+++ b/gcc/config/h8300/coff.h
@@ -27,15 +27,11 @@ Boston, MA 02111-1307, USA. */
#define SDB_DEBUGGING_INFO 1
#define SDB_DELIM "\n"
-/* Override definition in dbxcoff.h. */
/* Generate a blank trailing N_SO to mark the end of the .o file, since
we can't depend upon the linker to mark .o file boundaries with
embedded stabs. */
-#undef DBX_OUTPUT_MAIN_SOURCE_FILE_END
-#define DBX_OUTPUT_MAIN_SOURCE_FILE_END(FILE, FILENAME) \
- fprintf (FILE, \
- "\t.text\n.stabs \"\",%d,0,0,.Letext\n.Letext:\n", N_SO)
+#define DBX_OUTPUT_NULL_N_SO_AT_MAIN_SOURCE_FILE_END
/* This is how to output an assembler line
that says to advance the location counter by SIZE bytes. */
diff --git a/gcc/config/m32r/m32r.h b/gcc/config/m32r/m32r.h
index d5aa56b82e6..5513feadfbb 100644
--- a/gcc/config/m32r/m32r.h
+++ b/gcc/config/m32r/m32r.h
@@ -1525,8 +1525,7 @@ L2: .word STATIC
a word so don't ever force line number labels to begin at the beginning
of a word. */
-#undef ASM_OUTPUT_SOURCE_LINE
-#define ASM_OUTPUT_SOURCE_LINE(file, line, counter) \
+#define DBX_OUTPUT_SOURCE_LINE(file, line, counter) \
do \
{ \
fprintf (file, ".stabn 68,0,%d,.LM%d-", \
diff --git a/gcc/config/mcore/mcore-pe.h b/gcc/config/mcore/mcore-pe.h
index 502ca018e16..224f3423981 100644
--- a/gcc/config/mcore/mcore-pe.h
+++ b/gcc/config/mcore/mcore-pe.h
@@ -104,23 +104,7 @@ drectve_section () \
#define TARGET_ASM_FILE_START_FILE_DIRECTIVE true
-#undef ASM_OUTPUT_SOURCE_LINE
-#define ASM_OUTPUT_SOURCE_LINE(FILE, LINE, COUNTER) \
- { \
- if (write_symbols == DBX_DEBUG) \
- { \
- char buffer[256]; \
- \
- ASM_GENERATE_INTERNAL_LABEL (buffer, "LM", COUNTER); \
- fprintf (FILE, ".stabn 68,0,%d,", LINE); \
- assemble_name (FILE, buffer); \
- putc ('-', FILE); \
- assemble_name (FILE, \
- XSTR (XEXP (DECL_RTL (current_function_decl), 0), 0)); \
- putc ('\n', FILE); \
- (*targetm.asm_out.internal_label) (FILE, "LM", COUNTER); \
- } \
- }
+#define DBX_LINES_FUNCTION_RELATIVE 1
#define STARTFILE_SPEC "crt0.o%s"
#define ENDFILE_SPEC "%{!mno-lsim:-lsim}"
diff --git a/gcc/config/mips/mips-protos.h b/gcc/config/mips/mips-protos.h
index 177da63bd13..834c41d1a8e 100644
--- a/gcc/config/mips/mips-protos.h
+++ b/gcc/config/mips/mips-protos.h
@@ -158,7 +158,6 @@ extern void print_operand (FILE *, rtx, int);
extern void print_operand_address (FILE *, rtx);
extern int mips_output_external (FILE *, tree, const char *);
extern void mips_output_filename (FILE *, const char *);
-extern void mips_output_lineno (FILE *, int);
extern void mips_output_ascii (FILE *, const char *, size_t, const char *);
extern void mips_output_aligned_bss (FILE *, tree, const char *,
unsigned HOST_WIDE_INT, int);
diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c
index 048e5a8a365..a109b82a099 100644
--- a/gcc/config/mips/mips.c
+++ b/gcc/config/mips/mips.c
@@ -5069,44 +5069,24 @@ mips_output_filename (FILE *stream, const char *name)
mips_output_filename_first_time = 0;
num_source_filenames += 1;
current_function_file = name;
- ASM_OUTPUT_FILENAME (stream, num_source_filenames, name);
+ fprintf (stream, "\t.file\t%d ", num_source_filenames);
+ output_quoted_string (stream, name);
+ putc ('\n', stream);
}
+ /* If we are emitting stabs, let dbxout.c handle this (except for
+ the mips_output_filename_first_time case). */
else if (write_symbols == DBX_DEBUG)
- {
- ASM_GENERATE_INTERNAL_LABEL (ltext_label_name, "Ltext", 0);
- fputs ("\t.stabs\t", stream);
- output_quoted_string (stream, name);
- fprintf (stream, ",%d,0,0,%s\n", N_SOL, &ltext_label_name[1]);
- }
+ return;
else if (name != current_function_file
&& strcmp (name, current_function_file) != 0)
{
num_source_filenames += 1;
current_function_file = name;
- ASM_OUTPUT_FILENAME (stream, num_source_filenames, name);
- }
-}
-
-/* Emit a linenumber. For encapsulated stabs, we need to put out a stab
- as well as a .loc, since it is possible that MIPS ECOFF might not be
- able to represent the location for inlines that come from a different
- file. */
-
-void
-mips_output_lineno (FILE *stream, int line)
-{
- if (write_symbols == DBX_DEBUG)
- {
- ++sym_lineno;
- fprintf (stream, "%sLM%d:\n\t.stabn\t%d,0,%d,%sLM%d\n",
- LOCAL_LABEL_PREFIX, sym_lineno, N_SLINE, line,
- LOCAL_LABEL_PREFIX, sym_lineno);
- }
- else
- {
- fprintf (stream, "\n\t.loc\t%d %d\n", num_source_filenames, line);
+ fprintf (stream, "\t.file\t%d ", num_source_filenames);
+ output_quoted_string (stream, name);
+ putc ('\n', stream);
}
}
@@ -5963,7 +5943,7 @@ mips_output_function_prologue (FILE *file, HOST_WIDE_INT size ATTRIBUTE_UNUSED)
#ifdef SDB_DEBUGGING_INFO
if (debug_info_level != DINFO_LEVEL_TERSE && write_symbols == SDB_DEBUG)
- ASM_OUTPUT_SOURCE_LINE (file, DECL_SOURCE_LINE (current_function_decl), 0);
+ SDB_OUTPUT_SOURCE_LINE (file, DECL_SOURCE_LINE (current_function_decl));
#endif
/* In mips16 mode, we may need to generate a 32 bit to handle
diff --git a/gcc/config/mips/mips.h b/gcc/config/mips/mips.h
index 6ec54072749..b35b7d9b3df 100644
--- a/gcc/config/mips/mips.h
+++ b/gcc/config/mips/mips.h
@@ -2790,20 +2790,15 @@ while (0)
#define ASM_OUTPUT_SOURCE_FILENAME(STREAM, NAME) \
mips_output_filename (STREAM, NAME)
-/* This is defined so that it can be overridden in iris6.h. */
-#define ASM_OUTPUT_FILENAME(STREAM, NUM_SOURCE_FILENAMES, NAME) \
-do \
- { \
- fprintf (STREAM, "\t.file\t%d ", NUM_SOURCE_FILENAMES); \
- output_quoted_string (STREAM, NAME); \
- fputs ("\n", STREAM); \
- } \
-while (0)
-
-#ifndef ASM_OUTPUT_SOURCE_LINE
-#define ASM_OUTPUT_SOURCE_LINE(STREAM, LINE, COUNTER) \
- mips_output_lineno (STREAM, LINE)
-#endif
+/* mips-tfile does not understand .stabd directives. */
+#define DBX_OUTPUT_SOURCE_LINE(STREAM, LINE, COUNTER) \
+ fprintf (STREAM, "%sLM%d:\n\t.stabn\t%d,0,%d,%sLM%d\n", \
+ LOCAL_LABEL_PREFIX, COUNTER, N_SLINE, LINE, \
+ LOCAL_LABEL_PREFIX, COUNTER)
+
+/* Use .loc directives for SDB line numbers. */
+#define SDB_OUTPUT_SOURCE_LINE(STREAM, LINE) \
+ fprintf (STREAM, "\t.loc\t%d %d", num_source_filenames, LINE)
/* The MIPS implementation uses some labels for its own purpose. The
following lists what labels are created, and are all formed by the
diff --git a/gcc/config/mips/sdb.h b/gcc/config/mips/sdb.h
index 50d0158057d..fe52c0dc88d 100644
--- a/gcc/config/mips/sdb.h
+++ b/gcc/config/mips/sdb.h
@@ -67,7 +67,7 @@ do { \
#define PUT_SDB_FUNCTION_END(LINE) \
do { \
- ASM_OUTPUT_SOURCE_LINE (asm_out_file, LINE + sdb_begin_function_line, 0); \
+ SDB_OUTPUT_SOURCE_LINE (asm_out_file, LINE + sdb_begin_function_line); \
} while (0)
#define PUT_SDB_EPILOGUE_END(NAME)
diff --git a/gcc/config/mmix/mmix.c b/gcc/config/mmix/mmix.c
index c08fa92e1d7..98d8d60fd38 100644
--- a/gcc/config/mmix/mmix.c
+++ b/gcc/config/mmix/mmix.c
@@ -1236,16 +1236,6 @@ mmix_output_quoted_string (FILE *stream, const char *string, int length)
}
}
-/* ASM_OUTPUT_SOURCE_LINE. */
-
-void
-mmix_asm_output_source_line (FILE *stream, int lineno)
-{
- fprintf (stream, "# %d ", lineno);
- OUTPUT_QUOTED_STRING (stream, main_input_filename);
- fprintf (stream, "\n");
-}
-
/* Target hook for assembling integer objects. Use mmix_print_operand
for WYDE and TETRA. Use mmix_output_octa to output 8-byte
CONST_DOUBLEs. */
diff --git a/gcc/config/mmix/mmix.h b/gcc/config/mmix/mmix.h
index 143c8de462e..501837ebf85 100644
--- a/gcc/config/mmix/mmix.h
+++ b/gcc/config/mmix/mmix.h
@@ -888,12 +888,8 @@ typedef struct { int regs; int lib; } CUMULATIVE_ARGS;
#define OUTPUT_QUOTED_STRING(STREAM, STRING) \
mmix_output_quoted_string (STREAM, STRING, strlen (STRING))
-#define ASM_OUTPUT_SOURCE_LINE(STREAM, LINE, COUNTER) \
- mmix_asm_output_source_line (STREAM, LINE)
-
#define TARGET_ASM_NAMED_SECTION default_elf_asm_named_section
-
/* Node: Data Output */
#define ASM_OUTPUT_ASCII(STREAM, PTR, LEN) \
diff --git a/gcc/config/pa/pa.h b/gcc/config/pa/pa.h
index 18fb21706a3..e5c30b2c147 100644
--- a/gcc/config/pa/pa.h
+++ b/gcc/config/pa/pa.h
@@ -369,10 +369,6 @@ extern int target_flags;
#undef DBX_CONTIN_LENGTH
#define DBX_CONTIN_LENGTH 3000
-/* Only labels should ever begin in column zero. */
-#define ASM_STABS_OP "\t.stabs\t"
-#define ASM_STABN_OP "\t.stabn\t"
-
/* GDB always assumes the current function's frame begins at the value
of the stack pointer upon entry to the current function. Accessing
local variables and parameters passed on the stack is done using the
diff --git a/gcc/config/pa/som.h b/gcc/config/pa/som.h
index ff152aecf96..ac01ca1de4f 100644
--- a/gcc/config/pa/som.h
+++ b/gcc/config/pa/som.h
@@ -27,33 +27,11 @@ Boston, MA 02111-1307, USA. */
from other embedded stabs implementations. */
#undef DBX_USE_BINCL
-/* We make the first line stab special to avoid adding several
- gross hacks to GAS. */
-#undef ASM_OUTPUT_SOURCE_LINE
-#define ASM_OUTPUT_SOURCE_LINE(file, line, counter) \
- { static tree last_function_decl = NULL; \
- if (current_function_decl == last_function_decl) \
- { \
- rtx func = DECL_RTL (current_function_decl); \
- const char *name = XSTR (XEXP (func, 0), 0); \
- fprintf (file, "\t.stabn 68,0,%d,L$M%d-%s\nL$M%d:\n", \
- line, counter, \
- (* targetm.strip_name_encoding) (name), \
- counter); \
- } \
- else \
- fprintf (file, "\t.stabn 68,0,%d,0\n", line); \
- last_function_decl = current_function_decl; \
- }
+#define DBX_LINES_FUNCTION_RELATIVE 1
/* gdb needs a null N_SO at the end of each file for scattered loading. */
-#undef DBX_OUTPUT_MAIN_SOURCE_FILE_END
-#define DBX_OUTPUT_MAIN_SOURCE_FILE_END(FILE, FILENAME) \
- text_section (); \
- fputs ("\t.SPACE $TEXT$\n\t.NSUBSPA $CODE$,QUAD=0,ALIGN=8,ACCESS=44,CODE_ONLY\n", FILE); \
- fprintf (FILE, \
- "\t.stabs \"\",%d,0,0,L$text_end0000\nL$text_end0000:\n", N_SO)
+#define DBX_OUTPUT_NULL_N_SO_AT_MAIN_SOURCE_FILE_END
/* Select a format to encode pointers in exception handling data. CODE
is 0 for data, 1 for code labels, 2 for function pointers. GLOBAL is
diff --git a/gcc/config/ptx4.h b/gcc/config/ptx4.h
index 33e91d15135..2b0fadcd69a 100644
--- a/gcc/config/ptx4.h
+++ b/gcc/config/ptx4.h
@@ -184,26 +184,13 @@ Boston, MA 02111-1307, USA.
/* Like block addresses, stabs line numbers are relative to the
current function. */
-#undef ASM_OUTPUT_SOURCE_LINE
-#define ASM_OUTPUT_SOURCE_LINE(file, line, counter) \
-do \
- { \
- fprintf (file, ".stabn 68,0,%d,.LM%d-", \
- line, counter); \
- assemble_name (file, \
- XSTR (XEXP (DECL_RTL (current_function_decl), 0), 0));\
- fprintf (file, "\n.LM%d:\n", counter); \
- } \
-while (0)
+#define DBX_LINES_FUNCTION_RELATIVE 1
/* Generate a blank trailing N_SO to mark the end of the .o file, since
we can't depend upon the linker to mark .o file boundaries with
embedded stabs. */
-#undef DBX_OUTPUT_MAIN_SOURCE_FILE_END
-#define DBX_OUTPUT_MAIN_SOURCE_FILE_END(FILE, FILENAME) \
- fprintf (FILE, \
- "\t.text\n\t.stabs \"\",%d,0,0,.Letext\n.Letext:\n", N_SO)
+#define DBX_OUTPUT_NULL_N_SO_AT_MAIN_SOURCE_FILE_END
/* Define the actual types of some ANSI-mandated types. (These
definitions should work for most SVR4 systems). */
diff --git a/gcc/config/rs6000/linux64.h b/gcc/config/rs6000/linux64.h
index c98a39059e3..02d5167c2d9 100644
--- a/gcc/config/rs6000/linux64.h
+++ b/gcc/config/rs6000/linux64.h
@@ -482,10 +482,9 @@ extern int dot_symbols;
&& GET_MODE_CLASS (GET_MODE (X)) == MODE_FLOAT \
&& BITS_PER_WORD == HOST_BITS_PER_INT)))))
-/* This is the same as the dbxelf.h version, except that we need to
+/* This ABI cannot use DBX_LINES_FUNCTION_RELATIVE, because we must
use the function code label, not the function descriptor. */
-#undef ASM_OUTPUT_SOURCE_LINE
-#define ASM_OUTPUT_SOURCE_LINE(FILE, LINE, COUNTER) \
+#define DBX_OUTPUT_SOURCE_LINE(FILE, LINE, COUNTER) \
do \
{ \
char temp[256]; \
@@ -509,15 +508,8 @@ while (0)
fprintf (FILE, "%s%d,0,0,", ASM_STABN_OP, BRAC); \
assemble_name (FILE, NAME); \
putc ('-', FILE); \
- if (current_function_func_begin_label != NULL) \
- { \
- assemble_name (FILE, current_function_func_begin_label); \
- } \
- else \
- { \
- s = XSTR (XEXP (DECL_RTL (current_function_decl), 0), 0); \
- rs6000_output_function_entry (FILE, s); \
- } \
+ s = XSTR (XEXP (DECL_RTL (current_function_decl), 0), 0); \
+ rs6000_output_function_entry (FILE, s); \
putc ('\n', FILE); \
} \
while (0)
diff --git a/gcc/config/sh/elf.h b/gcc/config/sh/elf.h
index 2a0527ffef1..b069308ea8c 100644
--- a/gcc/config/sh/elf.h
+++ b/gcc/config/sh/elf.h
@@ -83,24 +83,8 @@ Boston, MA 02111-1307, USA. */
#define ASM_GENERATE_INTERNAL_LABEL(STRING, PREFIX, NUM) \
sprintf ((STRING), "*%s%s%ld", LOCAL_LABEL_PREFIX, (PREFIX), (long)(NUM))
-#undef ASM_OUTPUT_SOURCE_LINE
-#define ASM_OUTPUT_SOURCE_LINE(file, line, counter) \
-do \
- { \
- asm_fprintf ((file), ".stabn 68,0,%d,%LLM%d-", \
- (line), (counter)); \
- assemble_name ((file), \
- XSTR (XEXP (DECL_RTL (current_function_decl), 0), 0));\
- asm_fprintf ((file), "\n%LLM%d:\n", (counter)); \
- } \
-while (0)
-
-#undef DBX_OUTPUT_MAIN_SOURCE_FILE_END
-#define DBX_OUTPUT_MAIN_SOURCE_FILE_END(FILE, FILENAME) \
-do { \
- text_section (); \
- asm_fprintf ((FILE), "\t.stabs \"\",%d,0,0,%LLetext\n%LLetext:\n", N_SO); \
-} while (0)
+#define DBX_LINES_FUNCTION_RELATIVE 1
+#define DBX_OUTPUT_NULL_N_SO_AT_MAIN_SOURCE_FILE_END
#undef STARTFILE_SPEC
#define STARTFILE_SPEC \
diff --git a/gcc/config/vax/elf.h b/gcc/config/vax/elf.h
index 533ce92b8bd..43757ebdfee 100644
--- a/gcc/config/vax/elf.h
+++ b/gcc/config/vax/elf.h
@@ -42,9 +42,6 @@ Boston, MA 02111-1307, USA. */
/* Let's be re-entrant. */
#undef PCC_STATIC_STRUCT_RETURN
-/* Make sure .stabs for a function are always the same section. */
-#define DBX_OUTPUT_FUNCTION_END(file,decl) function_section(decl)
-
/* Before the prologue, the top of the frame is below the argument
count pushed by the CALLS and before the start of the saved registers. */
#define INCOMING_FRAME_SP_OFFSET 0
diff --git a/gcc/dbxout.c b/gcc/dbxout.c
index bab43cb5f34..df5b4b0b5b1 100644
--- a/gcc/dbxout.c
+++ b/gcc/dbxout.c
@@ -79,7 +79,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#include "regs.h"
#include "insn-config.h"
#include "reload.h"
-#include "output.h" /* ASM_OUTPUT_SOURCE_LINE may refer to sdb functions. */
+#include "output.h"
#include "dbxout.h"
#include "toplev.h"
#include "tm_p.h"
@@ -154,6 +154,14 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#define NO_DBX_BNSYM_ENSYM 0
#endif
+#ifndef DBX_BLOCKS_FUNCTION_RELATIVE
+#define DBX_BLOCKS_FUNCTION_RELATIVE 0
+#endif
+
+#ifndef DBX_LINES_FUNCTION_RELATIVE
+#define DBX_LINES_FUNCTION_RELATIVE 0
+#endif
+
enum typestatus {TYPE_UNSEEN, TYPE_XREF, TYPE_DEFINED};
/* Structure recording information about a C data type.
@@ -299,10 +307,6 @@ static const char *cwd;
#define DEBUGGER_ARG_OFFSET(OFFSET, X) (OFFSET)
#endif
-/* Stream for writing to assembler file. */
-
-static FILE *asmfile;
-
/* These variables are for dbxout_symbol to communicate to
dbxout_finish_symbol.
current_sym_code is the symbol-type-code, a symbol N_... define in stab.h.
@@ -468,7 +472,7 @@ dbxout_function_end (void)
the system doesn't insert underscores in front of user generated
labels. */
ASM_GENERATE_INTERNAL_LABEL (lscope_label_name, "Lscope", scope_labelno);
- targetm.asm_out.internal_label (asmfile, "Lscope", scope_labelno);
+ targetm.asm_out.internal_label (asm_out_file, "Lscope", scope_labelno);
scope_labelno++;
/* The N_FUN tag at the end of the function is a GNU extension,
@@ -482,17 +486,17 @@ dbxout_function_end (void)
/* By convention, GCC will mark the end of a function with an N_FUN
symbol and an empty string. */
#ifdef DBX_OUTPUT_NFUN
- DBX_OUTPUT_NFUN (asmfile, lscope_label_name, current_function_decl);
+ DBX_OUTPUT_NFUN (asm_out_file, lscope_label_name, current_function_decl);
#else
- fprintf (asmfile, "%s\"\",%d,0,0,", ASM_STABS_OP, N_FUN);
- assemble_name (asmfile, lscope_label_name);
- putc ('-', asmfile);
- assemble_name (asmfile, XSTR (XEXP (DECL_RTL (current_function_decl), 0), 0));
- fprintf (asmfile, "\n");
+ fprintf (asm_out_file, "%s\"\",%d,0,0,", ASM_STABS_OP, N_FUN);
+ assemble_name (asm_out_file, lscope_label_name);
+ putc ('-', asm_out_file);
+ assemble_name (asm_out_file, XSTR (XEXP (DECL_RTL (current_function_decl), 0), 0));
+ fprintf (asm_out_file, "\n");
#endif
if (!NO_DBX_BNSYM_ENSYM && !flag_debug_only_used_symbols)
- fprintf (asmfile, "%s%d,0,0\n", ASM_STABD_OP, N_ENSYM);
+ fprintf (asm_out_file, "%s%d,0,0\n", ASM_STABD_OP, N_ENSYM);
}
#endif /* DBX_DEBUGGING_INFO */
@@ -531,8 +535,6 @@ dbxout_init (const char *input_file_name)
char ltext_label_name[100];
tree syms = lang_hooks.decls.getdecls ();
- asmfile = asm_out_file;
-
typevec_len = 100;
typevec = ggc_calloc (typevec_len, sizeof typevec[0]);
@@ -550,37 +552,37 @@ dbxout_init (const char *input_file_name)
if (cwd)
{
#ifdef DBX_OUTPUT_MAIN_SOURCE_DIRECTORY
- DBX_OUTPUT_MAIN_SOURCE_DIRECTORY (asmfile, cwd);
+ DBX_OUTPUT_MAIN_SOURCE_DIRECTORY (asm_out_file, cwd);
#else /* no DBX_OUTPUT_MAIN_SOURCE_DIRECTORY */
- fprintf (asmfile, "%s", ASM_STABS_OP);
- output_quoted_string (asmfile, cwd);
- fprintf (asmfile, ",%d,0,%d,", N_SO, get_lang_number ());
- assemble_name (asmfile, ltext_label_name);
- fputc ('\n', asmfile);
+ fprintf (asm_out_file, "%s", ASM_STABS_OP);
+ output_quoted_string (asm_out_file, cwd);
+ fprintf (asm_out_file, ",%d,0,%d,", N_SO, get_lang_number ());
+ assemble_name (asm_out_file, ltext_label_name);
+ fputc ('\n', asm_out_file);
#endif /* no DBX_OUTPUT_MAIN_SOURCE_DIRECTORY */
}
}
#ifdef DBX_OUTPUT_MAIN_SOURCE_FILENAME
- DBX_OUTPUT_MAIN_SOURCE_FILENAME (asmfile, input_file_name);
+ DBX_OUTPUT_MAIN_SOURCE_FILENAME (asm_out_file, input_file_name);
#else /* no DBX_OUTPUT_MAIN_SOURCE_FILENAME */
/* We include outputting `Ltext:' here,
because that gives you a way to override it. */
/* Used to put `Ltext:' before the reference, but that loses on sun 4. */
- fprintf (asmfile, "%s", ASM_STABS_OP);
- output_quoted_string (asmfile, input_file_name);
- fprintf (asmfile, ",%d,0,%d,", N_SO, get_lang_number ());
- assemble_name (asmfile, ltext_label_name);
- fputc ('\n', asmfile);
+ fprintf (asm_out_file, "%s", ASM_STABS_OP);
+ output_quoted_string (asm_out_file, input_file_name);
+ fprintf (asm_out_file, ",%d,0,%d,", N_SO, get_lang_number ());
+ assemble_name (asm_out_file, ltext_label_name);
+ fputc ('\n', asm_out_file);
text_section ();
- targetm.asm_out.internal_label (asmfile, "Ltext", 0);
+ targetm.asm_out.internal_label (asm_out_file, "Ltext", 0);
#endif /* no DBX_OUTPUT_MAIN_SOURCE_FILENAME */
#ifdef DBX_OUTPUT_GCC_MARKER
- DBX_OUTPUT_GCC_MARKER (asmfile);
+ DBX_OUTPUT_GCC_MARKER (asm_out_file);
#else
/* Emit an N_OPT stab to indicate that this file was compiled by GCC. */
- fprintf (asmfile, "%s\"%s\",%d,0,0,0\n",
+ fprintf (asm_out_file, "%s\"%s\",%d,0,0,0\n",
ASM_STABS_OP, STABS_GCC_MARKER, N_OPT);
#endif
@@ -639,9 +641,9 @@ dbxout_typedefs (tree syms)
static void
emit_bincl_stab (const char *name)
{
- fprintf (asmfile, "%s", ASM_STABS_OP);
- output_quoted_string (asmfile, name);
- fprintf (asmfile, ",%d,0,0,0\n", N_BINCL);
+ fprintf (asm_out_file, "%s", ASM_STABS_OP);
+ output_quoted_string (asm_out_file, name);
+ fprintf (asm_out_file, ",%d,0,0,0\n", N_BINCL);
}
/* If there are pending bincls then it is time to emit all of them. */
@@ -723,7 +725,7 @@ dbxout_end_source_file (unsigned int line ATTRIBUTE_UNUSED)
#ifdef DBX_USE_BINCL
/* Emit EINCL stab only if BINCL is not pending. */
if (current_file->bincl_status == BINCL_PROCESSED)
- fprintf (asmfile, "%s%d,0,0,0\n", ASM_STABN_OP, N_EINCL);
+ fprintf (asm_out_file, "%s%d,0,0,0\n", ASM_STABN_OP, N_EINCL);
current_file->bincl_status = BINCL_NOT_REQUIRED;
current_file = current_file->next;
#endif
@@ -774,9 +776,9 @@ dbxout_source_file (FILE *file, const char *filename)
source_label_number);
fprintf (file, "%s", ASM_STABS_OP);
output_quoted_string (file, filename);
- fprintf (asmfile, ",%d,0,0,", N_SOL);
- assemble_name (asmfile, ltext_label_name);
- fputc ('\n', asmfile);
+ fprintf (asm_out_file, ",%d,0,0,", N_SOL);
+ assemble_name (asm_out_file, ltext_label_name);
+ fputc ('\n', asm_out_file);
if (current_function_decl != NULL_TREE
&& DECL_SECTION_NAME (current_function_decl) != NULL_TREE)
; /* Don't change section amid function. */
@@ -800,7 +802,7 @@ dbxout_begin_prologue (unsigned int lineno, const char *filename)
&& !NO_DBX_FUNCTION_END
&& !NO_DBX_BNSYM_ENSYM
&& !flag_debug_only_used_symbols)
- fprintf (asmfile, "%s%d,0,0\n", ASM_STABD_OP, N_BNSYM);
+ fprintf (asm_out_file, "%s%d,0,0\n", ASM_STABD_OP, N_BNSYM);
dbxout_source_line (lineno, filename);
}
@@ -811,13 +813,29 @@ dbxout_begin_prologue (unsigned int lineno, const char *filename)
static void
dbxout_source_line (unsigned int lineno, const char *filename)
{
- dbxout_source_file (asmfile, filename);
+ dbxout_source_file (asm_out_file, filename);
-#ifdef ASM_OUTPUT_SOURCE_LINE
+#ifdef DBX_OUTPUT_SOURCE_LINE
dbxout_source_line_counter += 1;
- ASM_OUTPUT_SOURCE_LINE (asmfile, lineno, dbxout_source_line_counter);
+ DBX_OUTPUT_SOURCE_LINE (asm_out_file, lineno, dbxout_source_line_counter);
#else
- fprintf (asmfile, "%s%d,0,%d\n", ASM_STABD_OP, N_SLINE, lineno);
+ if (DBX_LINES_FUNCTION_RELATIVE)
+ {
+ char label[100];
+ dbxout_source_line_counter += 1;
+
+ ASM_GENERATE_INTERNAL_LABEL (label, "LM", dbxout_source_line_counter);
+ fprintf (asm_out_file, "%s%d,0,%d,", ASM_STABN_OP, N_SLINE, lineno);
+ assemble_name (asm_out_file, label);
+ putc ('-', asm_out_file);
+ assemble_name (asm_out_file,
+ XSTR (XEXP (DECL_RTL (current_function_decl), 0), 0));
+ putc ('\n', asm_out_file);
+ targetm.asm_out.internal_label (asm_out_file, "LM",
+ dbxout_source_line_counter);
+ }
+ else
+ fprintf (asm_out_file, "%s%d,0,%d\n", ASM_STABD_OP, N_SLINE, lineno);
#endif
}
@@ -827,7 +845,7 @@ static void
dbxout_begin_block (unsigned int line ATTRIBUTE_UNUSED, unsigned int n)
{
emit_pending_bincls_if_required ();
- targetm.asm_out.internal_label (asmfile, "LBB", n);
+ targetm.asm_out.internal_label (asm_out_file, "LBB", n);
}
/* Describe the end line-number of an internal block within a function. */
@@ -836,7 +854,7 @@ static void
dbxout_end_block (unsigned int line ATTRIBUTE_UNUSED, unsigned int n)
{
emit_pending_bincls_if_required ();
- targetm.asm_out.internal_label (asmfile, "LBE", n);
+ targetm.asm_out.internal_label (asm_out_file, "LBE", n);
}
/* Output dbx data for a function definition.
@@ -854,7 +872,7 @@ dbxout_function_decl (tree decl)
#endif
dbxout_block (DECL_INITIAL (decl), 0, DECL_ARGUMENTS (decl));
#ifdef DBX_OUTPUT_FUNCTION_END
- DBX_OUTPUT_FUNCTION_END (asmfile, decl);
+ DBX_OUTPUT_FUNCTION_END (asm_out_file, decl);
#endif
dbxout_function_end ();
}
@@ -886,16 +904,23 @@ dbxout_type_decl (tree decl, int local)
}
/* At the end of compilation, finish writing the symbol table.
- Unless you define DBX_OUTPUT_MAIN_SOURCE_FILE_END, the default is
- to do nothing. */
+ The default is to call debug_free_queue but do nothing else. */
static void
dbxout_finish (const char *filename ATTRIBUTE_UNUSED)
{
#ifdef DBX_OUTPUT_MAIN_SOURCE_FILE_END
- DBX_OUTPUT_MAIN_SOURCE_FILE_END (asmfile, filename);
-#endif /* DBX_OUTPUT_MAIN_SOURCE_FILE_END */
-
+ DBX_OUTPUT_MAIN_SOURCE_FILE_END (asm_out_file, filename);
+#elif defined DBX_OUTPUT_NULL_N_SO_AT_MAIN_SOURCE_FILE_END
+ {
+ char letext_label[100];
+ ASM_GENERATE_INTERNAL_LABEL (letext_label, "Letext", 0);
+ fprintf (asm_out_file, "%s\"\",%d,0,0,", ASM_STABS_OP, N_SO);
+ assemble_name (asm_out_file, letext_label);
+ putc ('\n', asm_out_file);
+ targetm.asm_out.internal_label (asm_out_file, "Letext", 0);
+ }
+#endif
debug_free_queue ();
}
@@ -905,11 +930,11 @@ static void
dbxout_type_index (tree type)
{
#ifndef DBX_USE_BINCL
- fprintf (asmfile, "%d", TYPE_SYMTAB_ADDRESS (type));
+ fprintf (asm_out_file, "%d", TYPE_SYMTAB_ADDRESS (type));
CHARS (3);
#else
struct typeinfo *t = &typevec[TYPE_SYMTAB_ADDRESS (type)];
- fprintf (asmfile, "(%d,%d)", t->file_number, t->type_number);
+ fprintf (asm_out_file, "(%d,%d)", t->file_number, t->type_number);
CHARS (9);
#endif
}
@@ -926,12 +951,12 @@ dbxout_continue (void)
{
emit_pending_bincls_if_required ();
#ifdef DBX_CONTIN_CHAR
- fprintf (asmfile, "%c", DBX_CONTIN_CHAR);
+ fprintf (asm_out_file, "%c", DBX_CONTIN_CHAR);
#else
- fprintf (asmfile, "\\\\");
+ fprintf (asm_out_file, "\\\\");
#endif
dbxout_finish_symbol (NULL_TREE);
- fprintf (asmfile, "%s\"", ASM_STABS_OP);
+ fprintf (asm_out_file, "%s\"", ASM_STABS_OP);
current_sym_nchars = 0;
}
#endif /* DBX_CONTIN_LENGTH > 0 */
@@ -975,12 +1000,12 @@ dbxout_type_fields (tree type)
if (DECL_NAME (tem))
{
- fprintf (asmfile, "%s:", IDENTIFIER_POINTER (DECL_NAME (tem)));
+ fprintf (asm_out_file, "%s:", IDENTIFIER_POINTER (DECL_NAME (tem)));
CHARS (2 + IDENTIFIER_LENGTH (DECL_NAME (tem)));
}
else
{
- fprintf (asmfile, ":");
+ fprintf (asm_out_file, ":");
CHARS (1);
}
@@ -989,10 +1014,10 @@ dbxout_type_fields (tree type)
|| TREE_CODE (tem) != FIELD_DECL))
{
have_used_extensions = 1;
- putc ('/', asmfile);
+ putc ('/', asm_out_file);
putc ((TREE_PRIVATE (tem) ? '0'
: TREE_PROTECTED (tem) ? '1' : '2'),
- asmfile);
+ asm_out_file);
CHARS (2);
}
@@ -1007,23 +1032,23 @@ dbxout_type_fields (tree type)
tree name = DECL_ASSEMBLER_NAME (tem);
have_used_extensions = 1;
- fprintf (asmfile, ":%s;", IDENTIFIER_POINTER (name));
+ fprintf (asm_out_file, ":%s;", IDENTIFIER_POINTER (name));
CHARS (IDENTIFIER_LENGTH (name) + 2);
}
else
{
/* If TEM is non-static, GDB won't understand it. */
- fprintf (asmfile, ",0,0;");
+ fprintf (asm_out_file, ",0,0;");
CHARS (5);
}
}
else
{
- putc (',', asmfile);
+ putc (',', asm_out_file);
print_wide_int (int_bit_position (tem));
- putc (',', asmfile);
+ putc (',', asm_out_file);
print_wide_int (tree_low_cst (DECL_SIZE (tem), 1));
- putc (';', asmfile);
+ putc (';', asm_out_file);
CHARS (3);
}
}
@@ -1060,7 +1085,7 @@ dbxout_type_method_1 (tree decl, const char *debug_name)
c2 = '.';
}
- fprintf (asmfile, ":%s;%c%c%c", debug_name,
+ fprintf (asm_out_file, ":%s;%c%c%c", debug_name,
TREE_PRIVATE (decl) ? '0'
: TREE_PROTECTED (decl) ? '1' : '2', c1, c2);
CHARS (IDENTIFIER_LENGTH (DECL_ASSEMBLER_NAME (decl)) + 6
@@ -1069,10 +1094,10 @@ dbxout_type_method_1 (tree decl, const char *debug_name)
if (DECL_VINDEX (decl) && host_integerp (DECL_VINDEX (decl), 0))
{
print_wide_int (tree_low_cst (DECL_VINDEX (decl), 0));
- putc (';', asmfile);
+ putc (';', asm_out_file);
CHARS (1);
dbxout_type (DECL_CONTEXT (decl), 0);
- fprintf (asmfile, ";");
+ fprintf (asm_out_file, ";");
CHARS (1);
}
}
@@ -1096,24 +1121,6 @@ dbxout_type_methods (tree type)
type_encoding = DECL_NAME (TYPE_NAME (type));
-#if 0
- /* C++: Template classes break some assumptions made by this code about
- the class names, constructor names, and encodings for assembler
- label names. For now, disable output of dbx info for them. */
- {
- const char *ptr = IDENTIFIER_POINTER (type_encoding);
- /* This should use index. (mrs) */
- while (*ptr && *ptr != '<') ptr++;
- if (*ptr != 0)
- {
- static int warned;
- if (!warned)
- warned = 1;
- return;
- }
- }
-#endif
-
type_identifier_length = IDENTIFIER_LENGTH (type_encoding);
sprintf (formatted_type_identifier_length, "%d", type_identifier_length);
@@ -1164,7 +1171,7 @@ dbxout_type_methods (tree type)
if (need_prefix)
{
tree name = DECL_NAME (fndecl);
- fprintf (asmfile, "%s::", IDENTIFIER_POINTER (name));
+ fprintf (asm_out_file, "%s::", IDENTIFIER_POINTER (name));
CHARS (IDENTIFIER_LENGTH (name) + 2);
need_prefix = 0;
}
@@ -1175,7 +1182,7 @@ dbxout_type_methods (tree type)
}
if (!need_prefix)
{
- putc (';', asmfile);
+ putc (';', asm_out_file);
CHARS (1);
}
}
@@ -1188,7 +1195,7 @@ dbxout_type_methods (tree type)
static void
dbxout_range_type (tree type)
{
- fprintf (asmfile, "r");
+ fprintf (asm_out_file, "r");
if (TREE_TYPE (type))
dbxout_type (TREE_TYPE (type), 0);
else if (TREE_CODE (type) != INTEGER_TYPE)
@@ -1216,7 +1223,7 @@ dbxout_range_type (tree type)
if (TYPE_MIN_VALUE (type) != 0
&& host_integerp (TYPE_MIN_VALUE (type), 0))
{
- putc (';', asmfile);
+ putc (';', asm_out_file);
CHARS (1);
if (print_int_cst_bounds_in_octal_p (type))
print_int_cst_octal (TYPE_MIN_VALUE (type));
@@ -1225,25 +1232,25 @@ dbxout_range_type (tree type)
}
else
{
- fprintf (asmfile, ";0");
+ fprintf (asm_out_file, ";0");
CHARS (2);
}
if (TYPE_MAX_VALUE (type) != 0
&& host_integerp (TYPE_MAX_VALUE (type), 0))
{
- putc (';', asmfile);
+ putc (';', asm_out_file);
CHARS (1);
if (print_int_cst_bounds_in_octal_p (type))
print_int_cst_octal (TYPE_MAX_VALUE (type));
else
print_wide_int (tree_low_cst (TYPE_MAX_VALUE (type), 0));
- putc (';', asmfile);
+ putc (';', asm_out_file);
CHARS (1);
}
else
{
- fprintf (asmfile, ";-1;");
+ fprintf (asm_out_file, ";-1;");
CHARS (4);
}
}
@@ -1391,7 +1398,7 @@ dbxout_type (tree type, int full)
/* Output a definition now. */
- fprintf (asmfile, "=");
+ fprintf (asm_out_file, "=");
CHARS (1);
/* Mark it as defined, so that if it is self-referent
@@ -1404,14 +1411,14 @@ dbxout_type (tree type, int full)
cv-qualified types if we're using extensions. */
if (TYPE_READONLY (type) > TYPE_READONLY (main_variant))
{
- putc ('k', asmfile);
+ putc ('k', asm_out_file);
CHARS (1);
dbxout_type (build_type_variant (type, 0, TYPE_VOLATILE (type)), 0);
return;
}
else if (TYPE_VOLATILE (type) > TYPE_VOLATILE (main_variant))
{
- putc ('B', asmfile);
+ putc ('B', asm_out_file);
CHARS (1);
dbxout_type (build_type_variant (type, TYPE_READONLY (type), 0), 0);
return;
@@ -1456,10 +1463,10 @@ dbxout_type (tree type, int full)
from the output of pcc.
This used to use `r2' explicitly and we used to
take care to make sure that `char' was type number 2. */
- fprintf (asmfile, "r");
+ fprintf (asm_out_file, "r");
CHARS (1);
dbxout_type_index (type);
- fprintf (asmfile, ";0;127;");
+ fprintf (asm_out_file, ";0;127;");
CHARS (7);
}
@@ -1475,7 +1482,7 @@ dbxout_type (tree type, int full)
&& TYPE_PRECISION (type) != TYPE_PRECISION (integer_type_node))
{
have_used_extensions = 1;
- fprintf (asmfile, "@s%d;", TYPE_PRECISION (type));
+ fprintf (asm_out_file, "@s%d;", TYPE_PRECISION (type));
CHARS (5);
}
@@ -1491,13 +1498,13 @@ dbxout_type (tree type, int full)
&& TYPE_PRECISION (type) != TYPE_PRECISION (integer_type_node))
{
have_used_extensions = 1;
- fprintf (asmfile, "@s%d;", TYPE_PRECISION (type));
+ fprintf (asm_out_file, "@s%d;", TYPE_PRECISION (type));
CHARS (5);
}
if (print_int_cst_bounds_in_octal_p (type))
{
- fprintf (asmfile, "r");
+ fprintf (asm_out_file, "r");
CHARS (1);
/* If this type derives from another type, output type index of
@@ -1510,13 +1517,13 @@ dbxout_type (tree type, int full)
else
dbxout_type_index (type);
- fprintf (asmfile, ";");
+ fprintf (asm_out_file, ";");
CHARS (1);
print_int_cst_octal (TYPE_MIN_VALUE (type));
- fprintf (asmfile, ";");
+ fprintf (asm_out_file, ";");
CHARS (1);
print_int_cst_octal (TYPE_MAX_VALUE (type));
- fprintf (asmfile, ";");
+ fprintf (asm_out_file, ";");
CHARS (1);
}
@@ -1530,13 +1537,13 @@ dbxout_type (tree type, int full)
case REAL_TYPE:
/* This used to say `r1' and we used to take care
to make sure that `int' was type number 1. */
- fprintf (asmfile, "r");
+ fprintf (asm_out_file, "r");
CHARS (1);
dbxout_type_index (integer_type_node);
- putc (';', asmfile);
+ putc (';', asm_out_file);
CHARS (1);
print_wide_int (int_size_in_bytes (type));
- fputs (";0;", asmfile);
+ fputs (";0;", asm_out_file);
CHARS (3);
break;
@@ -1544,20 +1551,20 @@ dbxout_type (tree type, int full)
if (use_gnu_debug_info_extensions)
{
have_used_extensions = 1;
- fputs ("@s", asmfile);
+ fputs ("@s", asm_out_file);
CHARS (2);
print_wide_int (BITS_PER_UNIT * int_size_in_bytes (type));
- fputs (";-20;", asmfile);
+ fputs (";-20;", asm_out_file);
CHARS (4);
}
else
{
/* Output the type `char' as a subrange of itself.
That is what pcc seems to do. */
- fprintf (asmfile, "r");
+ fprintf (asm_out_file, "r");
CHARS (1);
dbxout_type_index (char_type_node);
- fprintf (asmfile, ";0;%d;", TYPE_UNSIGNED (type) ? 255 : 127);
+ fprintf (asm_out_file, ";0;%d;", TYPE_UNSIGNED (type) ? 255 : 127);
CHARS (7);
}
break;
@@ -1566,21 +1573,21 @@ dbxout_type (tree type, int full)
if (use_gnu_debug_info_extensions)
{
have_used_extensions = 1;
- fputs ("@s", asmfile);
+ fputs ("@s", asm_out_file);
CHARS (2);
print_wide_int (BITS_PER_UNIT * int_size_in_bytes (type));
- fputs (";-16;", asmfile);
+ fputs (";-16;", asm_out_file);
CHARS (4);
}
else /* Define as enumeral type (False, True) */
{
- fprintf (asmfile, "eFalse:0,True:1,;");
+ fprintf (asm_out_file, "eFalse:0,True:1,;");
CHARS (17);
}
break;
case FILE_TYPE:
- putc ('d', asmfile);
+ putc ('d', asm_out_file);
CHARS (1);
dbxout_type (TREE_TYPE (type), 0);
break;
@@ -1592,29 +1599,29 @@ dbxout_type (tree type, int full)
if (TREE_CODE (TREE_TYPE (type)) == REAL_TYPE)
{
- fputs ("R3;", asmfile);
+ fputs ("R3;", asm_out_file);
CHARS (3);
print_wide_int (2 * int_size_in_bytes (TREE_TYPE (type)));
- fputs (";0;", asmfile);
+ fputs (";0;", asm_out_file);
CHARS (3);
}
else
{
/* Output a complex integer type as a structure,
pending some other way to do it. */
- putc ('s', asmfile);
+ putc ('s', asm_out_file);
CHARS (1);
print_wide_int (int_size_in_bytes (type));
- fprintf (asmfile, "real:");
+ fprintf (asm_out_file, "real:");
CHARS (5);
dbxout_type (TREE_TYPE (type), 0);
- fprintf (asmfile, ",0,%d;", TYPE_PRECISION (TREE_TYPE (type)));
+ fprintf (asm_out_file, ",0,%d;", TYPE_PRECISION (TREE_TYPE (type)));
CHARS (7);
- fprintf (asmfile, "imag:");
+ fprintf (asm_out_file, "imag:");
CHARS (5);
dbxout_type (TREE_TYPE (type), 0);
- fprintf (asmfile, ",%d,%d;;", TYPE_PRECISION (TREE_TYPE (type)),
+ fprintf (asm_out_file, ",%d,%d;;", TYPE_PRECISION (TREE_TYPE (type)),
TYPE_PRECISION (TREE_TYPE (type)));
CHARS (10);
}
@@ -1624,21 +1631,21 @@ dbxout_type (tree type, int full)
if (use_gnu_debug_info_extensions)
{
have_used_extensions = 1;
- fputs ("@s", asmfile);
+ fputs ("@s", asm_out_file);
CHARS (2);
print_wide_int (BITS_PER_UNIT * int_size_in_bytes (type));
- putc (';', asmfile);
+ putc (';', asm_out_file);
CHARS (1);
/* Check if a bitstring type, which in Chill is
different from a [power]set. */
if (TYPE_STRING_FLAG (type))
{
- fprintf (asmfile, "@S;");
+ fprintf (asm_out_file, "@S;");
CHARS (3);
}
}
- putc ('S', asmfile);
+ putc ('S', asm_out_file);
CHARS (1);
dbxout_type (TYPE_DOMAIN (type), 0);
break;
@@ -1648,10 +1655,10 @@ dbxout_type (tree type, int full)
if (TYPE_PACKED (type) && use_gnu_debug_info_extensions)
{
have_used_extensions = 1;
- fputs ("@s", asmfile);
+ fputs ("@s", asm_out_file);
CHARS (2);
print_wide_int (BITS_PER_UNIT * int_size_in_bytes (type));
- fprintf (asmfile, ";@S;S");
+ fprintf (asm_out_file, ";@S;S");
CHARS (5);
dbxout_type (TYPE_DOMAIN (type), 0);
break;
@@ -1666,21 +1673,21 @@ dbxout_type (tree type, int full)
if (TYPE_STRING_FLAG (type) && use_gnu_debug_info_extensions)
{
have_used_extensions = 1;
- fprintf (asmfile, "@S;");
+ fprintf (asm_out_file, "@S;");
CHARS (3);
}
tem = TYPE_DOMAIN (type);
if (tem == NULL)
{
- fprintf (asmfile, "ar");
+ fprintf (asm_out_file, "ar");
CHARS (2);
dbxout_type_index (integer_type_node);
- fprintf (asmfile, ";0;-1;");
+ fprintf (asm_out_file, ";0;-1;");
CHARS (6);
}
else
{
- fprintf (asmfile, "a");
+ fprintf (asm_out_file, "a");
CHARS (1);
dbxout_range_type (tem);
}
@@ -1711,30 +1718,24 @@ dbxout_type (tree type, int full)
If the type has a name, don't nest its definition within
another type's definition; instead, output an xref
and let the definition come when the name is defined. */
- fputs ((TREE_CODE (type) == RECORD_TYPE) ? "xs" : "xu", asmfile);
+ fputs ((TREE_CODE (type) == RECORD_TYPE) ? "xs" : "xu", asm_out_file);
CHARS (2);
-#if 0 /* This assertion is legitimately false in C++. */
- /* We shouldn't be outputting a reference to a type before its
- definition unless the type has a tag name.
- A typedef name without a tag name should be impossible. */
- gcc_assert (TREE_CODE (TYPE_NAME (type)) == IDENTIFIER_NODE);
-#endif
if (TYPE_NAME (type) != 0)
dbxout_type_name (type);
else
{
- fprintf (asmfile, "$$%d", anonymous_type_number++);
+ fprintf (asm_out_file, "$$%d", anonymous_type_number++);
CHARS (5);
}
- fprintf (asmfile, ":");
+ fprintf (asm_out_file, ":");
CHARS (1);
typevec[TYPE_SYMTAB_ADDRESS (type)].status = TYPE_XREF;
break;
}
/* Identify record or union, and print its size. */
- putc (((TREE_CODE (type) == RECORD_TYPE) ? 's' : 'u'), asmfile);
+ putc (((TREE_CODE (type) == RECORD_TYPE) ? 's' : 'u'), asm_out_file);
CHARS (1);
print_wide_int (int_size_in_bytes (type));
@@ -1749,7 +1750,7 @@ dbxout_type (tree type, int full)
if (BINFO_N_BASE_BINFOS (binfo))
{
have_used_extensions = 1;
- fprintf (asmfile, "!%u,", BINFO_N_BASE_BINFOS (binfo));
+ fprintf (asm_out_file, "!%u,", BINFO_N_BASE_BINFOS (binfo));
CHARS (8);
}
}
@@ -1761,10 +1762,10 @@ dbxout_type (tree type, int full)
if (use_gnu_debug_info_extensions)
{
have_used_extensions = 1;
- putc (BINFO_VIRTUAL_P (child) ? '1' : '0', asmfile);
+ putc (BINFO_VIRTUAL_P (child) ? '1' : '0', asm_out_file);
putc (access == access_public_node ? '2' :
(access == access_protected_node ? '1' :'0'),
- asmfile);
+ asm_out_file);
CHARS (2);
if (BINFO_VIRTUAL_P (child)
&& strcmp (lang_hooks.name, "GNU C++") == 0)
@@ -1777,10 +1778,10 @@ dbxout_type (tree type, int full)
else
print_wide_int (tree_low_cst (BINFO_OFFSET (child), 0)
* BITS_PER_UNIT);
- putc (',', asmfile);
+ putc (',', asm_out_file);
CHARS (1);
dbxout_type (BINFO_TYPE (child), 0);
- putc (';', asmfile);
+ putc (';', asm_out_file);
CHARS (1);
}
else
@@ -1789,19 +1790,19 @@ dbxout_type (tree type, int full)
fields which have the same names at the types
they hold. */
dbxout_type_name (BINFO_TYPE (child));
- putc (':', asmfile);
+ putc (':', asm_out_file);
CHARS (1);
dbxout_type (BINFO_TYPE (child), full);
- putc (',', asmfile);
+ putc (',', asm_out_file);
CHARS (1);
print_wide_int (tree_low_cst (BINFO_OFFSET (child), 0)
* BITS_PER_UNIT);
- putc (',', asmfile);
+ putc (',', asm_out_file);
CHARS (1);
print_wide_int
(tree_low_cst (TYPE_SIZE (BINFO_TYPE (child)), 0)
* BITS_PER_UNIT);
- putc (';', asmfile);
+ putc (';', asm_out_file);
CHARS (1);
}
}
@@ -1816,7 +1817,7 @@ dbxout_type (tree type, int full)
dbxout_type_methods (type);
}
- putc (';', asmfile);
+ putc (';', asm_out_file);
CHARS (1);
if (use_gnu_debug_info_extensions && TREE_CODE (type) == RECORD_TYPE
@@ -1826,7 +1827,7 @@ dbxout_type (tree type, int full)
have_used_extensions = 1;
/* Tell GDB+ that it may keep reading. */
- putc ('~', asmfile);
+ putc ('~', asm_out_file);
CHARS (1);
/* We need to write out info about what field this class
@@ -1835,12 +1836,12 @@ dbxout_type (tree type, int full)
figure out which field it's using in time. */
if (TYPE_VFIELD (type))
{
- putc ('%', asmfile);
+ putc ('%', asm_out_file);
CHARS (1);
dbxout_type (DECL_FCONTEXT (TYPE_VFIELD (type)), 0);
}
- putc (';', asmfile);
+ putc (';', asm_out_file);
CHARS (1);
}
break;
@@ -1855,26 +1856,26 @@ dbxout_type (tree type, int full)
&& !full)
|| !COMPLETE_TYPE_P (type))
{
- fprintf (asmfile, "xe");
+ fprintf (asm_out_file, "xe");
CHARS (2);
dbxout_type_name (type);
typevec[TYPE_SYMTAB_ADDRESS (type)].status = TYPE_XREF;
- putc (':', asmfile);
+ putc (':', asm_out_file);
CHARS (1);
return;
}
if (use_gnu_debug_info_extensions
&& TYPE_PRECISION (type) != TYPE_PRECISION (integer_type_node))
{
- fprintf (asmfile, "@s%d;", TYPE_PRECISION (type));
+ fprintf (asm_out_file, "@s%d;", TYPE_PRECISION (type));
CHARS (5);
}
- putc ('e', asmfile);
+ putc ('e', asm_out_file);
CHARS (1);
for (tem = TYPE_VALUES (type); tem; tem = TREE_CHAIN (tem))
{
- fprintf (asmfile, "%s:", IDENTIFIER_POINTER (TREE_PURPOSE (tem)));
+ fprintf (asm_out_file, "%s:", IDENTIFIER_POINTER (TREE_PURPOSE (tem)));
CHARS (IDENTIFIER_LENGTH (TREE_PURPOSE (tem)) + 1);
if (TREE_INT_CST_HIGH (TREE_VALUE (tem)) == 0)
print_wide_int (TREE_INT_CST_LOW (TREE_VALUE (tem)));
@@ -1884,18 +1885,18 @@ dbxout_type (tree type, int full)
else
print_int_cst_octal (TREE_VALUE (tem));
- putc (',', asmfile);
+ putc (',', asm_out_file);
CHARS (1);
if (TREE_CHAIN (tem) != 0)
CONTIN;
}
- putc (';', asmfile);
+ putc (';', asm_out_file);
CHARS (1);
break;
case POINTER_TYPE:
- putc ('*', asmfile);
+ putc ('*', asm_out_file);
CHARS (1);
dbxout_type (TREE_TYPE (type), 0);
break;
@@ -1904,16 +1905,16 @@ dbxout_type (tree type, int full)
if (use_gnu_debug_info_extensions)
{
have_used_extensions = 1;
- putc ('#', asmfile);
+ putc ('#', asm_out_file);
CHARS (1);
/* Write the argument types out longhand. */
dbxout_type (TYPE_METHOD_BASETYPE (type), 0);
- putc (',', asmfile);
+ putc (',', asm_out_file);
CHARS (1);
dbxout_type (TREE_TYPE (type), 0);
dbxout_args (TYPE_ARG_TYPES (type));
- putc (';', asmfile);
+ putc (';', asm_out_file);
CHARS (1);
}
else
@@ -1925,10 +1926,10 @@ dbxout_type (tree type, int full)
if (use_gnu_debug_info_extensions)
{
have_used_extensions = 1;
- putc ('@', asmfile);
+ putc ('@', asm_out_file);
CHARS (1);
dbxout_type (TYPE_OFFSET_BASETYPE (type), 0);
- putc (',', asmfile);
+ putc (',', asm_out_file);
CHARS (1);
dbxout_type (TREE_TYPE (type), 0);
}
@@ -1940,13 +1941,13 @@ dbxout_type (tree type, int full)
case REFERENCE_TYPE:
if (use_gnu_debug_info_extensions)
have_used_extensions = 1;
- putc (use_gnu_debug_info_extensions ? '&' : '*', asmfile);
+ putc (use_gnu_debug_info_extensions ? '&' : '*', asm_out_file);
CHARS (1);
dbxout_type (TREE_TYPE (type), 0);
break;
case FUNCTION_TYPE:
- putc ('f', asmfile);
+ putc ('f', asm_out_file);
CHARS (1);
dbxout_type (TREE_TYPE (type), 0);
break;
@@ -2012,7 +2013,7 @@ print_int_cst_octal (tree c)
else
high = 0, low &= (((HOST_WIDE_INT) 1 << width) - 1);
- fprintf (asmfile, "0");
+ fprintf (asm_out_file, "0");
CHARS (1);
if (excess == 3)
@@ -2031,7 +2032,7 @@ print_int_cst_octal (tree c)
<< (HOST_BITS_PER_WIDE_INT / 3 * 3))
- 1);
- fprintf (asmfile, "%o%01o", (int) beg, (int) middle);
+ fprintf (asm_out_file, "%o%01o", (int) beg, (int) middle);
CHARS (2);
print_octal (end, HOST_BITS_PER_WIDE_INT / 3);
}
@@ -2043,7 +2044,7 @@ print_octal (unsigned HOST_WIDE_INT value, int digits)
int i;
for (i = digits - 1; i >= 0; i--)
- fprintf (asmfile, "%01o", (int) ((value >> (3 * i)) & 7));
+ fprintf (asm_out_file, "%01o", (int) ((value >> (3 * i)) & 7));
CHARS (digits);
}
@@ -2055,7 +2056,7 @@ print_wide_int (HOST_WIDE_INT c)
{
int digs = 0;
- fprintf (asmfile, HOST_WIDE_INT_PRINT_DEC, c);
+ fprintf (asm_out_file, HOST_WIDE_INT_PRINT_DEC, c);
if (c < 0)
digs++, c = -c;
@@ -2087,7 +2088,7 @@ dbxout_type_name (tree type)
gcc_unreachable ();
}
- fprintf (asmfile, "%s", IDENTIFIER_POINTER (t));
+ fprintf (asm_out_file, "%s", IDENTIFIER_POINTER (t));
CHARS (IDENTIFIER_LENGTH (t));
}
@@ -2114,7 +2115,7 @@ dbxout_class_name_qualifiers (tree decl)
dbxout_class_name_qualifiers (name);
name = DECL_NAME (name);
}
- fprintf (asmfile, "%s::", IDENTIFIER_POINTER (name));
+ fprintf (asm_out_file, "%s::", IDENTIFIER_POINTER (name));
CHARS (IDENTIFIER_LENGTH (name) + 2);
}
}
@@ -2236,7 +2237,7 @@ dbxout_symbol (tree decl, int local ATTRIBUTE_UNUSED)
break;
FORCE_TEXT;
- fprintf (asmfile, "%s\"%s:%c", ASM_STABS_OP,
+ fprintf (asm_out_file, "%s\"%s:%c", ASM_STABS_OP,
IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl)),
TREE_PUBLIC (decl) ? 'F' : 'f');
result = 1;
@@ -2253,7 +2254,7 @@ dbxout_symbol (tree decl, int local ATTRIBUTE_UNUSED)
mention the containing function name
as well as (since dbx wants it) our own assembler-name. */
if (context != 0)
- fprintf (asmfile, ",%s,%s",
+ fprintf (asm_out_file, ",%s,%s",
IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl)),
IDENTIFIER_POINTER (DECL_NAME (context)));
@@ -2320,14 +2321,14 @@ dbxout_symbol (tree decl, int local ATTRIBUTE_UNUSED)
current_sym_addr = 0;
current_sym_nchars = 2 + IDENTIFIER_LENGTH (name);
- fprintf (asmfile, "%s\"%s:T", ASM_STABS_OP,
+ fprintf (asm_out_file, "%s\"%s:T", ASM_STABS_OP,
IDENTIFIER_POINTER (name));
dbxout_type (type, 1);
dbxout_finish_symbol (NULL_TREE);
}
/* Output .stabs (or whatever) and leading double quote. */
- fprintf (asmfile, "%s\"", ASM_STABS_OP);
+ fprintf (asm_out_file, "%s\"", ASM_STABS_OP);
if (use_gnu_debug_info_extensions)
{
@@ -2336,7 +2337,7 @@ dbxout_symbol (tree decl, int local ATTRIBUTE_UNUSED)
}
/* Output typedef name. */
- fprintf (asmfile, "%s:", IDENTIFIER_POINTER (DECL_NAME (decl)));
+ fprintf (asm_out_file, "%s:", IDENTIFIER_POINTER (DECL_NAME (decl)));
/* Short cut way to output a tag also. */
if ((TREE_CODE (type) == RECORD_TYPE
@@ -2349,16 +2350,12 @@ dbxout_symbol (tree decl, int local ATTRIBUTE_UNUSED)
{
if (use_gnu_debug_info_extensions && have_used_extensions)
{
- putc ('T', asmfile);
+ putc ('T', asm_out_file);
TREE_ASM_WRITTEN (TYPE_NAME (type)) = 1;
}
-#if 0 /* Now we generate the tag for this case up above. */
- else
- tag_needed = 1;
-#endif
}
- putc ('t', asmfile);
+ putc ('t', asm_out_file);
current_sym_code = DBX_TYPE_DECL_STABS_CODE;
dbxout_type (type, 1);
@@ -2389,7 +2386,7 @@ dbxout_symbol (tree decl, int local ATTRIBUTE_UNUSED)
current_sym_addr = 0;
current_sym_nchars = 2 + IDENTIFIER_LENGTH (name);
- fprintf (asmfile, "%s\"%s:T", ASM_STABS_OP,
+ fprintf (asm_out_file, "%s\"%s:T", ASM_STABS_OP,
IDENTIFIER_POINTER (name));
dbxout_type (type, 1);
dbxout_finish_symbol (NULL_TREE);
@@ -2408,7 +2405,7 @@ dbxout_symbol (tree decl, int local ATTRIBUTE_UNUSED)
/* Some debuggers fail when given NULL names, so give this a
harmless name of ` '. */
- fprintf (asmfile, "%s\" :T", ASM_STABS_OP);
+ fprintf (asm_out_file, "%s\" :T", ASM_STABS_OP);
dbxout_type (type, 1);
dbxout_finish_symbol (NULL_TREE);
}
@@ -2451,7 +2448,7 @@ dbxout_symbol (tree decl, int local ATTRIBUTE_UNUSED)
|| TREE_CODE (TREE_TYPE (decl)) == ENUMERAL_TYPE)
{
HOST_WIDE_INT ival = tree_low_cst (DECL_INITIAL (decl), 0);
- fprintf (asmfile, "%s\"%s:c=i" HOST_WIDE_INT_PRINT_DEC
+ fprintf (asm_out_file, "%s\"%s:c=i" HOST_WIDE_INT_PRINT_DEC
"\",0x%x,0,0,0\n",
ASM_STABS_OP, name, ival, N_LSYM);
DBXOUT_DECR_NESTING;
@@ -2718,7 +2715,7 @@ dbxout_symbol_location (tree decl, tree type, const char *suffix, rtx home)
FORCE_TEXT;
#ifdef DBX_STATIC_BLOCK_START
- DBX_STATIC_BLOCK_START (asmfile, current_sym_code);
+ DBX_STATIC_BLOCK_START (asm_out_file, current_sym_code);
#endif
dbxout_symbol_name (decl, suffix, letter);
@@ -2726,7 +2723,7 @@ dbxout_symbol_location (tree decl, tree type, const char *suffix, rtx home)
dbxout_finish_symbol (decl);
#ifdef DBX_STATIC_BLOCK_END
- DBX_STATIC_BLOCK_END (asmfile, current_sym_code);
+ DBX_STATIC_BLOCK_END (asm_out_file, current_sym_code);
#endif
return 1;
}
@@ -2754,22 +2751,16 @@ dbxout_symbol_name (tree decl, const char *suffix, int letter)
if (name == 0)
name = "(anon)";
- fprintf (asmfile, "%s\"%s%s:", ASM_STABS_OP, name,
+ fprintf (asm_out_file, "%s\"%s%s:", ASM_STABS_OP, name,
(suffix ? suffix : ""));
if (letter)
- putc (letter, asmfile);
+ putc (letter, asm_out_file);
}
static void
dbxout_prepare_symbol (tree decl ATTRIBUTE_UNUSED)
{
-#ifdef WINNING_GDB
- const char *filename = DECL_SOURCE_FILE (decl);
-
- dbxout_source_file (asmfile, filename);
-#endif
-
/* Initialize variables used to communicate each symbol's debug
information to dbxout_finish_symbol with zeroes. */
@@ -2789,12 +2780,12 @@ dbxout_finish_symbol (tree sym)
if (use_gnu_debug_info_extensions && sym != 0)
line = DECL_SOURCE_LINE (sym);
- fprintf (asmfile, "\",%d,0,%d,", current_sym_code, line);
+ fprintf (asm_out_file, "\",%d,0,%d,", current_sym_code, line);
if (current_sym_addr)
- output_addr_const (asmfile, current_sym_addr);
+ output_addr_const (asm_out_file, current_sym_addr);
else
- fprintf (asmfile, "%d", current_sym_value);
- putc ('\n', asmfile);
+ fprintf (asm_out_file, "%d", current_sym_value);
+ putc ('\n', asm_out_file);
#endif
}
@@ -2875,14 +2866,14 @@ dbxout_parms (tree parms)
{
current_sym_nchars = 2 + IDENTIFIER_LENGTH (DECL_NAME (parms));
- fprintf (asmfile, "%s\"%s:%c", ASM_STABS_OP,
+ fprintf (asm_out_file, "%s\"%s:%c", ASM_STABS_OP,
IDENTIFIER_POINTER (DECL_NAME (parms)),
DBX_MEMPARM_STABS_LETTER);
}
else
{
current_sym_nchars = 8;
- fprintf (asmfile, "%s\"(anon):%c", ASM_STABS_OP,
+ fprintf (asm_out_file, "%s\"(anon):%c", ASM_STABS_OP,
DBX_MEMPARM_STABS_LETTER);
}
@@ -2940,14 +2931,14 @@ dbxout_parms (tree parms)
if (DECL_NAME (parms))
{
current_sym_nchars = 2 + IDENTIFIER_LENGTH (DECL_NAME (parms));
- fprintf (asmfile, "%s\"%s:%c", ASM_STABS_OP,
+ fprintf (asm_out_file, "%s\"%s:%c", ASM_STABS_OP,
IDENTIFIER_POINTER (DECL_NAME (parms)),
regparm_letter);
}
else
{
current_sym_nchars = 8;
- fprintf (asmfile, "%s\"(anon):%c", ASM_STABS_OP,
+ fprintf (asm_out_file, "%s\"(anon):%c", ASM_STABS_OP,
regparm_letter);
}
@@ -2994,14 +2985,14 @@ dbxout_parms (tree parms)
current_sym_nchars
= 2 + strlen (IDENTIFIER_POINTER (DECL_NAME (parms)));
- fprintf (asmfile, "%s\"%s:%c", ASM_STABS_OP,
+ fprintf (asm_out_file, "%s\"%s:%c", ASM_STABS_OP,
IDENTIFIER_POINTER (DECL_NAME (parms)),
regparm_letter);
}
else
{
current_sym_nchars = 8;
- fprintf (asmfile, "%s\"(anon):%c", ASM_STABS_OP,
+ fprintf (asm_out_file, "%s\"(anon):%c", ASM_STABS_OP,
regparm_letter);
}
@@ -3027,7 +3018,7 @@ dbxout_parms (tree parms)
current_sym_code = N_PSYM;
FORCE_TEXT;
- fprintf (asmfile, "%s\"%s:v", ASM_STABS_OP, decl_name);
+ fprintf (asm_out_file, "%s\"%s:v", ASM_STABS_OP, decl_name);
current_sym_value
= DEBUGGER_ARG_OFFSET (current_sym_value,
@@ -3074,14 +3065,14 @@ dbxout_parms (tree parms)
current_sym_nchars
= 2 + strlen (IDENTIFIER_POINTER (DECL_NAME (parms)));
- fprintf (asmfile, "%s\"%s:%c", ASM_STABS_OP,
+ fprintf (asm_out_file, "%s\"%s:%c", ASM_STABS_OP,
IDENTIFIER_POINTER (DECL_NAME (parms)),
DBX_MEMPARM_STABS_LETTER);
}
else
{
current_sym_nchars = 8;
- fprintf (asmfile, "%s\"(anon):%c", ASM_STABS_OP,
+ fprintf (asm_out_file, "%s\"(anon):%c", ASM_STABS_OP,
DBX_MEMPARM_STABS_LETTER);
}
@@ -3142,7 +3133,7 @@ dbxout_args (tree args)
{
while (args)
{
- putc (',', asmfile);
+ putc (',', asm_out_file);
dbxout_type (TREE_VALUE (args), 0);
CHARS (1);
args = TREE_CHAIN (args);
@@ -3157,15 +3148,16 @@ dbx_output_lbrac (const char *label,
const char *begin_label ATTRIBUTE_UNUSED)
{
#ifdef DBX_OUTPUT_LBRAC
- DBX_OUTPUT_LBRAC (asmfile, label);
+ DBX_OUTPUT_LBRAC (asm_out_file, label);
#else
- fprintf (asmfile, "%s%d,0,0,", ASM_STABN_OP, N_LBRAC);
- assemble_name (asmfile, label);
-#if DBX_BLOCKS_FUNCTION_RELATIVE
- putc ('-', asmfile);
- assemble_name (asmfile, begin_label);
-#endif
- fprintf (asmfile, "\n");
+ fprintf (asm_out_file, "%s%d,0,0,", ASM_STABN_OP, N_LBRAC);
+ assemble_name (asm_out_file, label);
+ if (DBX_BLOCKS_FUNCTION_RELATIVE)
+ {
+ putc ('-', asm_out_file);
+ assemble_name (asm_out_file, begin_label);
+ }
+ fprintf (asm_out_file, "\n");
#endif
}
@@ -3177,15 +3169,16 @@ dbx_output_rbrac (const char *label,
const char *begin_label ATTRIBUTE_UNUSED)
{
#ifdef DBX_OUTPUT_RBRAC
- DBX_OUTPUT_RBRAC (asmfile, label);
+ DBX_OUTPUT_RBRAC (asm_out_file, label);
#else
- fprintf (asmfile, "%s%d,0,0,", ASM_STABN_OP, N_RBRAC);
- assemble_name (asmfile, label);
-#if DBX_BLOCKS_FUNCTION_RELATIVE
- putc ('-', asmfile);
- assemble_name (asmfile, begin_label);
-#endif
- fprintf (asmfile, "\n");
+ fprintf (asm_out_file, "%s%d,0,0,", ASM_STABN_OP, N_RBRAC);
+ assemble_name (asm_out_file, label);
+ if (DBX_BLOCKS_FUNCTION_RELATIVE)
+ {
+ putc ('-', asm_out_file);
+ assemble_name (asm_out_file, begin_label);
+ }
+ fprintf (asm_out_file, "\n");
#endif
}
@@ -3210,10 +3203,7 @@ static void
dbxout_block (tree block, int depth, tree args)
{
const char *begin_label;
- if (current_function_func_begin_label != NULL)
- begin_label = current_function_func_begin_label;
- else
- begin_label = XSTR (XEXP (DECL_RTL (current_function_decl), 0), 0);
+ begin_label = XSTR (XEXP (DECL_RTL (current_function_decl), 0), 0);
while (block)
{
@@ -3256,10 +3246,10 @@ dbxout_block (tree block, int depth, tree args)
tree decl = BLOCK_VARS (block);
while (decl)
{
- fprintf (asmfile, "%s\"%s:C1\",%d,0,0,", ASM_STABS_OP,
+ fprintf (asm_out_file, "%s\"%s:C1\",%d,0,0,", ASM_STABS_OP,
IDENTIFIER_POINTER (DECL_NAME (decl)), N_CATCH);
- assemble_name (asmfile, scope_start);
- fprintf (asmfile, "\n");
+ assemble_name (asm_out_file, scope_start);
+ fprintf (asm_out_file, "\n");
decl = TREE_CHAIN (decl);
}
}
diff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi
index dbdb614cf46..adffe8f7d62 100644
--- a/gcc/doc/tm.texi
+++ b/gcc/doc/tm.texi
@@ -6259,17 +6259,6 @@ the assembler source. So you can use it to canonicalize the format
of the filename using this macro.
@end defmac
-@defmac ASM_OUTPUT_SOURCE_LINE (@var{stream}, @var{line}, @var{counter})
-A C statement to output DBX or SDB debugging information before code
-for line number @var{line} of the current source file to the
-stdio stream @var{stream}. @var{counter} is the number of time the
-macro was invoked, including the current invocation; it is intended
-to generate unique labels in the assembly output.
-
-This macro need not be defined if the standard form of debugging
-information for the debugger in use is appropriate.
-@end defmac
-
@defmac ASM_OUTPUT_IDENT (@var{stream}, @var{string})
A C statement to output something to the assembler file to handle a
@samp{#ident} directive containing the text @var{string}. If this
@@ -7990,9 +7979,16 @@ code.
@end defmac
@defmac DBX_BLOCKS_FUNCTION_RELATIVE
-Define this macro if the value of a symbol describing the scope of a
-block (@code{N_LBRAC} or @code{N_RBRAC}) should be relative to the start
-of the enclosing function. Normally, GCC uses an absolute address.
+Define this macro, with value 1, if the value of a symbol describing
+the scope of a block (@code{N_LBRAC} or @code{N_RBRAC}) should be
+relative to the start of the enclosing function. Normally, GCC uses
+an absolute address.
+@end defmac
+
+@defmac DBX_LINES_FUNCTION_RELATIVE
+Define this macro, with value 1, if the value of a symbol indicating
+the current line number (@code{N_SLINE}) should be relative to the
+start of the enclosing function. Normally, GCC uses an absolute address.
@end defmac
@defmac DBX_USE_BINCL
@@ -8026,6 +8022,17 @@ Define this macro if the target machine requires special handling to
output an @code{N_FUN} entry for the function @var{decl}.
@end defmac
+@defmac DBX_OUTPUT_SOURCE_LINE (@var{stream}, @var{line}, @var{counter})
+A C statement to output DBX debugging information before code for line
+number @var{line} of the current source file to the stdio stream
+@var{stream}. @var{counter} is the number of time the macro was
+invoked, including the current invocation; it is intended to generate
+unique labels in the assembly output.
+
+This macro should not be defined if the default output is correct, or
+if it can be made correct by defining @code{DBX_LINES_FUNCTION_RELATIVE}.
+@end defmac
+
@defmac DBX_OUTPUT_FUNCTION_END (@var{stream}, @var{function})
Define this macro if the target machine requires special output at the
end of the debugging information for a function. The definition should
@@ -8080,6 +8087,13 @@ If you don't define this macro, nothing special is output at the end
of compilation, which is correct for most machines.
@end defmac
+@defmac DBX_OUTPUT_NULL_N_SO_AT_MAIN_SOURCE_FILE_END
+Define this macro @emph{instead of} defining
+@code{DBX_OUTPUT_MAIN_SOURCE_FILE_END}, if what needs to be output at
+the end of compilation is a @code{N_SO} stab with an empty string,
+whose value is the highest absolute text address in the file.
+@end defmac
+
@need 2000
@node SDB and DWARF
@subsection Macros for SDB and DWARF Output
@@ -8172,6 +8186,12 @@ enumeration tags that have not yet been seen to be handled. Some
assemblers choke if forward tags are used, while some require it.
@end defmac
+@defmac SDB_OUTPUT_SOURCE_LINE (@var{stream}, @var{line})
+A C statement to output SDB debugging information before code for line
+number @var{line} of the current source file to the stdio stream
+@var{stream}. The default is to emit an @code{.ln} directive.
+@end defmac
+
@need 2000
@node VMS Debug
@subsection Macros for VMS Debug Format
diff --git a/gcc/sdbout.c b/gcc/sdbout.c
index 8689cc09be4..a0f31fe0653 100644
--- a/gcc/sdbout.c
+++ b/gcc/sdbout.c
@@ -52,10 +52,6 @@ AT&T C compiler. From the example below I would conclude the following:
static GTY(()) tree anonymous_types;
-/* Counter for sdbout_source_line. */
-
-static GTY(()) int sdbout_source_line_counter;
-
/* Counter to generate unique "names" for nameless struct members. */
static GTY(()) int unnamed_struct_number;
@@ -292,11 +288,6 @@ do { fprintf (asm_out_file, "\t.tag\t"); \
#ifdef MIPS_DEBUGGING_INFO
-#ifndef PUT_SDB_SRC_FILE
-#define PUT_SDB_SRC_FILE(FILENAME) \
-output_file_directive (asm_out_file, (FILENAME))
-#endif
-
/* ECOFF linkers have an optimization that does the same kind of thing as
N_BINCL/E_INCL in stabs: eliminate duplicate debug information in the
executable. To achieve this, GCC must output a .file for each file
@@ -1545,9 +1536,8 @@ sdbout_source_line (unsigned int line, const char *filename ATTRIBUTE_UNUSED)
/* COFF relative line numbers must be positive. */
if ((int) line > sdb_begin_function_line)
{
-#ifdef ASM_OUTPUT_SOURCE_LINE
- sdbout_source_line_counter += 1;
- ASM_OUTPUT_SOURCE_LINE (asm_out_file, line, sdbout_source_line_counter);
+#ifdef SDB_OUTPUT_SOURCE_LINE
+ SDB_OUTPUT_SOURCE_LINE (asm_out_file, line);
#else
fprintf (asm_out_file, "\t.ln\t%d\n",
((sdb_begin_function_line > -1)
@@ -1650,7 +1640,7 @@ sdbout_start_source_file (unsigned int line ATTRIBUTE_UNUSED,
n->next = current_file;
n->name = filename;
current_file = n;
- PUT_SDB_SRC_FILE (filename);
+ output_file_directive (asm_out_file, filename);
#endif
}
@@ -1665,7 +1655,7 @@ sdbout_end_source_file (unsigned int line ATTRIBUTE_UNUSED)
next = current_file->next;
free (current_file);
current_file = next;
- PUT_SDB_SRC_FILE (current_file->name);
+ output_file_directive (asm_out_file, current_file->name);
#endif
}
diff --git a/gcc/xcoffout.c b/gcc/xcoffout.c
index 2f0397ca59c..f79755a58a8 100644
--- a/gcc/xcoffout.c
+++ b/gcc/xcoffout.c
@@ -77,8 +77,8 @@ const char *xcoff_lastfile;
#define ABS_OR_RELATIVE_LINENO(LINENO) \
((xcoff_inlining) ? (LINENO) : (LINENO) - xcoff_begin_function_line)
-/* Output source line numbers via ".line" rather than ".stabd". */
-#define ASM_OUTPUT_SOURCE_LINE(FILE,LINENUM,COUNTER) \
+/* Output source line numbers via ".line". */
+#define ASM_OUTPUT_LINE(FILE,LINENUM) \
do \
{ \
if (xcoff_begin_function_line >= 0) \
@@ -327,7 +327,7 @@ xcoffout_source_line (unsigned int line, const char *filename)
xcoffout_source_file (asm_out_file, filename, inline_p);
- ASM_OUTPUT_SOURCE_LINE (asm_out_file, line, 0);
+ ASM_OUTPUT_LINE (asm_out_file, line);
}
/* Output the symbols defined in block number DO_BLOCK.
@@ -454,7 +454,7 @@ xcoffout_begin_prologue (unsigned int line,
xcoffout_block (DECL_INITIAL (current_function_decl), 0,
DECL_ARGUMENTS (current_function_decl));
- ASM_OUTPUT_SOURCE_LINE (asm_out_file, line, 0);
+ ASM_OUTPUT_LINE (asm_out_file, line);
}
/* Called at end of function (before epilogue).