aboutsummaryrefslogtreecommitdiff
path: root/gas/write.c
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>2000-11-29 21:42:41 +0000
committerRichard Henderson <rth@redhat.com>2000-11-29 21:42:41 +0000
commit220e750f6ff8264ad573f43c0883ece78f53642f (patch)
tree15bd4b7605aaf794ca598ba141fa1164b044c763 /gas/write.c
parentb13291a97978585d2167e4bb047493c34f3df5ca (diff)
downloadgdb-220e750f6ff8264ad573f43c0883ece78f53642f.zip
gdb-220e750f6ff8264ad573f43c0883ece78f53642f.tar.gz
gdb-220e750f6ff8264ad573f43c0883ece78f53642f.tar.bz2
* 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.
Diffstat (limited to 'gas/write.c')
-rw-r--r--gas/write.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/gas/write.c b/gas/write.c
index f30e0d0..4599338 100644
--- a/gas/write.c
+++ b/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;