digitalmars.D - Temporary suggestion for assert
- Ant <duitoolkit yahoo.ca> Apr 21 2005
- =?ISO-8859-1?Q?Anders_F_Bj=F6rklund?= <afb algonet.se> Apr 22 2005
- Ant <duitoolkit yahoo.ca> Apr 22 2005
- Sean Kelly <sean f4.ca> Apr 23 2005
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
Apr 21 2005
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
Apr 22 2005
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
Apr 22 2005
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
Apr 23 2005









Ant <duitoolkit yahoo.ca> 