Thread overview | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
|
February 27, 2007 ddbg 0.3 | ||||
---|---|---|---|---|
| ||||
Stepping through loops works now, but the counter variable does not get updated in the list of watches. Wait...<tests further> that's not exactly true. It doesn't get updated in this situation: // during first loop it's ok for (int i = 0; i< s.blip.length; i++) { s.blip[i] = i; } // but here i doesn't get updated in watch window for (int i = 0; i< s.blip.length; i++) { s.blip[i] = i*2; } Declared outside of the for scope, it's ok: int i; for (i = 0; i< s.blip.length; i++) { s.blip[i] = i; } for (i = 0; i< s.blip.length; i++) { s.blip[i] = i*2; } Also inout values seem to show up as void*. Is there a way to cast a variable in CodeBlocks' watch list? I tried (int*)myptr but CB says "invalid expression". I also tried cast(int*)myptr, not really expecting that to work, but hoping, and it didn't work either. --bb |
February 27, 2007 another CB/ddbg 0.3 bug | ||||
---|---|---|---|---|
| ||||
Posted in reply to Bill Baxter | Setting the program arguments in codeblocks doesn't seem to work right. The program arguments just don't seem to get passed in to the debugger. --bb |
February 27, 2007 Re: ddbg 0.3 | ||||
---|---|---|---|---|
| ||||
Posted in reply to Bill Baxter | the problem is the second declaration of i within the same frame. i'll take care of it. until then try using different counter names to work around this.
inout's are being marked void* by DMD, a codeview issue to be added to arrays and enums.
Ddbg's expressions don't support casts, yet. but since casts are a good workaround to DMD's codeview issues i'll have them in the next release. currently the expression syntax is:
Expr = Ident
| Ident OExpr
OExpr = . Expr
| [ Args ] OExpr
Args = Slice | Lit | Expr
Slice = SlArg .. SlArg
SlArg = Lit | Expr
Lit = Int | Float | Str | Char | $
Bill Baxter wrote:
> Stepping through loops works now, but the counter variable does not get updated in the list of watches. Wait...<tests further> that's not exactly true.
>
> It doesn't get updated in this situation:
>
> // during first loop it's ok
> for (int i = 0; i< s.blip.length; i++) {
> s.blip[i] = i;
> }
> // but here i doesn't get updated in watch window
> for (int i = 0; i< s.blip.length; i++) {
> s.blip[i] = i*2;
> }
>
> Declared outside of the for scope, it's ok:
> int i;
> for (i = 0; i< s.blip.length; i++) {
> s.blip[i] = i;
> }
> for (i = 0; i< s.blip.length; i++) {
> s.blip[i] = i*2;
> }
>
>
>
> Also inout values seem to show up as void*. Is there a way to cast a variable in CodeBlocks' watch list? I tried (int*)myptr but CB says "invalid expression". I also tried cast(int*)myptr, not really expecting that to work, but hoping, and it didn't work either.
>
> --bb
|
February 27, 2007 Re: ddbg 0.3 | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jascha Wetzel | Here is my first shot at extending the syntax to include casts. You should be able to do things like cast(char[])(cast(mystruct*)foo.bar).strtable[key] with it. Any comments? Expr = RefChain | Cast RefChain RefChain = ExprElem | ExprElem RefExpr ExprElem = Ident | '(' Expr ')' RefExpr = '.' ExprChain | '[' Args ']' RefExpr Cast = 'cast' '(' Type ')' Type = BasicType | BasicType QuantList QuantList = Quantifier | Quantifier QuanList Quantifier = '*' | '[' ']' | '[' Type ']' BasicType = 'void' | 'bool' | 'byte' | 'ubyte' | 'char' | ... all the others ... Args = Slice | Lit | Expr Slice = SlArg '..' SlArg SlArg = Lit | Expr Lit = Int | Float | Str | Char | '$' |
February 28, 2007 Re: ddbg 0.3 | ||||
---|---|---|---|---|
| ||||
Posted in reply to Bill Baxter | import std.stdio; void main(char[][] args) { try { throw new Exception("Hello"); } catch(Exception e) { writefln(e.msg); } } --- Ddbg breaks with an 'unhandled exception' here, even though the exception is handled! -Rob |
February 28, 2007 Re: ddbg 0.3 | ||||
---|---|---|---|---|
| ||||
Posted in reply to Robin Allen | sure you used 0.0.3? it doesn't break when i try that...
Robin Allen wrote:
> import std.stdio;
>
> void main(char[][] args)
> {
> try
> {
> throw new Exception("Hello");
> }
> catch(Exception e)
> {
> writefln(e.msg);
> }
> }
>
> ---
>
> Ddbg breaks with an 'unhandled exception' here, even though the exception is handled!
>
> -Rob
|
February 28, 2007 Re: ddbg 0.3 | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jascha Wetzel | Jascha Wetzel wrote:
> sure you used 0.0.3? it doesn't break when i try that...
>
> Robin Allen wrote:
>> import std.stdio;
>>
>> void main(char[][] args)
>> {
>> try
>> {
>> throw new Exception("Hello");
>> }
>> catch(Exception e)
>> {
>> writefln(e.msg);
>> }
>> }
>>
>> ---
>>
>> Ddbg breaks with an 'unhandled exception' here, even though the
>> exception is handled!
>>
>> -Rob
Oops, sorry, ignore me. Turns out I can't count to 0.0.3.
|
Copyright © 1999-2021 by the D Language Foundation