From ccc843f98319c4dc3e5a6654f4c20a238969e284 Mon Sep 17 00:00:00 2001 From: Jonas Maebe Date: Sat, 21 May 2022 21:57:32 +0200 Subject: [PATCH] llvmdbg: emit uppercase symbol names unless C++-style debug info is selected Otherwise gdb won't find the symbols unless you use the exact case --- compiler/llvm/dbgllvm.pas | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/compiler/llvm/dbgllvm.pas b/compiler/llvm/dbgllvm.pas index d9d0db5c5e..da5eaa9921 100644 --- a/compiler/llvm/dbgllvm.pas +++ b/compiler/llvm/dbgllvm.pas @@ -2153,10 +2153,15 @@ implementation function TDebugInfoLLVM.symdebugname(sym: tsym): TSymStr; begin - result:=sym.RealName; - if (result<>'') and - (result[1]='$') then - delete(result,1,1); + if ds_dwarf_cpp in current_settings.debugswitches then + begin + result:=sym.RealName; + if (result<>'') and + (result[1]='$') then + delete(result,1,1); + end + else + result:=sym.name end;