Thread overview
Temporary suggestion for assert
Apr 22, 2005
Ant
Apr 22, 2005
Ant
Apr 23, 2005
Sean Kelly
April 22, 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
April 22, 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
April 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
April 23, 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