[Issue 5118] New: Stack traces should properly handle nested functions
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Oct 25 14:41:15 PDT 2010
http://d.puremagic.com/issues/show_bug.cgi?id=5118
Summary: Stack traces should properly handle nested functions
Product: D
Version: D2
Platform: Other
OS/Version: Windows
Status: NEW
Keywords: diagnostic
Severity: normal
Priority: P2
Component: druntime
AssignedTo: sean at invisibleduck.org
ReportedBy: dsimcha at yahoo.com
--- Comment #0 from David Simcha <dsimcha at yahoo.com> 2010-10-25 14:40:26 PDT ---
When an exception causes a stack trace to be printed on Linux, only top-level
functions are shown. If nested functions are to become idiomatic D style (I
use them a ton) then nested functions should be printed as well. Test case:
void main() {
doIt();
}
void doIt() {
void nested() {
throw new Exception("Test.");
}
nested();
}
Stack trace:
object.Exception: Test.
----------------
./test(void test.doIt()) [0x8057cf9]
./test(_Dmain+0x8) [0x8057ccc]
./test(extern (C) int rt.dmain2.main(int, char**)) [0x805a456]
./test(extern (C) int rt.dmain2.main(int, char**)) [0x805a3b0]
./test(extern (C) int rt.dmain2.main(int, char**)) [0x805a49a]
./test(extern (C) int rt.dmain2.main(int, char**)) [0x805a3b0]
./test(main+0x96) [0x805a356]
/lib/tls/libc.so.6(__libc_start_main+0xd3) [0x8c3e93]
./test [0x8057c21]
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list