diff options
Diffstat (limited to 'compiler/ccgstmts.nim')
-rw-r--r-- | compiler/ccgstmts.nim | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/compiler/ccgstmts.nim b/compiler/ccgstmts.nim index 378951d9d..27bb89f60 100644 --- a/compiler/ccgstmts.nim +++ b/compiler/ccgstmts.nim @@ -802,6 +802,8 @@ proc genTryCpp(p: BProc, t: PNode, d: var TLoc) = endBlock(p, ropecg(p.module, "} catch (NimException& $1) {$n", [exc])) if optStackTrace in p.options: linefmt(p, cpsStmts, "#setFrame((TFrame*)&FR_);$n") + if p.gcFrameLen > 0: + linefmt(p, cpsStmts, "#setGcFrame((#GcFrameBase*)&GCF_);$n") inc p.inExceptBlock var i = 1 var catchAllPresent = false @@ -910,6 +912,9 @@ proc genTry(p: BProc, t: PNode, d: var TLoc) = linefmt(p, cpsStmts, "#popSafePoint();$n") if optStackTrace in p.options: linefmt(p, cpsStmts, "#setFrame((TFrame*)&FR_);$n") + if p.gcFrameLen > 0: + linefmt(p, cpsStmts, "#setGcFrame((#GcFrameBase*)&GCF_);$n") + inc p.inExceptBlock var i = 1 while (i < length) and (t.sons[i].kind == nkExceptBranch): |