From 12acbf3e92e4067155da2e6242cf4cd72b1e291e Mon Sep 17 00:00:00 2001 From: Maxim Logaev Date: Tue, 20 Aug 2024 17:51:12 +0300 Subject: [PATCH] tccdbg.c: DW_AT_language now matches the -std option Signed-off-by: Maxim Logaev --- tccdbg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tccdbg.c b/tccdbg.c index 7760f4fd..15d54b47 100644 --- a/tccdbg.c +++ b/tccdbg.c @@ -802,7 +802,7 @@ ST_FUNC void tcc_debug_start(TCCState *s1) dwarf_data1(dwarf_info_section, DWARF_ABBREV_COMPILE_UNIT); dwarf_strp(dwarf_info_section, "tcc " TCC_VERSION); - dwarf_data1(dwarf_info_section, DW_LANG_C11); + dwarf_data1(dwarf_info_section, s1->cversion == 201112 ? DW_LANG_C11 : DW_LANG_C99); dwarf_line_strp(dwarf_info_section, filename); dwarf_line_strp(dwarf_info_section, buf); dwarf_reloc(dwarf_info_section, section_sym, R_DATA_PTR);