diff options
author | Richard Henderson <rth@redhat.com> | 2000-11-17 08:47:52 +0000 |
---|---|---|
committer | Richard Henderson <rth@redhat.com> | 2000-11-17 08:47:52 +0000 |
commit | 4dc7ead9fdf2143fa28755909c2cf9f47659aca4 (patch) | |
tree | 454af0e6a42bb531e86fbf5986c68eb863bfc2cc /gas/config/tc-alpha.c | |
parent | 512d22f487a268fc32a4a9a6a88e8ac538ad8448 (diff) | |
download | gdb-4dc7ead9fdf2143fa28755909c2cf9f47659aca4.zip gdb-4dc7ead9fdf2143fa28755909c2cf9f47659aca4.tar.gz gdb-4dc7ead9fdf2143fa28755909c2cf9f47659aca4.tar.bz2 |
* as.c (debug_type): Init to DEBUG_UNSPECIFIED.
* as.h (debug_type): Clarify documentation of the meaning
of this variable.
* dwarf2dbg.c (DWARF2_LINE_MIN_INSN_LENGTH): Default to 1.
(print_stats): Fix parenthesis problem.
(now_subseg_size): New.
(dwarf2_finish): Use it. If DEBUG_DWARF2, emit bits for .debug_info.
(dwarf2_directive_file): Don't set debug_type.
(dwarf2_where): Honor DEBUG_DWARF2 first.
(dwarf2_emit_insn): Renamed from dwarf2_generate_asm_lineno;
do nothing if not emitting dwarf2 debug info, or no work.
* dwarf2dbg.h (dwarf2_emit_insn): Update.
* ecoff.c (add_file): Turn on DEBUG_ECOFF only if DEBUG_UNSPECIFIED.
(ecoff_new_file): Likewise.
* read.c (generate_lineno_debug): Kill ecoff hackery. Update
commentary wrt dwarf2.
* config/tc-alpha.c (alpha_adjust_symtab_relocs): Add
ATTRIBUTE_UNUSED as needed.
(emit_insn): Call dwarf2_emit_insn.
(s_alpha_file): New.
(s_alpha_loc): New.
(s_alpha_coff_wrapper): Don't handle them.
(md_pseudo_table): Update for .file and .loc.
* config/tc-alpha.h (DWARF2_LINE_MIN_INSN_LENGTH): New.
* config/tc-arm.c (output_inst): Update for dwarf2_emit_insn;
don't protect with debug_type.
* config/tc-hppa.c (md_assemble): Likewise.
* config/tc-m68hc11.c (m68hc11_new_insn): Likewise.
* config/tc-mn10300.c (md_assemble): Likewise.
* config/tc-sh.c (md_assemble): Likewise.
* config/tc-v850.c (md_assemble): Likewise.
* config/tc-arm.c (arm_end_of_source): Remove.
* config/tc-hppa.c (pa_end_of_source): Remove.
* config/tc-m68hc11.c (m68hc11_end_of_source): Remove.
* config/tc-mn10300.c (mn10300_finalize): Remove.
* config/tc-sh.c (sh_finalize): Remove.
* config/tc-v850.c (sh_finalize): Remove.
* config/tc-arm.h (md_end): Remove.
* config/tc-hppa.h (md_end): Remove.
(DWARF2_LINE_MIN_INSN_LENGTH): New.
* config/tc-m68hc11.h (md_end): Remove.
* config/tc-mn10300.h (md_end): Remove.
* config/tc-sh.h (md_end): Remove.
* config/tc-v850.h (md_end): Remove.
* config/tc-ia64.c (emit_one_bundle): Don't protect
dwarf2 bits with debug_type.
(md_assemble): Likewise.
(ia64_end_of_source): Don't call dwarf2_finish.
Diffstat (limited to 'gas/config/tc-alpha.c')
-rw-r--r-- | gas/config/tc-alpha.c | 49 |
1 files changed, 37 insertions, 12 deletions
diff --git a/gas/config/tc-alpha.c b/gas/config/tc-alpha.c index 44aedcd..66d208b 100644 --- a/gas/config/tc-alpha.c +++ b/gas/config/tc-alpha.c @@ -58,6 +58,7 @@ #ifdef OBJ_ELF #include "elf/alpha.h" +#include "dwarf2dbg.h" #endif #include <ctype.h> @@ -245,6 +246,8 @@ static void s_alpha_end PARAMS ((int)); static void s_alpha_mask PARAMS ((int)); static void s_alpha_frame PARAMS ((int)); static void s_alpha_prologue PARAMS ((int)); +static void s_alpha_file PARAMS ((int)); +static void s_alpha_loc PARAMS ((int)); static void s_alpha_coff_wrapper PARAMS ((int)); #endif #ifdef OBJ_EVAX @@ -393,8 +396,8 @@ static offsetT alpha_lit4_literal; static offsetT alpha_lit8_literal; #endif -/* The active .ent symbol. */ #ifdef OBJ_ELF +/* The active .ent symbol. */ static symbolS *alpha_cur_ent_sym; #endif @@ -1671,9 +1674,9 @@ alpha_adjust_symtab () static void alpha_adjust_symtab_relocs (abfd, sec, ptr) - bfd *abfd; + bfd *abfd ATTRIBUTE_UNUSED; asection *sec; - PTR ptr; + PTR ptr ATTRIBUTE_UNUSED; { segment_info_type *seginfo = seg_info (sec); fixS **prevP; @@ -2466,6 +2469,10 @@ emit_insn (insn) f = frag_more (4); md_number_to_chars (f, insn->insn, 4); +#ifdef OBJ_ELF + dwarf2_emit_insn (4); +#endif + /* Apply the fixups in order */ for (i = 0; i < insn->nfixups; ++i) { @@ -3287,8 +3294,8 @@ emit_lda (tok, ntok, opname) || tok[2].X_op != O_pregister || !is_ir_num(tok[2].X_add_number)) { - as_bad (_("bad instruction format for lda !%s!%d"), r->name, - reloc->X_add_number); + as_bad (_("bad instruction format for lda !%s!%ld"), r->name, + (long) reloc->X_add_number); reloc = (const expressionS *)0; ntok--; @@ -4572,6 +4579,26 @@ s_alpha_prologue (ignore) } static void +s_alpha_file (ignore) + int ignore ATTRIBUTE_UNUSED; +{ + if (ECOFF_DEBUGGING) + ecoff_directive_file (0); + else + dwarf2_directive_file (0); +} + +static void +s_alpha_loc (ignore) + int ignore ATTRIBUTE_UNUSED; +{ + if (ECOFF_DEBUGGING) + ecoff_directive_loc (0); + else + dwarf2_directive_loc (0); +} + +static void s_alpha_coff_wrapper (which) int which; { @@ -4581,11 +4608,9 @@ s_alpha_coff_wrapper (which) ecoff_directive_def, ecoff_directive_dim, ecoff_directive_endef, - ecoff_directive_file, ecoff_directive_scl, ecoff_directive_tag, ecoff_directive_val, - ecoff_directive_loc, }; assert (which >= 0 && which < (int)(sizeof(fns)/sizeof(*fns))); @@ -5447,17 +5472,17 @@ const pseudo_typeS md_pseudo_table[] = {"fmask", s_alpha_mask, 1}, {"frame", s_alpha_frame, 0}, {"prologue", s_alpha_prologue, 0}, + {"file", s_alpha_file, 5}, + {"loc", s_alpha_loc, 9}, /* COFF debugging related pseudos. */ {"begin", s_alpha_coff_wrapper, 0}, {"bend", s_alpha_coff_wrapper, 1}, {"def", s_alpha_coff_wrapper, 2}, {"dim", s_alpha_coff_wrapper, 3}, {"endef", s_alpha_coff_wrapper, 4}, - {"file", s_alpha_coff_wrapper, 5}, - {"scl", s_alpha_coff_wrapper, 6}, - {"tag", s_alpha_coff_wrapper, 7}, - {"val", s_alpha_coff_wrapper, 8}, - {"loc", s_alpha_coff_wrapper, 9}, + {"scl", s_alpha_coff_wrapper, 5}, + {"tag", s_alpha_coff_wrapper, 6}, + {"val", s_alpha_coff_wrapper, 7}, #else {"prologue", s_ignore, 0}, #endif |