[Issue 5118] Stack traces should properly handle nested functions

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Thu Oct 20 04:38:22 PDT 2016


https://issues.dlang.org/show_bug.cgi?id=5118

Nemanja Boric <4burgos at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |4burgos at gmail.com
         Resolution|---                         |FIXED

--- Comment #2 from Nemanja Boric <4burgos at gmail.com> ---
I think the problem here is that previous exception handler was using BPs
stored
on stack to walk the stack frame, and nested functions were not doing this
properly (if I remember correctly, they were not using *BP for the stack frame,
or something similar).

With the new exception handler, this issue is gone:

object.Exception at test.d(8): Test.
----------------
??:? void test.doIt().nested() [0x422ae9]
??:? void test.doIt() [0x422a92]
??:? _Dmain [0x422a80]
??:? _D2rt6dmain211_d_run_mainUiPPaPUAAaZiZ6runAllMFZ9__lambda1MFZv [0x423126]
??:? void rt.dmain2._d_run_main(int, char**, extern (C) int
function(char[][])*).tryExec(scope void delegate()) [0x423070]
??:? void rt.dmain2._d_run_main(int, char**, extern (C) int
function(char[][])*).runAll() [0x4230e2]
??:? void rt.dmain2._d_run_main(int, char**, extern (C) int
function(char[][])*).tryExec(scope void delegate()) [0x423070]
??:? _d_run_main [0x422fe1]
??:? main [0x422b75]
??:? __libc_start_main [0x935bb82f]

--


More information about the Digitalmars-d-bugs mailing list