digitalmars.D.debugger - ddbg 0.3
- Bill Baxter (25/25) Feb 26 2007 Stepping through loops works now, but the counter variable does not get
- Bill Baxter (3/3) Feb 26 2007 Setting the program arguments in codeblocks doesn't seem to work right.
- Jascha Wetzel (17/49) Feb 27 2007 the problem is the second declaration of i within the same frame. i'll
- Jascha Wetzel (19/19) Feb 27 2007 Here is my first shot at extending the syntax to include casts.
- Robin Allen (16/16) Feb 28 2007 import std.stdio;
- Jascha Wetzel (2/22) Feb 28 2007
- Robin Allen (2/25) Feb 28 2007 Oops, sorry, ignore me. Turns out I can't count to 0.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
Feb 26 2007
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
Feb 26 2007
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
Feb 27 2007
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 | '$'
Feb 27 2007
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
Feb 28 2007
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
Feb 28 2007
Jascha Wetzel wrote:sure you used 0.0.3? it doesn't break when i try that... Robin Allen wrote:Oops, sorry, ignore me. Turns out I can't count to 0.0.3.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
Feb 28 2007