aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2002-05-13 10:24:14 +0000
committerNick Clifton <nickc@redhat.com>2002-05-13 10:24:14 +0000
commitb6675117d942a9942a74bed6bd7ff279118ba91b (patch)
tree8e53fd04ff15c3a430a6ad76ddf4c4cba8cc74b6 /gas
parent7193a0e74fdc32ae817b57d7e6ff6cf55868a3d5 (diff)
downloadgdb-b6675117d942a9942a74bed6bd7ff279118ba91b.zip
gdb-b6675117d942a9942a74bed6bd7ff279118ba91b.tar.gz
gdb-b6675117d942a9942a74bed6bd7ff279118ba91b.tar.bz2
Do not reset loc_directive_seen in dwarf2_emit_insn.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog3
-rw-r--r--gas/dwarf2dbg.c20
2 files changed, 14 insertions, 9 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 15d5575..7e20cf2 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,5 +1,8 @@
2002-05-13 Nick Clifton <nickc@cambridge.redhat.com>
+ * dwarf2dbg.c (dwarf2_emit_insn): Do not reset
+ loc_directive_seen.
+
* stabs.c (s_stab_generic): Fix grammatical error in warning
message.
diff --git a/gas/dwarf2dbg.c b/gas/dwarf2dbg.c
index 8b7005b..115f6fa 100644
--- a/gas/dwarf2dbg.c
+++ b/gas/dwarf2dbg.c
@@ -286,16 +286,18 @@ dwarf2_emit_insn (size)
{
struct dwarf2_line_info loc;
- if (debug_type != DEBUG_DWARF2 && ! loc_directive_seen)
+ if (loc_directive_seen)
+ /* Use the last location established by a .loc directive, not
+ the value returned by dwarf2_where(). That calls as_where()
+ which will return either the logical input file name (foo.c)
+ 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;
+ else if (debug_type != DEBUG_DWARF2)
return;
- loc_directive_seen = false;
-
- /* Use the last location established by a .loc directive, not
- the value returned by dwarf2_where(). That calls as_where()
- which will return either the logical input file name (foo.c)
- 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;
+ else
+ dwarf2_where (& loc);
+
dwarf2_gen_line_info (frag_now_fix () - size, &loc);
}