浏览代码

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
Jonas Maebe 3 年之前
父节点
当前提交
ccc843f983
共有 1 个文件被更改,包括 9 次插入4 次删除
  1. 9 4
      compiler/llvm/dbgllvm.pas

+ 9 - 4
compiler/llvm/dbgllvm.pas

@@ -2153,10 +2153,15 @@ implementation
 
 
     function TDebugInfoLLVM.symdebugname(sym: tsym): TSymStr;
     function TDebugInfoLLVM.symdebugname(sym: tsym): TSymStr;
     begin
     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;
     end;