Thread overview | |||||
---|---|---|---|---|---|
|
April 23, 2005 corrupt stack? gdb bt | ||||
---|---|---|---|---|
| ||||
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 #0 0x0806f234 in _vtbl_4dool6String6String () #1 0x00000008 in ?? () #2 0x00000665 in ?? () #3 0xbffff76c in ?? () #4 0x0805aafa in _D4dool6String6String7opSliceFiiZC4dool6String6String () Previous frame inner to this frame (corrupt stack?) |
April 27, 2005 Re: corrupt stack? gdb bt | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ant | -----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----- |
April 27, 2005 Re: corrupt stack? gdb bt | ||||
---|---|---|---|---|
| ||||
Posted in reply to Thomas Kuehne | 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: >> 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. > 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? Ant |
Copyright © 1999-2021 by the D Language Foundation