diff options
author | Araq <rumpf_a@web.de> | 2013-03-16 20:40:26 +0100 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2013-03-16 20:40:26 +0100 |
commit | d9149635393d6c2de589d645b541793da2f5cc9b (patch) | |
tree | fc8e0fd99c9beaf0a2bb6d3341c01552b0f5af29 /compiler/cgen.nim | |
parent | 7d05356df64c99a72f6caeeec5e98ca7482b2e14 (diff) | |
parent | 7304ca061159db8345ae245309274310bbfd0ab1 (diff) | |
download | Nim-d9149635393d6c2de589d645b541793da2f5cc9b.tar.gz |
Merge branch 'master' of github.com:Araq/Nimrod
Diffstat (limited to 'compiler/cgen.nim')
-rwxr-xr-x | compiler/cgen.nim | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/compiler/cgen.nim b/compiler/cgen.nim index d06a6cb6f..b7849f074 100755 --- a/compiler/cgen.nim +++ b/compiler/cgen.nim @@ -892,6 +892,12 @@ proc getFileHeader(cfilenoext: string): PRope = result = getCopyright(cfilenoext) addIntTypes(result) +proc genFilenames(m: BModule): PRope = + discard cgsym(m, "dbgRegisterFilename") + result = nil + for i in 0.. <fileInfos.len: + result.appf("dbgRegisterFilename($1);$n", fileInfos[i].projPath.makeCString) + proc genMainProc(m: BModule) = const CommonMainBody = @@ -950,6 +956,8 @@ proc genMainProc(m: BModule) = nimMain = PosixNimMain otherMain = PosixCMain if gBreakpoints != nil: discard cgsym(m, "dbgRegisterBreakpoint") + if optEndb in gOptions: + gBreakpoints.app(m.genFilenames) let initStackBottomCall = if emulatedThreadVars() or platform.targetOS == osStandalone: "".toRope |