www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - assert information could be useless

reply Ant <duitoolkit yahoo.ca> writes:
look at this!


Error: ArrayBoundsError String(1568)

Program exited with code 01.
(gdb) bt
No stack.
(gdb) 


program exited... no stack...

Ant
Nov 28 2004
next sibling parent reply Ant <Ant_member pathlink.com> writes:
In article <pan.2004.11.28.23.48.56.651653 yahoo.ca>, Ant says...

I mean could be more usefull not useless...

Ant
Nov 28 2004
parent "Simon Buchan" <currently no.where> writes:
On Mon, 29 Nov 2004 00:03:40 +0000 (UTC), Ant <Ant_member pathlink.com>  
wrote:

 In article <pan.2004.11.28.23.48.56.651653 yahoo.ca>, Ant says...

 I mean could be more usefull not useless...

 Ant
I think both work. ;) I think you need to tell your DBGer to break on AssertExceptions, (or whatever they're called) but I don't know if that is feasable... -- Using Opera's revolutionary e-mail client: http://www.opera.com/m2/
Nov 28 2004
prev sibling next sibling parent reply "Walter" <newshound digitalmars.com> writes:
"Ant" <duitoolkit yahoo.ca> wrote in message
news:pan.2004.11.28.23.48.56.651653 yahoo.ca...
 look at this!


 Error: ArrayBoundsError String(1568)

 Program exited with code 01.
 (gdb) bt
 No stack.
 (gdb)


 program exited... no stack...
I'd look at String.d line 1568 <g>.
Nov 29 2004
parent reply Ant <Ant_member pathlink.com> writes:
In article <cofv3m$1fik$1 digitaldaemon.com>, Walter says...
"Ant" <duitoolkit yahoo.ca> wrote in message
news:pan.2004.11.28.23.48.56.651653 yahoo.ca...
 look at this!


 Error: ArrayBoundsError String(1568)

 Program exited with code 01.
 (gdb) bt
 No stack.
 (gdb)


 program exited... no stack...
I'd look at String.d line 1568 <g>.
String.d is something like char charAt(int index) { return str[index]; // ok, probably not utf-8 compatible. // I'm just getting aware of utf-8. } double <g> to you :) any way thanks, I've been know for overlooking the simplest things... I know this is an old issue. I'm sorry for repeating but D needs better debugging capabilities. I could have in { assert(index<str.length); } but I don't see the point... Ant
Nov 29 2004
parent reply "Walter" <newshound digitalmars.com> writes:
"Ant" <Ant_member pathlink.com> wrote in message
news:cog222$1jo4$1 digitaldaemon.com...
 In article <cofv3m$1fik$1 digitaldaemon.com>, Walter says...
I'd look at String.d line 1568 <g>.
String.d is something like char charAt(int index) { return str[index]; // ok, probably not utf-8 compatible. // I'm just getting aware of utf-8. } double <g> to you :) any way thanks, I've been know for overlooking the simplest things...
Add the following line: if (index >= str.length) *(char*)0=0; before the return statement. Compile with -g. Run it in the debugger, and you should get a stack trace.
Nov 29 2004
parent Ant <duitoolkit yahoo.ca> writes:
On Mon, 29 Nov 2004 17:58:33 -0800, Walter wrote:

 
 "Ant" <Ant_member pathlink.com> wrote in message
 
 Add the following line:
     if (index >= str.length) *(char*)0=0;
 before the return statement. Compile with -g. Run it in the debugger, and
 you should get a stack trace.
it's there, thank you. (but now I can't reproduce the error, grrr! It's was compiling the Miguel's code example (compiling from leds of course), but no longer...) Ant
Nov 29 2004
prev sibling next sibling parent reply Sean Kelly <sean f4.ca> writes:
In article <pan.2004.11.28.23.48.56.651653 yahoo.ca>, Ant says...
look at this!


Error: ArrayBoundsError String(1568)

Program exited with code 01.
(gdb) bt
No stack.
(gdb) 


program exited... no stack...
You might want to look at Ares. One of the first things I did was to hook the assert error routine. It should be trivial to put code in there to either grab the stack or alert the debugger immediately rather than throwing an exception. Sean
Nov 29 2004
parent reply Ant <Ant_member pathlink.com> writes:
In article <cog116$1ibf$1 digitaldaemon.com>, Sean Kelly says...
In article <pan.2004.11.28.23.48.56.651653 yahoo.ca>, Ant says...
look at this!


Error: ArrayBoundsError String(1568)

Program exited with code 01.
(gdb) bt
No stack.
(gdb) 


program exited... no stack...
You might want to look at Ares. One of the first things I did was to hook the assert error routine. It should be trivial to put code in there to either grab the stack or alert the debugger immediately rather than throwing an exception.
thank you, I'll take a look. but... where is it? there is no project on dsource. Ant
Nov 29 2004
parent Sean Kelly <sean f4.ca> writes:
In article <cog26f$1jsv$1 digitaldaemon.com>, Ant says...
In article <cog116$1ibf$1 digitaldaemon.com>, Sean Kelly says...
In article <pan.2004.11.28.23.48.56.651653 yahoo.ca>, Ant says...
look at this!


Error: ArrayBoundsError String(1568)

Program exited with code 01.
(gdb) bt
No stack.
(gdb) 


program exited... no stack...
You might want to look at Ares. One of the first things I did was to hook the assert error routine. It should be trivial to put code in there to either grab the stack or alert the debugger immediately rather than throwing an exception.
thank you, I'll take a look. but... where is it? there is no project on dsource.
Yeah, what I'm calling "Ares" is actually the result of some experimentation I've been doing. It's available at: http://home.f4.ca/sean/d/ares.zip The Ares project itself doesn't have an SVN location yet because development hadn't gotten that far when interest waned. Sean
Nov 29 2004
prev sibling parent reply Josiah Yoder <yoder2 purdue.edu> writes:
Try "break exit".  It puts a breakpoint on the "exit" function.

(Yes, it's a few years late...)
Mar 11 2008
next sibling parent "Jarrett Billingsley" <kb3ctd2 yahoo.com> writes:
"Josiah Yoder" <yoder2 purdue.edu> wrote in message 
news:fr69lb$br6$1 digitalmars.com...
 Try "break exit".  It puts a breakpoint on the "exit" function.

 (Yes, it's a few years late...)
wtflol I don't think Ant even comes here anymore.
Mar 11 2008
prev sibling parent jcc7 <technocrat7 gmail.com> writes:
== Quote from Josiah Yoder (yoder2 purdue.edu)'s article
 Try "break exit".  It puts a breakpoint on the "exit" function.
 (Yes, it's a few years late...)
Better later than never. ;) (I guess "break exit" is a command for gdb?) Wow, that's reviving an old thread! No one had posted in this thread since Novemember 2004... http://www.digitalmars.com/d/archives/digitalmars/D/13108.html
Mar 11 2008