diff options
author | Bob Wilson <bob.wilson@acm.org> | 2007-11-19 18:15:53 +0000 |
---|---|---|
committer | Bob Wilson <bob.wilson@acm.org> | 2007-11-19 18:15:53 +0000 |
commit | 661ba50f530d936e1e9b260f0c4424d92ce9076f (patch) | |
tree | 3d598855ac24b49e4ddcc635441232f7565a79a2 /gas/dwarf2dbg.c | |
parent | 3e0873ac4fa365e8c170adcb8b9e1fd727ed16c3 (diff) | |
download | gdb-661ba50f530d936e1e9b260f0c4424d92ce9076f.zip gdb-661ba50f530d936e1e9b260f0c4424d92ce9076f.tar.gz gdb-661ba50f530d936e1e9b260f0c4424d92ce9076f.tar.bz2 |
* dwarf2dbg.c (dwarf2_consume_line_info): New.
(dwarf2_emit_insn): Use it here.
(dwarf2_directive_loc): Fix check for consecutive .loc directives
when debug_type is DEBUG_DWARF2.
* dwarf2dbg.h (dwarf2_consume_line_info): New prototype.
* config/tc-ia64.c (ia64_flush_insns): Call dwarf2_consume_line_info.
(md_assemble): Likewise.
testsuite/
* gas/lns/lns.exp: Run lns-common-1 with alternate source for ia64.
* gas/lns/lns-common-1-ia64.s: New file.
Diffstat (limited to 'gas/dwarf2dbg.c')
-rw-r--r-- | gas/dwarf2dbg.c | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/gas/dwarf2dbg.c b/gas/dwarf2dbg.c index 39e434c..97a60c7 100644 --- a/gas/dwarf2dbg.c +++ b/gas/dwarf2dbg.c @@ -373,11 +373,6 @@ dwarf2_emit_insn (int size) or the physical input file name (foo.s) and not the file name specified in the most recent .loc directive (eg foo.h). */ loc = current; - - /* Unless we generate DWARF2 debugging information for each - assembler line, we only emit one line symbol for one LOC. */ - if (debug_type != DEBUG_DWARF2) - loc_directive_seen = FALSE; } else if (debug_type != DEBUG_DWARF2) return; @@ -385,6 +380,21 @@ dwarf2_emit_insn (int size) dwarf2_where (&loc); dwarf2_gen_line_info (frag_now_fix () - size, &loc); + dwarf2_consume_line_info (); +} + +/* Called after the current line information has been either used with + dwarf2_gen_line_info or saved with a machine instruction for later use. + This resets the state of the line number information to reflect that + it has been used. */ + +void +dwarf2_consume_line_info (void) +{ + /* Unless we generate DWARF2 debugging information for each + assembler line, we only emit one line symbol for one LOC. */ + if (debug_type != DEBUG_DWARF2) + loc_directive_seen = FALSE; current.flags &= ~(DWARF2_FLAG_BASIC_BLOCK | DWARF2_FLAG_PROLOGUE_END @@ -572,7 +582,7 @@ dwarf2_directive_loc (int dummy ATTRIBUTE_UNUSED) /* If we see two .loc directives in a row, force the first one to be output now. */ - if (loc_directive_seen) + if (loc_directive_seen && debug_type != DEBUG_DWARF2) dwarf2_emit_insn (0); filenum = get_absolute_expression (); |