digitalmars.D.learn - corrupt stack? gdb bt
- Ant (23/23) Apr 22 2005 I created my assert to allow gdb to display the stack trace.
- Thomas Kuehne (10/23) Apr 26 2005 -----BEGIN PGP SIGNED MESSAGE-----
- Ant (11/30) Apr 27 2005 thank you! I'll try that.
I created my assert to allow gdb to display the stack trace. but now I got another problem. Is this something I don't know? Ant // replace the phobos assert extern (C) void _d_assert(char[] filename, uint line) { printf("(dool) Assert failure '%.*s' (%d)\n\n", filename, line); //Object o; o.sizeof; } (dool) Assert failure 'String' (1637) Program received signal SIGSEGV, Segmentation fault. [Switching to Thread -1210424384 (LWP 2685)] 0x0806f234 in _vtbl_4dool6String6String () (gdb) bt Previous frame inner to this frame (corrupt stack?)
Apr 22 2005
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Ant schrieb am Sat, 23 Apr 2005 00:33:39 -0400:I created my assert to allow gdb to display the stack trace. but now I got another problem. Is this something I don't know? Ant // replace the phobos assert extern (C) void _d_assert(char[] filename, uint line) { printf("(dool) Assert failure '%.*s' (%d)\n\n", filename, line); //Object o; o.sizeof; } (dool) Assert failure 'String' (1637)I don't know why but you have to throw at the end of _d_assert. Thomas -----BEGIN PGP SIGNATURE----- iD8DBQFCbyaq3w+/yD4P9tIRAqBCAJ9p+bfFKww3rEGvF/rxjK3kD+G0yACfYpwC YzoJ7aeKKXMrKGGHf+cLcGs= =lddF -----END PGP SIGNATURE-----
Apr 26 2005
In article <ael3k2-oq3.ln1 lnews.kuehne.cn>, Thomas Kuehne says...-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Ant schrieb am Sat, 23 Apr 2005 00:33:39 -0400:thank you! I'll try that. here si the tech tips page snippet: " Provide a custom implementation of: extern (C) void _d_assert(char[] filename, uint line); to do the logging. _d_assert is the function called when an assert trips. By providing your own, it prevents the Phobos library version from being linked in. " Should it contain that information? AntI created my assert to allow gdb to display the stack trace. but now I got another problem. Is this something I don't know? Ant // replace the phobos assert extern (C) void _d_assert(char[] filename, uint line) { printf("(dool) Assert failure '%.*s' (%d)\n\n", filename, line); //Object o; o.sizeof; } (dool) Assert failure 'String' (1637)I don't know why but you have to throw at the end of _d_assert.
Apr 27 2005