digitalmars.D.debugger - bug
- bobef (41/41) Apr 09 2007 As you can see below, if you set a bp in a loop and when it is reached y...
- Jascha Wetzel (2/53) Apr 10 2007
- bobef (1/1) Apr 12 2007 Tank you for the fix. But now the breakpoint is active forever which is ...
- bobef (1/1) Apr 12 2007 Sorry, my bad.
- dickl (7/7) Apr 12 2007 I see two problems with 0.1.1
- dickl (43/43) Apr 12 2007 The following code will show the debugger break at places where break
- Jascha Wetzel (3/62) Apr 19 2007 thanks!
- Jascha Wetzel (3/65) Apr 19 2007 wrong - the wchar problem will not be fixed. DMD uses ambiguous CV types
- dckl (3/71) Apr 19 2007 Well maybe 1.014 will fix the problem :)
- Jascha Wetzel (12/87) Apr 20 2007 it already evaluates as expected if you cast to wchar
- dickl (2/91) Apr 21 2007
As you can see below, if you set a bp in a loop and when it is reached you re-set it on the same line and run again, the break point is not working. test.d -------------------------------- module test; int main(char[][] argv) { for(int c=0;c<50;c++) { c=c; //line 7 c=c; c=c; c=c; c=c; } return 0; } C:\......>ddbg test.exe Ddbg v0.0.6 alpha - D Debugger Copyright (c) 2007 Jascha Wetzel http://ddbg.mainia.de/ ->bp test.d:7 Breakpoint set: test.d:7 0x402021 ->r ntdll.dll loaded KERNEL32.dll loaded USER32.dll loaded GDI32.dll loaded IMM32.dll loaded ADVAPI32.dll loaded RPCRT4.dll loaded LPK.dll loaded USP10.dll loaded msvcrt.dll loaded Breakpoint 0 hit test.d:7 0x402021 c=c; ->bp test.d:7 Breakpoint set: test.d:7 0x402021 ->r Process terminated ->
Apr 09 2007
this is already fixed in the next release. bobef wrote:As you can see below, if you set a bp in a loop and when it is reached you re-set it on the same line and run again, the break point is not working. test.d -------------------------------- module test; int main(char[][] argv) { for(int c=0;c<50;c++) { c=c; //line 7 c=c; c=c; c=c; c=c; } return 0; } C:\......>ddbg test.exe Ddbg v0.0.6 alpha - D Debugger Copyright (c) 2007 Jascha Wetzel http://ddbg.mainia.de/ ->bp test.d:7 Breakpoint set: test.d:7 0x402021 ->r ntdll.dll loaded KERNEL32.dll loaded USER32.dll loaded GDI32.dll loaded IMM32.dll loaded ADVAPI32.dll loaded RPCRT4.dll loaded LPK.dll loaded USP10.dll loaded msvcrt.dll loaded Breakpoint 0 hit test.d:7 0x402021 c=c; ->bp test.d:7 Breakpoint set: test.d:7 0x402021 ->r Process terminated ->
Apr 10 2007
Tank you for the fix. But now the breakpoint is active forever which is not true for breakpoints not inside a loop.
Apr 12 2007
I see two problems with 0.1.1 1) I set a breakpoint a few lines above a foreach loop. I continue and the debugger keeps breaking at the foreach loop. 2) When evaluating a wchar string, cast(wchar)str doesn't correctly show the value of the string. I'll try to reduce the code to something smaller and post the code later on..
Apr 12 2007
The following code will show the debugger break at places where break points are not set. Also, the wchar[] str doesn't evaluate properly. ----------------------------------------- import std.stdio; import std.utf; int main() { // cast(wchar)str doesn't evaluate properly in ddbg 0.1.1 wchar [] str = toUTF16(cast(char [])"Hello"); // set a break point here (line 10) writefln(str); //single step (over) until inside of the foreach loop Test t = new Test; foreach(wch;t) { wchar c = wch; // dispite doing a step (over), ddbg will stop inside of the onApply // doing a continue from this point , ddbg will break on the foreach statement writefln(c); } return 0; }//end int main() class Test { wchar [] str; this() { str=toUTF16(cast(char [])"Hello Again"); } int opApply(int delegate(inout wchar wch) dg) { int result=0; for(uint i=0;i<str.length;i++) { result=dg(str[i]); if(result) break; } return result; } }//end class Test
Apr 12 2007
thanks! both fixed in the next release dickl wrote:The following code will show the debugger break at places where break points are not set. Also, the wchar[] str doesn't evaluate properly. ----------------------------------------- import std.stdio; import std.utf; int main() { // cast(wchar)str doesn't evaluate properly in ddbg 0.1.1 wchar [] str = toUTF16(cast(char [])"Hello"); // set a break point here (line 10) writefln(str); //single step (over) until inside of the foreach loop Test t = new Test; foreach(wch;t) { wchar c = wch; // dispite doing a step (over), ddbg will stop inside of the onApply // doing a continue from this point , ddbg will break on the foreach statement writefln(c); } return 0; }//end int main() class Test { wchar [] str; this() { str=toUTF16(cast(char [])"Hello Again"); } int opApply(int delegate(inout wchar wch) dg) { int result=0; for(uint i=0;i<str.length;i++) { result=dg(str[i]); if(result) break; } return result; } }//end class Test
Apr 19 2007
wrong - the wchar problem will not be fixed. DMD uses ambiguous CV types Jascha Wetzel wrote:thanks! both fixed in the next release dickl wrote:The following code will show the debugger break at places where break points are not set. Also, the wchar[] str doesn't evaluate properly. ----------------------------------------- import std.stdio; import std.utf; int main() { // cast(wchar)str doesn't evaluate properly in ddbg 0.1.1 wchar [] str = toUTF16(cast(char [])"Hello"); // set a break point here (line 10) writefln(str); //single step (over) until inside of the foreach loop Test t = new Test; foreach(wch;t) { wchar c = wch; // dispite doing a step (over), ddbg will stop inside of the onApply // doing a continue from this point , ddbg will break on the foreach statement writefln(c); } return 0; }//end int main() class Test { wchar [] str; this() { str=toUTF16(cast(char [])"Hello Again"); } int opApply(int delegate(inout wchar wch) dg) { int result=0; for(uint i=0;i<str.length;i++) { result=dg(str[i]); if(result) break; } return result; } }//end class Test
Apr 19 2007
Well maybe 1.014 will fix the problem :) Would it be possible to have it evaluate if cast to a wchar ? Jascha Wetzel wrote:wrong - the wchar problem will not be fixed. DMD uses ambiguous CV types Jascha Wetzel wrote:thanks! both fixed in the next release dickl wrote:The following code will show the debugger break at places where break points are not set. Also, the wchar[] str doesn't evaluate properly. ----------------------------------------- import std.stdio; import std.utf; int main() { // cast(wchar)str doesn't evaluate properly in ddbg 0.1.1 wchar [] str = toUTF16(cast(char [])"Hello"); // set a break point here (line 10) writefln(str); //single step (over) until inside of the foreach loop Test t = new Test; foreach(wch;t) { wchar c = wch; // dispite doing a step (over), ddbg will stop inside of the onApply // doing a continue from this point , ddbg will break on the foreach statement writefln(c); } return 0; }//end int main() class Test { wchar [] str; this() { str=toUTF16(cast(char [])"Hello Again"); } int opApply(int delegate(inout wchar wch) dg) { int result=0; for(uint i=0;i<str.length;i++) { result=dg(str[i]); if(result) break; } return result; } }//end class Test
Apr 19 2007
it already evaluates as expected if you cast to wchar ->= str { [0] = 0x0048, [1] = 0x0065, [2] = 0x006c, [3] = 0x006c, [4] = 0x006f } ->= cast(wchar[])str "Hello" dckl wrote:Well maybe 1.014 will fix the problem :) Would it be possible to have it evaluate if cast to a wchar ? Jascha Wetzel wrote:wrong - the wchar problem will not be fixed. DMD uses ambiguous CV types Jascha Wetzel wrote:thanks! both fixed in the next release dickl wrote:The following code will show the debugger break at places where break points are not set. Also, the wchar[] str doesn't evaluate properly. ----------------------------------------- import std.stdio; import std.utf; int main() { // cast(wchar)str doesn't evaluate properly in ddbg 0.1.1 wchar [] str = toUTF16(cast(char [])"Hello"); // set a break point here (line 10) writefln(str); //single step (over) until inside of the foreach loop Test t = new Test; foreach(wch;t) { wchar c = wch; // dispite doing a step (over), ddbg will stop inside of the onApply // doing a continue from this point , ddbg will break on the foreach statement writefln(c); } return 0; }//end int main() class Test { wchar [] str; this() { str=toUTF16(cast(char [])"Hello Again"); } int opApply(int delegate(inout wchar wch) dg) { int result=0; for(uint i=0;i<str.length;i++) { result=dg(str[i]); if(result) break; } return result; } }//end class Test
Apr 20 2007
My stupidity, I was forgetting the [] in the cast Jascha Wetzel wrote:it already evaluates as expected if you cast to wchar ->= str { [0] = 0x0048, [1] = 0x0065, [2] = 0x006c, [3] = 0x006c, [4] = 0x006f } ->= cast(wchar[])str "Hello" dckl wrote:Well maybe 1.014 will fix the problem :) Would it be possible to have it evaluate if cast to a wchar ? Jascha Wetzel wrote:wrong - the wchar problem will not be fixed. DMD uses ambiguous CV types Jascha Wetzel wrote:thanks! both fixed in the next release dickl wrote:The following code will show the debugger break at places where break points are not set. Also, the wchar[] str doesn't evaluate properly. ----------------------------------------- import std.stdio; import std.utf; int main() { // cast(wchar)str doesn't evaluate properly in ddbg 0.1.1 wchar [] str = toUTF16(cast(char [])"Hello"); // set a break point here (line 10) writefln(str); //single step (over) until inside of the foreach loop Test t = new Test; foreach(wch;t) { wchar c = wch; // dispite doing a step (over), ddbg will stop inside of the onApply // doing a continue from this point , ddbg will break on the foreach statement writefln(c); } return 0; }//end int main() class Test { wchar [] str; this() { str=toUTF16(cast(char [])"Hello Again"); } int opApply(int delegate(inout wchar wch) dg) { int result=0; for(uint i=0;i<str.length;i++) { result=dg(str[i]); if(result) break; } return result; } }//end class Test
Apr 21 2007