Thread overview | ||||||
---|---|---|---|---|---|---|
|
April 22, 2005 Temporary suggestion for assert | ||||
---|---|---|---|---|
| ||||
until the assert can print out more usefull information can we have the program exit with something gdb can catch so we can print a backtrace? look out I'm doing: String insert(String string, int pos) in { if ( (pos < 0) || (pos >= length) ) { printf("String.insert pos=%d, length=%d\n", pos, length); String s; s.split(); } } body :p Ant |
April 22, 2005 Re: Temporary suggestion for assert | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ant | Ant wrote: > until the assert can print out more usefull information can we have > the program exit with something gdb can catch so we can print a > backtrace? See http://www.digitalmars.com/techtips/unittests.html ? But I think Walter said that filename and linenumber is all that is needed, and the reason why assert doesn't allow a message to be attached to it: assert(exp,"why"); --anders |
April 22, 2005 Re: Temporary suggestion for assert | ||||
---|---|---|---|---|
| ||||
Posted in reply to Anders F Björklund | Anders F Björklund wrote:
> Ant wrote:
>
>> until the assert can print out more usefull information can we have
>> the program exit with something gdb can catch so we can print a
>> backtrace?
>
>
> See http://www.digitalmars.com/techtips/unittests.html ?
Thanks, I guess I can do with that!
Ant
|
April 23, 2005 Re: Temporary suggestion for assert | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ant | In article <d49qqh$1dd5$1@digitaldaemon.com>, Ant says... > >until the assert can print out more usefull information can we have the program exit with something gdb can catch so we can print a backtrace? Why not put: asm int 3; in the assert handler. Sean |
Copyright © 1999-2021 by the D Language Foundation