aboutsummaryrefslogtreecommitdiff
path: root/gas/config
diff options
context:
space:
mode:
authorliuzhensong <liuzhensong@loongson.cn>2022-03-20 09:19:55 +0800
committerliuzhensong <liuzhensong@loongson.cn>2022-03-20 09:37:12 +0800
commit1848a40fdd134c5579e743d93f1ca9acc0b4b486 (patch)
tree1a8651dc68c094c657ffecd126299558261b21cb /gas/config
parent5fb13d7ef45088d8c2b89a3b4b22c36a0e3a5715 (diff)
downloadgdb-1848a40fdd134c5579e743d93f1ca9acc0b4b486.zip
gdb-1848a40fdd134c5579e743d93f1ca9acc0b4b486.tar.gz
gdb-1848a40fdd134c5579e743d93f1ca9acc0b4b486.tar.bz2
gas:LoongArch: Fix wrong line number in .debug_line
The dwarf2_emit_insn() can create debuginfo of line. But it is called too late in append_fixp_and_insn. It causes extra offs when debuginfo of line sets address. gas/config/ * tc-loongarch.c
Diffstat (limited to 'gas/config')
-rw-r--r--gas/config/tc-loongarch.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gas/config/tc-loongarch.c b/gas/config/tc-loongarch.c
index d7ab155..3f7aa99 100644
--- a/gas/config/tc-loongarch.c
+++ b/gas/config/tc-loongarch.c
@@ -877,6 +877,8 @@ append_fixp_and_insn (struct loongarch_cl_insn *ip)
struct reloc_info *reloc_info = ip->reloc_info;
size_t i;
+ dwarf2_emit_insn (0);
+
for (i = 0; i < ip->reloc_num; i++)
{
reloc_type = reloc_info[i].type;
@@ -893,8 +895,6 @@ append_fixp_and_insn (struct loongarch_cl_insn *ip)
as_fatal (_("Internal error: not support relax now"));
else
append_fixed_insn (ip);
-
- dwarf2_emit_insn (0);
}
/* Ask helper for returning a malloced c_str or NULL. */