* 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.
This commit is contained in:
parent
b13291a979
commit
220e750f6f
5 changed files with 1150 additions and 740 deletions
|
@ -1,3 +1,19 @@
|
|||
2000-11-29 Richard Henderson <rth@redhat.com>
|
||||
|
||||
* 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-28 Hans-Peter Nilsson <hp@bitrange.com>
|
||||
|
||||
* config/tc-sh.c (md_convert_frag) <undefined symbol, conditional
|
||||
|
|
5
gas/as.h
5
gas/as.h
|
@ -387,7 +387,10 @@ enum _relax_state {
|
|||
rs_leb128,
|
||||
|
||||
/* Exception frame information which we may be able to optimize. */
|
||||
rs_cfa
|
||||
rs_cfa,
|
||||
|
||||
/* Cross-fragment dwarf2 line number optimization. */
|
||||
rs_dwarf2dbg
|
||||
};
|
||||
|
||||
typedef enum _relax_state relax_stateT;
|
||||
|
|
1844
gas/dwarf2dbg.c
1844
gas/dwarf2dbg.c
File diff suppressed because it is too large
Load diff
|
@ -27,7 +27,6 @@
|
|||
#define DWARF2_FLAG_BEGIN_BLOCK (1 << 1) /* beginning of basic block */
|
||||
|
||||
struct dwarf2_line_info {
|
||||
char *filename;
|
||||
unsigned int filenum;
|
||||
unsigned int line;
|
||||
unsigned int column;
|
||||
|
@ -61,10 +60,13 @@ extern void dwarf2_where PARAMS ((struct dwarf2_line_info *l));
|
|||
extern void dwarf2_gen_line_info PARAMS ((addressT addr,
|
||||
struct dwarf2_line_info *l));
|
||||
|
||||
/* Must be called after all other input is processed to finish up the
|
||||
.debug_line section. */
|
||||
extern void dwarf2_finish PARAMS ((void));
|
||||
|
||||
/* Must be called for each generated instruction. */
|
||||
extern void dwarf2_emit_insn PARAMS ((int));
|
||||
|
||||
extern void dwarf2_finish PARAMS ((void));
|
||||
|
||||
extern int dwarf2dbg_estimate_size_before_relax PARAMS ((fragS *));
|
||||
extern int dwarf2dbg_relax_frag PARAMS ((fragS *));
|
||||
extern void dwarf2dbg_convert_frag PARAMS ((fragS *));
|
||||
|
||||
#endif /* AS_DWARF2DBG_H */
|
||||
|
|
13
gas/write.c
13
gas/write.c
|
@ -25,6 +25,7 @@
|
|||
#include "subsegs.h"
|
||||
#include "obstack.h"
|
||||
#include "output-file.h"
|
||||
#include "dwarf2dbg.h"
|
||||
|
||||
/* This looks like a good idea. Let's try turning it on always, for now. */
|
||||
#undef BFD_FAST_SECTION_FILL
|
||||
|
@ -534,6 +535,10 @@ cvt_frag_to_fill (headersP, sec, fragP)
|
|||
eh_frame_convert_frag (fragP);
|
||||
break;
|
||||
|
||||
case rs_dwarf2dbg:
|
||||
dwarf2dbg_convert_frag (fragP);
|
||||
break;
|
||||
|
||||
case rs_machine_dependent:
|
||||
#ifdef BFD_ASSEMBLER
|
||||
md_convert_frag (stdoutput, sec, fragP);
|
||||
|
@ -2193,6 +2198,10 @@ relax_segment (segment_frag_root, segment)
|
|||
address += eh_frame_estimate_size_before_relax (fragP);
|
||||
break;
|
||||
|
||||
case rs_dwarf2dbg:
|
||||
address += dwarf2dbg_estimate_size_before_relax (fragP);
|
||||
break;
|
||||
|
||||
default:
|
||||
BAD_CASE (fragP->fr_type);
|
||||
break;
|
||||
|
@ -2409,6 +2418,10 @@ relax_segment (segment_frag_root, segment)
|
|||
growth = eh_frame_relax_frag (fragP);
|
||||
break;
|
||||
|
||||
case rs_dwarf2dbg:
|
||||
growth = dwarf2dbg_relax_frag (fragP);
|
||||
break;
|
||||
|
||||
default:
|
||||
BAD_CASE (fragP->fr_type);
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue