From d7c310c20350c3ea9f6bc1efad7b7e1d3ab225d1 Mon Sep 17 00:00:00 2001 From: Nick Clifton Date: Sat, 11 May 2002 10:32:35 +0000 Subject: [PATCH] Use the 'current' struct filled by dwarf2_directive_loc, instead of calling dwarf2_where. --- gas/ChangeLog | 5 +++++ gas/dwarf2dbg.c | 7 ++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/gas/ChangeLog b/gas/ChangeLog index c732aede947..203b2276f83 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,8 @@ +2002-05-11 Bruno Haible + + * dwarf2dbg.c (dwarf2_emit_insn): Use the 'current' struct filled + by dwarf2_directive_loc, instead of calling dwarf2_where. + 2002-05-11 Kazu Hirata * config/obj-coff.h: Fix formatting. diff --git a/gas/dwarf2dbg.c b/gas/dwarf2dbg.c index 2037be39124..8b7005b2b5c 100644 --- a/gas/dwarf2dbg.c +++ b/gas/dwarf2dbg.c @@ -290,7 +290,12 @@ dwarf2_emit_insn (size) return; loc_directive_seen = false; - dwarf2_where (&loc); + /* 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; dwarf2_gen_line_info (frag_now_fix () - size, &loc); } -- 2.30.2