Commit Graph

70 Commits

Author SHA1 Message Date
Nick Clifton 8a7140c38f Add support for generating DWARF2 debug sections in the x86 PE port 2004-04-29 16:40:20 +00:00
Andreas Jaeger 4dde8e6152 2004-02-13 Hannes Reinecke <hare@suse.de>
Jakub Jelinek  <jakub@redhat.com>

	* dwarf2dbg.c (get_filenum): Do not read beyond allocated memory.
2004-02-13 16:12:47 +00:00
Nathan Sidwell e4475e391f .:
* dwarf2dbg.c (DWARF2_ADDR_SIZE): Remove trailing ';'
	* read.h (SKIP_WHITESPACE): Turn into an expression.
	* read.c (read_a_source_file): A pseudo is removed by having a
	NULL handler.
testsuite:
	* gas/macros/test2.s: Lowercase it.
2004-02-06 16:00:21 +00:00
Kazu Hirata d73424248e * dwarf2dbg.c: Convert to ISO-C.
* write.c: Likewise.
	* write.h: Likewise.
2003-12-06 16:16:51 +00:00
Kazu Hirata 436d9e4643 * README-vms: Fix comment typos.
* as.h: Likewise.
	* dwarf2dbg.c: Likewise.
	* ecoff.c: Likewise.
	* hash.c: Likewise.
	* listing.c: Likewise.
	* write.c: Likewise.
2003-11-23 02:14:21 +00:00
Kazu Hirata a2e224686a * depend.c: Convert to ISO-C.
* dwarf2dbg.c: Likewise.
	* dwarf2dbg.h: Likewise.
2003-11-21 13:28:35 +00:00
Alan Modra c5c0a21022 * dwarf2dbg.c (get_frag_fix): Revert 2001-11-15 change.
(generic_dwarf2_emit_offset): Don't define function when
	TC__DWARF2_EMIT_OFFSET is defined.
2003-07-16 03:09:31 +00:00
Richard Henderson b7d6ed970a * symbols.c (temp_label_name): New.
(symbol_temp_new, symbol_temp_new_now, symbol_temp_make): New.
        (symbol_set_value_now): New.
        * symbols.h: Prototype them.
        * dwarf2dbg.c: Use them.
        (fake_label_name, symbol_new_now, set_symbol_value_now): Remove.
2003-05-27 16:00:04 +00:00
Richard Henderson 88b4ca4072 * dwarf2dbg.c (get_filenum): Skip as-yet unassigned file numbers.
(out_file_list): Assign non-null filename after generating error.
2003-04-21 18:23:25 +00:00
Richard Henderson 6174d9c85e * dwarf2dbg.c (generic_dwarf2_emit_offset): New.
(TC_DWARF2_EMIT_OFFSET): Provide default.
        (out_debug_aranges, out_debug_info): Use it.
        * config/tc-ia64.c (ia64_dwarf2_emit_offset): New.
        (ia64_cons_fix_new): Move FUNC_DTP_RELATIVE handling ...
        (ia64_gen_real_reloc_type): ... here.
        * config/tc-ia64.h (TC_DWARF2_EMIT_OFFSET): New.
2003-03-11 22:00:33 +00:00
Nick Clifton a7ed1ca202 Add code to create and use directory tables. 2003-01-28 11:20:36 +00:00
Alexandre Oliva 9605f328cd * dwarf2dbg.c (DWARF2_ADDR_SIZE): New macro.
(dwarf2_finish): Use it.
* doc/internals.texi (DWARF2_ADDR_SIZE): Document it.
* config/tc-mips.h (DWARF2_ADDR_SIZE): Override.
2002-12-25 21:20:31 +00:00
Alan Modra c8970b4ba4 * dwarf2dbg.c (scale_addr_delta): Correct parameter. Move prototype
inside #if.
2002-12-04 01:03:05 +00:00
Alan Modra b34976b65a s/boolean/bfd_boolean/ s/true/TRUE/ s/false/FALSE/. Simplify
comparisons of bfd_boolean vars with TRUE/FALSE.  Formatting.
2002-11-30 08:39:46 +00:00
DJ Delorie a3b7543479 * dwarf2dbg.c (scale_addr_delta): New.
(size_inc_line_addr): Use it.
(emit_inc_line_addr): Use it.
2002-11-26 21:55:15 +00:00
Kevin Buettner 14e777e044 Add support for 64-bit DWARF 2 formats to gas. 2002-11-18 21:08:54 +00:00
Richard Henderson 48b9193866 * dwarf2dbg.c (out_debug_abbrev): Add support for the DW_AT_name field.
(out_debug_info): Likewise.
2002-09-17 02:55:57 +00:00
Alan Modra 7065849339 * dwarf2dbg.c: Always include dwarf2dbg.h.
(dwarf2_directive_file): Adjust dummy version args.
	* ecoff.c (ecoff_directive_weakext): Add ATTRIBUTE_UNUSED.
	* expr.c (clean_up_expression <O_subtract>): Allow subtraction
	when symbol values differ.
	* read.c (do_align): Add ATTRIBUTE_UNUSED to label.
	(pseudo_set <O_subtract>): Remove unnecessary segment test.
	* config/obj-bout.c (obj_pseudo_table): Warning fix.
2002-08-27 11:09:43 +00:00
Daniel Jacobowitz 70ee46581b 2002-08-01 H.J. Lu <hjl@gnu.org>
Daniel Jacobowitz  <drow@mvista.com>

        * dwarf2dbg.c (dwarf2_finish): Don't emit unreferenced
        .debug_line section unless it has line information.
2002-08-01 15:04:41 +00:00
Daniel Jacobowitz ecb4347ade 2002-06-14 H.J. Lu <hjl@gnu.org>
Daniel Jacobowitz  <drow@mvista.com>

        * dwarf2dbg.h (dwarf2_directive_file): Return char *.
        * dwarf2dbg.c (dwarf2_directive_file): Return filename.
        * config/tc-mips.c (s_mips_file): Call s_app_file_string
        and new_logical_line for the first .file directive.
        * read.c (s_app_file_string): New function.
        (s_app_file): Call it.
        * read.h (s_app_file_string): Add declaration.

2002-06-14  Daniel Jacobowitz  <drow@mvista.com>

        * configure.in: Remove MIPS_STABS_ELF.
        * configure: Regenerated.
        * config.in: Regenerated.
        * config/obj-elf.h (ECOFF_DEBUGGING): Define to mips_flag_mdebug
        for MIPS targets.
        * config/tc-mips.c (mips_pseudo_table): Remove #ifdef around
        ".extern".
        (pdr_seg): Declare unconditionally.
        (md_begin): Always generate .pdr unless ECOFF_DEBUGGING or not ELF.
        (s_mips_end): Likewise.  Generate stabs function markers.
        (s_mips_ent): Generate stabs function markers.
        (s_mips_frame): Always generate .pdr unless ECOFF_DEBUGGING or not
        ELF.
        (s_mips_mask): Likewise.
        (mips_flag_mdebug): New.
        (md_longopts): Add "mdebug" and "no-mdebug".
        (md_parse_options): Add OPTION_MDEBUG and OPTION_NO_MDEBUG.
        (mips_after_parse_args): Set mips_flag_mdebug.
        * doc/as.texinfo: Add "-mdebug" and "-no-mdebug" for MIPS.

2002-06-14  Daniel Jacobowitz  <drow@mvista.com>

        * gas/mips/lineno.d: Use --gstabs.
        * gas/mips/mips.exp (lineno.s): Remove XFAIL.
2002-06-14 14:08:54 +00:00
H.J. Lu 9d66a1d9d6 2002-05-22 H.J. Lu <hjl@gnu.org>
* dwarf2dbg.c (dwarf2_directive_loc): Call listing_source_file
	for source file.
2002-05-23 06:51:41 +00:00
H.J. Lu 1080e97d05 2002-05-22 H.J. Lu <hjl@gnu.org>
* dwarf2dbg.c (dwarf2_emit_insn): Emit only one line symbol
	for one .loc for compiler.
2002-05-22 16:15:18 +00:00
Nick Clifton b6675117d9 Do not reset loc_directive_seen in dwarf2_emit_insn. 2002-05-13 10:24:14 +00:00
Nick Clifton d7c310c203 Use the 'current' struct filled by dwarf2_directive_loc, instead of calling
dwarf2_where.
2002-05-11 10:32:35 +00:00
Kazu Hirata d1a6c2428d * as.h: Fix formatting.
* cgen.c: Likewise.
	* cgen.h: Likewise.
	* dwarf2dbg.c: Likewise.
	* frags.h: Likewise.
	* gasp.c: Likewise.
	* macro.c: Likewise.
	* read.c: Likewise.
	* stabs.c: Likewise.
	* symbols.c: Likewise.
2002-05-03 02:25:33 +00:00
Geoffrey Keating ffa554edd7 * dwarf2dbg.c (dwarf2_gen_line_info): Do emit duplicate line
numbers, gdb relies on them to detect the start of the prologue.
2002-04-17 23:08:42 +00:00
Michael Snyder 1ea5c32521 2001-11-16 Michael Snyder <msnyder@redhat.com>
* stabs.c (stabs_generate_asm_lineno): Remember file and line number
	from one call to the next, and eliminate consecutive duplicates
	(thereby emitting only one line symbol per source line).
	* dwarf2dbg.c (dwarf2_gen_line_info): Ditto.
2001-12-04 23:07:26 +00:00
Alan Modra 7c2b59d0e8 gas/ChangeLog
* dwarf2dbg.c (get_frag_fix): Align last frag size.
2001-11-15 05:18:22 +00:00
Alan Modra 0e1a166b28 * dwarf2dbg.c (dwarf2_directive_file): Avoid signed/unsigned warning.
* write.c (set_symtab): Update bfd_alloc declaration.  Use a temp
	var to ensure bfd_alloc arg is the right type.
	(write_object_file): Cast args of bfd_seek.  Replace bfd_write with
	bfd_bwrite.

	* config/obj-coff.c: Replace calls to bfd_write with calls to
	bfd_bwrite.  Cast args of bfd_seek.

	* config/obj-elf.c (obj_elf_change_section): Avoid signed/unsigned
	warning.

	* config/tc-mn10300.c (set_arch_mach): Make param unsigned.

	* config/tc-tic54x.c (tic54x_mlib): Replace bfd_read call with
	call to bfd_bread.
2001-09-18 10:08:15 +00:00
Alan Modra 0e389e770d * read.c: Standardize error/warning messages - don't capitalise, no
final period or newline, don't say "ignored" or "zero assumed" for
	as_bad messages.  In some cases, change the wording to that used
	elsewhere for similar messages.
	* app.c, as.c, atof-generic.c, cgen.c, cond.c, depend.c, dwarf2dbg.c,
	  ecoff.c, expr.c, frags.c, input-file.c, input-scrub.c, listing.c,
	  output-file.c, stabs.c, subsegs.c, symbols.c, write.c: Likewise.
	* ecoff.c (ecoff_directive_end): Test for missing name by
	comparing input line pointers rather than reading string.
	(ecoff_directive_ent): Likewise.
	* read.c (s_set): Likewise.
	(s_align): Report a warning rather than an error for
	alignment too large.
	(s_comm): Check for missing symbol name.
	(s_lcomm_internal): Likewise.
	(s_lsym): Likewise.
	(s_globl): Use is_end_of_line instead of looking for '\n'.
	(s_lcomm_internal): Likewise.
	(ignore_rest_of_line): Report a warning rather than an error.
2001-08-01 01:44:25 +00:00
Alan Modra 45c500fa3e * dwarf2dbg.c (dwarf2_finish): Output file info even when no
line info.
2001-06-19 05:40:55 +00:00
Alan Modra 6386f3a767 * symbols.c (resolve_symbol_value): Remove "finalize" param,
instead use finalize_syms directly.  Don't treat expressions
	specially with regard to finalize_syms.  Update calls to self.
	(resolve_local_symbol): Update call to resolve_symbol_value.
	(S_GET_VALUE): Likewise.  Return resolve_symbol_value if
	!finalize_syms.
	* symbols.h (resolve_symbol_value): Update prototype.
	* config/obj-aout.c (obj_crawl_symbol_chain): Update call
	to resolve_symbol_value.
	* config/obj-bout.c (obj_crawl_symbol_chain): Likewise.
	* config/obj-coff.c (do_relocs_for): Likewise.
	(yank_symbols): Likewise.
	(fixup_segment): Likewise.
	* config/obj-vms.c (obj_crawl_symbol_chain): Likewise.
	* config/tc-mips.c (md_convert_frag): Likewise.
	* config/tc-ppc.c (ppc_frob_symbol): Likewise.
	(ppc_fix_adjustable): Likewise.
	* dwarf2dbg.c (dwarf2dbg_estimate_size_before_relax): Likewise.
	(dwarf2dbg_convert_frag): Likewise.
	* ehopt.c (eh_frame_estimate_size_before_relax): Likewise.
	(eh_frame_convert_frag): Likewise.
	* expr.c (make_expr_symbol): Likewise.
	* write.c (adjust_reloc_syms): Likewise.
	(write_object_file): Likewise.
	(relax_segment): Likewise.
	(fixup_segment): Likewise.
	(finalize_syms): Init to zero, and update comment.
	(write_object_file): Set finalize_syms to 1 rather than 2.
	* doc/internals.texi (sy_value): Mention finalize_syms.
	(S_GET_VALUE): Remove restriction on when S_GET_VALUE can be called.
2001-05-22 10:23:50 +00:00
Jason Merrill fb81275c7d * dwarf2dbg.c (process_entries): Don't optimize redundant line notes. 2001-04-12 16:00:32 +00:00
Alan Modra 1a5447b835 Pass finalize_syms on calls to resolve_symbol_value. 2001-03-30 07:07:11 +00:00
Alan Modra e46d99eb07 Multi-pass relaxation machinery. 2001-03-30 02:19:36 +00:00
Richard Henderson 249e3833ac * dwarf2dbg.c (user_filenum, user_filenum_allocated): Remove.
(dwarf2_directive_loc): Don't use them.
        (dwarf2_directive_file): Reject duplicate file definitions.
        (get_filenum): Zero allocated memory.
        (out_file_list): Complain about missing file definitions.
2001-03-17 18:23:41 +00:00
Nick Clifton f7e42eb4af Fix copyright notices 2001-03-08 23:24:26 +00:00
H.J. Lu 3737d05150 2001-02-23 H.J. Lu <hjl@gnu.org>
* dwarf2dbg.c (dwarf2_directive_file): Call s_app_file (0) if
	BFD_ASSEMBLER is not defined.
2001-02-24 04:59:03 +00:00
Richard Henderson a987bfc987 * dwarf2dbg.c (out_debug_abbrev): Terminate the abbreviations
for the compilation unit with a zero byte.
2001-02-01 18:08:47 +00:00
H.J. Lu ad1172d4c6 2000-12-22 H.J. Lu <hjl@gnu.org>
* dwarf2dbg.c (dwarf2_finish): Remove #if BFD_ASSEMBLER.
2000-12-22 20:36:02 +00:00
Nick Clifton b8f080d6a8 oops - omitted terminating #endif 2000-12-14 20:29:25 +00:00
Nick Clifton 6717891cd0 If we don't have <limits.h>, try including <sys/param.h> if we have it. 2000-12-14 20:16:20 +00:00
Kazu Hirata ee515fb7fa 2000-12-13 Kazu Hirata <kazu@hxi.com>
* as.h: Fix formatting.
	* cgen.h: Likewise.
	* dwarf2dbg.c: Likewise.
	* input-scrub.c: Likewise.
	* read.h: Likewise.
2000-12-14 01:12:43 +00:00
Nick Clifton 6256f9dd96 aadd conditionals around definition of INT_MAX 2000-12-13 18:48:04 +00:00
Nick Clifton 92625c1624 Adde dfinition if INT_MAX if limits.h is not included 2000-12-13 18:46:41 +00:00
Nick Clifton 42dbf88c39 #include <limits.h> only if it exists. 2000-12-13 18:42:28 +00:00
H.J. Lu 92eb7b3244 2000-12-12 H.J. Lu <hjl@gnu.org>
* dwarf2dbg.c: Enabled only if BFD_ASSEMBLER is defined.

	* read.h (outputting_stabs_line_debug): Change it to int.
	* stabs.c (outputting_stabs_line_debug): Likewise.
2000-12-12 21:21:39 +00:00
Nick Clifton bccba5f08c Add outputting_stabs_line_debug varaible and D10v code to use it 2000-12-05 00:56:09 +00:00
Richard Henderson 220e750f6f * dwarf2dbg.c: Rewrite from scratch. Queue all debugging output
until dwarf2_finish; use relaxation to get cross-fragment offsets;
        thread multiple subsegments properly; handle multiple code
        sections properly; emit proper compilation unit info for assembler
        generated debugging.

        * as.h (enum _relax_state): Add rs_dwarf2dbg.
        * dwarf2dbg.h (struct dwarf2_line_info): Remove filename.
        (dwarf2dbg_estimate_size_before_relax): Declare.
        (dwarf2dbg_relax_frag, dwarf2dbg_convert_frag): Declare.
        * write.c: Include dwarf2dbg.h.
        (cvt_frag_to_fill): Handle rs_dwarf2dbg.
        (relax_segment): Likewise.
2000-11-29 21:42:41 +00:00
Richard Henderson a8316fe296 * dwarf2dbg.c (dwarf2_gen_line_info): Early out for no line number.
* config/obj-elf.h (ECOFF_DEBUGGING) [TC_ALPHA]: Adjust for
        tri-state definition of alpha_flag_mdebug.
        * config/tc-alpha.c (alpha_flag_mdebug): Init to -1.
        (s_alpha_file): Store first .file directive.
        (s_alpha_stab): New.
        (md_pseudo_table): Add stabs and stabn.
2000-11-17 18:07:33 +00:00