better debugging support for native debuggers; changed name mangling; fixes #3471

This commit is contained in:
Araq 2016-05-10 22:02:56 +02:00
commit b654aa399a
3 changed files with 164 additions and 58 deletions

View file

@ -16,6 +16,8 @@ import
lists, ropes, os, strutils, osproc, platform, condsyms, options, msgs,
securehash, streams
from debuginfo import writeDebugInfo
type
TSystemCC* = enum
ccNone, ccGcc, ccLLVM_Gcc, ccCLang, ccLcc, ccBcc, ccDmc, ccWcc, ccVcc,
@ -736,6 +738,8 @@ proc callCCompiler*(projectfile: string) =
if not noAbsolutePaths():
if not exefile.isAbsolute():
exefile = joinPath(splitFile(projectfile).dir, exefile)
if optCDebug in gGlobalOptions:
writeDebugInfo(exefile.changeFileExt("ndb"))
exefile = quoteShell(exefile)
let linkOptions = getLinkOptions() & " " &
getConfigVar(cCompiler, ".options.linker")