From f0df48fcdd2c73d7bf81aad8e0c8fd8d873b852f Mon Sep 17 00:00:00 2001 From: herman ten brugge Date: Thu, 5 May 2022 09:23:29 +0200 Subject: [PATCH] Fix dwarf on 32 bits targets Never do last minute commits :-( --- tccgen.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tccgen.c b/tccgen.c index 3754fc98..1f9f19ae 100644 --- a/tccgen.c +++ b/tccgen.c @@ -1742,8 +1742,8 @@ static void tcc_debug_funcstart(TCCState *s1, Sym *sym) tcc_debug_stabn(s1, N_LBRAC, ind - func_ind); if (!(f = put_new_file(s1))) return; - tcc_debug_line(s1); if (s1->dwarf) { + tcc_debug_line(s1); dwarf_info.func = sym; dwarf_info.line = file->line_num; if (s1->do_backtrace) { @@ -1762,6 +1762,7 @@ static void tcc_debug_funcstart(TCCState *s1, Sym *sym) tcc_get_debug_info(s1, sym->type.ref, &debug_str); put_stabs_r(s1, debug_str.data, N_FUN, 0, f->line_num, 0, cur_text_section, sym->c); cstr_free (&debug_str); + tcc_debug_line(s1); } }