| Thread overview | |||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
November 28, 2004 assert information could be useless | ||||
|---|---|---|---|---|
| ||||
look at this! ############# Error: ArrayBoundsError String(1568) Program exited with code 01. (gdb) bt No stack. (gdb) ############# program exited... no stack... Ant | ||||
November 29, 2004 Re: assert information could be more usefull | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Ant | In article <pan.2004.11.28.23.48.56.651653@yahoo.ca>, Ant says... I mean could be more usefull not useless... Ant | |||
November 29, 2004 Re: assert information could be more usefull | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Ant | 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/ | |||
November 29, 2004 Re: assert information could be useless | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Ant | "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>. | |||
November 29, 2004 Re: assert information could be useless | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Ant | 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 | |||
November 29, 2004 Re: assert information could be useless | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Walter | 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 | |||
November 29, 2004 Re: assert information could be useless | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Sean Kelly | 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 | |||
November 29, 2004 Re: assert information could be useless | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Ant | 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 | |||
November 30, 2004 Re: assert information could be useless | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Ant | "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. | |||
November 30, 2004 Re: assert information could be useless | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Walter | 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
| |||
Copyright © 1999-2021 by the D Language Foundation
Permalink
Reply