* config/tc-hppa.c: Include dwarf2dbg.h if OBJ_ELF. Declare

debug_line.
        (md_pseudo_table): Add .file and .line pseudo-ops for OBJ_ELF.
        (md_assemble): Call dwarf2_where for OBJ_ELF.
        (pa_ip): Call dwarf2_gen_line_info for OBJ_ELF.
        (pa_end_of_source): New function.
        * tc-hppa.h (md_end): Define for OBJ_ELF.
This commit is contained in:
Jeff Law 1999-09-15 11:17:54 +00:00
parent 3b97fa5ed0
commit 2d93dcc450
3 changed files with 51 additions and 0 deletions

View File

@ -1,3 +1,13 @@
Wed Sep 15 05:14:32 1999 Jeffrey A Law (law@cygnus.com)
* config/tc-hppa.c: Include dwarf2dbg.h if OBJ_ELF. Declare
debug_line.
(md_pseudo_table): Add .file and .line pseudo-ops for OBJ_ELF.
(md_assemble): Call dwarf2_where for OBJ_ELF.
(pa_ip): Call dwarf2_gen_line_info for OBJ_ELF.
(pa_end_of_source): New function.
* tc-hppa.h (md_end): Define for OBJ_ELF.
1999-09-14 Michael Meissner <meissner@cygnus.com>
* configure.in (Canonicalization of target names): Remove adding

View File

@ -39,6 +39,14 @@
error only one of OBJ_ELF and OBJ_SOM can be defined
#endif
/* If we are using ELF, then we probably can support dwarf2 debug
records. Furthermore, if we are supporting dwarf2 debug records,
then we want to use the assembler support for compact line numbers. */
#ifdef OBJ_ELF
#include "dwarf2dbg.h"
struct dwarf2_line_info debug_line;
#endif
/* A "convient" place to put object file dependencies which do
not need to be seen outside of tc-hppa.c. */
#ifdef OBJ_ELF
@ -630,6 +638,9 @@ const pseudo_typeS md_pseudo_table[] =
{"equ", pa_equ, 0},
{"exit", pa_exit, 0},
{"export", pa_export, 0},
#ifdef OBJ_ELF
{ "file", dwarf2_directive_file },
#endif
{"fill", pa_fill, 0},
{"float", pa_float_cons, 'f'},
{"half", pa_cons, 2},
@ -639,6 +650,9 @@ const pseudo_typeS md_pseudo_table[] =
{"lcomm", pa_lcomm, 0},
{"leave", pa_leave, 0},
{"level", pa_level, 0},
#ifdef OBJ_ELF
{ "loc", dwarf2_directive_loc },
#endif
{"long", pa_cons, 4},
{"lsym", pa_lsym, 0},
#ifdef OBJ_SOM
@ -1443,6 +1457,12 @@ md_assemble (str)
(offsetT) 0, &the_insn.exp, the_insn.pcrel,
the_insn.reloc, the_insn.field_selector,
the_insn.format, the_insn.arg_reloc, NULL);
#ifdef OBJ_ELF
if (debug_type == DEBUG_DWARF2)
dwarf2_where (&debug_line);
#endif
}
/* Do the real work for assembling a single instruction. Store results
@ -3357,6 +3377,16 @@ pa_ip (str)
break;
}
#ifdef OBJ_ELF
if (debug_type == DEBUG_DWARF2)
{
bfd_vma addr;
addr = frag_now->fr_address + frag_now_fix ();
dwarf2_gen_line_info (addr, &debug_line);
}
#endif
the_insn.opcode = opcode;
}
@ -7504,3 +7534,11 @@ elf_hppa_final_processing ()
}
}
#endif
#ifdef OBJ_ELF
pa_end_of_source ()
{
if (debug_type == DEBUG_DWARF2)
dwarf2_finish ();
}
#endif

View File

@ -162,6 +162,9 @@ void elf_hppa_final_processing PARAMS ((void));
#endif
#define md_operand(x)
#ifdef OBJ_ELF
#define md_end() pa_end_of_source ()
#endif
#define TC_FIX_TYPE PTR
#define TC_INIT_FIX_DATA(FIXP) ((FIXP)->tc_fix_data = NULL)