parent
df4c339cfc
commit
ec20fd3544
2 changed files with 6 additions and 2 deletions
|
|
@ -997,13 +997,14 @@ proc genProcAux(m: BModule, prc: PSym) =
|
||||||
closureSetup(p, prc)
|
closureSetup(p, prc)
|
||||||
genStmts(p, procBody) # modifies p.locals, p.init, etc.
|
genStmts(p, procBody) # modifies p.locals, p.init, etc.
|
||||||
var generatedProc: Rope
|
var generatedProc: Rope
|
||||||
|
generatedProc.genCLineDir prc.info, m.config
|
||||||
if sfNoReturn in prc.flags:
|
if sfNoReturn in prc.flags:
|
||||||
if hasDeclspec in extccomp.CC[p.config.cCompiler].props:
|
if hasDeclspec in extccomp.CC[p.config.cCompiler].props:
|
||||||
header = "__declspec(noreturn) " & header
|
header = "__declspec(noreturn) " & header
|
||||||
if sfPure in prc.flags:
|
if sfPure in prc.flags:
|
||||||
if hasDeclspec in extccomp.CC[p.config.cCompiler].props:
|
if hasDeclspec in extccomp.CC[p.config.cCompiler].props:
|
||||||
header = "__declspec(naked) " & header
|
header = "__declspec(naked) " & header
|
||||||
generatedProc = ropecg(p.module, "$N$1 {$n$2$3$4}$N$N",
|
generatedProc.add ropecg(p.module, "$1 {$n$2$3$4}$N$N",
|
||||||
[header, p.s(cpsLocals), p.s(cpsInit), p.s(cpsStmts)])
|
[header, p.s(cpsLocals), p.s(cpsInit), p.s(cpsStmts)])
|
||||||
else:
|
else:
|
||||||
if m.hcrOn and isReloadable(m, prc):
|
if m.hcrOn and isReloadable(m, prc):
|
||||||
|
|
@ -1011,7 +1012,7 @@ proc genProcAux(m: BModule, prc: PSym) =
|
||||||
# This fixes the use of methods and also the case when 2 functions within the same module
|
# This fixes the use of methods and also the case when 2 functions within the same module
|
||||||
# call each other using directly the "_actual" versions (an optimization) - see issue #11608
|
# call each other using directly the "_actual" versions (an optimization) - see issue #11608
|
||||||
addf(m.s[cfsProcHeaders], "$1;\n", [header])
|
addf(m.s[cfsProcHeaders], "$1;\n", [header])
|
||||||
generatedProc = ropecg(p.module, "$N$1 {$N", [header])
|
generatedProc.add ropecg(p.module, "$1 {", [header])
|
||||||
add(generatedProc, initGCFrame(p))
|
add(generatedProc, initGCFrame(p))
|
||||||
if optStackTrace in prc.options:
|
if optStackTrace in prc.options:
|
||||||
add(generatedProc, p.s(cpsLocals))
|
add(generatedProc, p.s(cpsLocals))
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,9 @@ outputs = [
|
||||||
]
|
]
|
||||||
|
|
||||||
for i, expected in enumerate(outputs):
|
for i, expected in enumerate(outputs):
|
||||||
|
functionSymbol = gdb.selected_frame().block().function
|
||||||
|
assert functionSymbol.line == 21
|
||||||
|
|
||||||
if i == 5:
|
if i == 5:
|
||||||
# myArray is passed as pointer to int to myDebug. I look up myArray up in the stack
|
# myArray is passed as pointer to int to myDebug. I look up myArray up in the stack
|
||||||
gdb.execute("up")
|
gdb.execute("up")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue