digitalmars.D.announce - Ddbg 0.0.4 alpha release
- Jascha Wetzel (5/5) Mar 04 2007 Ddbg is a Win32 D Debugger
- Markus Dangl (4/11) Mar 04 2007 Great! I really love your debugger, it already saved my life several
- Jascha Wetzel (2/14) Mar 05 2007
- Bill Baxter (12/19) Mar 04 2007 Very nice!
- Jascha Wetzel (5/29) Mar 05 2007 slices are supported. in your example, the cast needs to be in brackets,
- Jascha Wetzel (7/37) Mar 05 2007 maybe i should add that you can also do things like
- Bill Baxter (15/17) Mar 05 2007 Ah, ok. I didn't think to try that for some reason.
- Jascha Wetzel (21/44) Mar 06 2007 the main reason i used the cast keyword is that it's faster and easier
- Jascha Wetzel (20/70) Mar 06 2007 oh - it's even worse than i thought. even those little ddbg expressions
- torhu (6/12) Mar 10 2007 What if ddbg sometime in the future allows you to set the value of a
- Jascha Wetzel (9/24) Mar 10 2007 setting single variables actually isn't that much work.
- Jascha Wetzel (6/30) Mar 05 2007 oh, the new console window is a change (also noted in the change-list ;)
- dickl (22/60) Mar 05 2007 dbbg is turning into a great tool !
- Jascha Wetzel (5/73) Mar 05 2007 oh - bug! :) fixed in 0.0.4.1 which i just put on the website.
- vanh (5/78) Mar 06 2007 Well, I got the latest 0.0.4.1 or at least I thought I did. It's still
- Jascha Wetzel (3/82) Mar 06 2007 it does when i try dickl's example.
- vanh (5/88) Mar 06 2007 I just copy and past the above code into codeblock and check the watch
- Jascha Wetzel (5/97) Mar 06 2007 you need to add a watch with a cast manually: cast(char[])this.str
- vanh (3/100) Mar 06 2007 Now I know. It a bit of a pain for a very short while I hope.
- dckl (3/80) Mar 06 2007 0.0.4.1 seems to have fixed the problem for me
- J Duncan (2/9) Mar 05 2007 Just curious when you are going to release the source code?
- Jascha Wetzel (4/14) Mar 05 2007 the source isn't in best shape. but i've put it here for you:
- J Duncan (2/6) Mar 05 2007 Very cool, thank you very much.
- Jascha Wetzel (4/11) Mar 06 2007 oh wait, you're one of the ddl.coff authors, right?
- J Duncan (5/16) Mar 08 2007 Awesome! That would be cool, I am porting some stuff to Tango right now
- Jascha Wetzel (4/21) Mar 09 2007 great! since i'm maintaining that code anyway, it would be convenient if
- Bill Baxter (19/22) Mar 05 2007 Did you attach the right license.txt file? Because this doesn't seem
- Bill Baxter (6/31) Mar 05 2007 Oh, wait... I see. I didn't look closely enough at the fine print. You...
- Jascha Wetzel (3/37) Mar 06 2007 i will probably loosen that at some point. but i'm still not sure how i
- dickl (36/69) Mar 06 2007 Another bug report...
- Jascha Wetzel (3/87) Mar 06 2007 thanks!
- dickl (42/42) Mar 06 2007 Found another one... The debugger doesn't always seems to single step
- Jascha Wetzel (3/48) Mar 06 2007 more thanks :)
- dickl (30/79) Mar 06 2007 Awesome..
- Jascha Wetzel (7/90) Mar 06 2007 one thing is, that you can't cast a static array to a dynamic array in
- sd (9/100) Mar 06 2007 Great work!
- Jascha Wetzel (3/104) Mar 06 2007 can you give an example?
- sd (12/117) Mar 07 2007 Sorry Jascha, I had two versions installed and an old one was active. =
- Sean Kelly (72/79) Mar 06 2007 A few things so far. The final example may actually be a problem with
- Jascha Wetzel (9/123) Mar 06 2007 there are a few commands that will not work before the debuggee is
- Jascha Wetzel (2/127) Mar 08 2007
- Jascha Wetzel (18/132) Mar 08 2007 there is also a problem with Tango in Ddbg prior to 0.0.4.4, which i've
- Sean Kelly (3/22) Mar 08 2007 Okay, that makes sense. I don't suppose it could execute
- Jascha Wetzel (8/31) Mar 08 2007 i thought about that first, so i wouldn't have to patch tango.
- Sean Kelly (6/12) Mar 08 2007 No problem. I thought about this a bit more this morning and I think
- Jascha Wetzel (8/24) Mar 10 2007 dmain2.d has another problem:
- Sean Kelly (6/14) Mar 10 2007 Darnit. I was afraid of this, but when I tried it with VC++8 it seemed
- Sean Kelly (4/7) Mar 10 2007 Done. Changing cr_trapExceptions now only has an effect if done before
- Jascha Wetzel (8/18) Mar 10 2007 great, thanks!
- dickl (12/19) Mar 07 2007 I see a problem when trying to list members of class. The debugger
- Jascha Wetzel (4/27) Mar 07 2007 good point about the utf8 routines. i will consider that.
- dickl (4/33) Mar 07 2007 OK, I think I got it narrowed down to only 2 modules. I'll email you the...
Ddbg is a Win32 D Debugger http://ddbg.mainia.de/releases.html This release mainly adds support for type cast and associative arrays. Type casts can be used to workaround the missing array and enum support in DMD's debug symbols.
Mar 04 2007
Jascha Wetzel schrieb:Ddbg is a Win32 D Debugger http://ddbg.mainia.de/releases.html This release mainly adds support for type cast and associative arrays. Type casts can be used to workaround the missing array and enum support in DMD's debug symbols.Great! I really love your debugger, it already saved my life several times the last week, i'm working on a SAT Solver in D and without your debugger it would have been nearly impossible to find some of the bugs!
Mar 04 2007
thanks, i'm glad it's being put to good use! Markus Dangl wrote:Jascha Wetzel schrieb:Ddbg is a Win32 D Debugger http://ddbg.mainia.de/releases.html This release mainly adds support for type cast and associative arrays. Type casts can be used to workaround the missing array and enum support in DMD's debug symbols.Great! I really love your debugger, it already saved my life several times the last week, i'm working on a SAT Solver in D and without your debugger it would have been nearly impossible to find some of the bugs!
Mar 05 2007
Jascha Wetzel wrote:Ddbg is a Win32 D Debugger http://ddbg.mainia.de/releases.html This release mainly adds support for type cast and associative arrays. Type casts can be used to workaround the missing array and enum support in DMD's debug symbols.Very nice! cast(char[][])args works too. This is starting to be really usable! It would be nice to offer a way to print only part of a list though. Most natural would probably be to expand the expression grammar to allow slices -- cast(int[])hugelist[200..210]; I also noticed that the console window now appears with my program's writefln output. Did you change something there? Or maybe it was there before and I just didn't notice it? (It appears behind the debugger window.) --bb
Mar 04 2007
slices are supported. in your example, the cast needs to be in brackets, though: (cast(int[])hugelist)[200..210] i've also updated the (very brief) docs for this release: http://ddbg.mainia.de/doc.html Bill Baxter wrote:Jascha Wetzel wrote:Ddbg is a Win32 D Debugger http://ddbg.mainia.de/releases.html This release mainly adds support for type cast and associative arrays. Type casts can be used to workaround the missing array and enum support in DMD's debug symbols.Very nice! cast(char[][])args works too. This is starting to be really usable! It would be nice to offer a way to print only part of a list though. Most natural would probably be to expand the expression grammar to allow slices -- cast(int[])hugelist[200..210]; I also noticed that the console window now appears with my program's writefln output. Did you change something there? Or maybe it was there before and I just didn't notice it? (It appears behind the debugger window.) --bb
Mar 05 2007
maybe i should add that you can also do things like (cast(uint[])hugelist)[start_index .. end_index] if start_index and end_index are valid expressions/variables or (cast(uint[])(cast(mystruct)foo).hugelist)[(cast(uint)bla.start .. end] and so on. all sorts of nested combinations should be possible. Jascha Wetzel wrote:slices are supported. in your example, the cast needs to be in brackets, though: (cast(int[])hugelist)[200..210] i've also updated the (very brief) docs for this release: http://ddbg.mainia.de/doc.html Bill Baxter wrote:Jascha Wetzel wrote:Ddbg is a Win32 D Debugger http://ddbg.mainia.de/releases.html This release mainly adds support for type cast and associative arrays. Type casts can be used to workaround the missing array and enum support in DMD's debug symbols.Very nice! cast(char[][])args works too. This is starting to be really usable! It would be nice to offer a way to print only part of a list though. Most natural would probably be to expand the expression grammar to allow slices -- cast(int[])hugelist[200..210]; I also noticed that the console window now appears with my program's writefln output. Did you change something there? Or maybe it was there before and I just didn't notice it? (It appears behind the debugger window.) --bb
Mar 05 2007
Jascha Wetzel wrote:slices are supported. in your example, the cast needs to be in brackets, though: (cast(int[])hugelist)[200..210]Ah, ok. I didn't think to try that for some reason. So what do you think about allowing C-style (or even better -- c++ style) casts? I think the various reasons they are not allowed in D do not really apply to an interactive debugger. The main thing you want in a debugger is just something easy to type and read. I think C++ function-style casts fit the bill very nicely there. In Visual Studio for instance I find I often end up with ridiculous looking watch expressions that are hard to read because of the cast syntax. Just a thought. Basically idea is that the debugger cast syntax doesn't *have* to look like the language syntax. (Note that in Visual Studio, for example, C cast syntax is all that's supported whether you're debugging C or C++). --bb
Mar 05 2007
the main reason i used the cast keyword is that it's faster and easier to parse. (asdf.qwer) can be interpreted as class/struct access or a cast to the type qwer in package asdf. to tell them apart you either need to know semantics, namely whether asdf and qwer are variables, types or packages, or you need arbitrary lookahead. to do the latter, you can adjust the syntax to identify bracketed terms as casts if they're followed by an identifier and identify them as expressions if they're followed by an operator or nothing. atm the parser is a recursive descent LL(k) parser and not very fast. it's not even working in linear time. using syntax that makes use of arbitrary lookaheads will make it worse. considering that expressions will potentially have to be evaluated very often (open watch window while stepping through the code), i really want this to be as fast as possible and therefore use a LALR parser in some of the next releases, which doesn't allow arbitrary lookaheads. so if you don't like the cast keyword for it's length, then i could add an alternative, shorthand syntax, that doesn't require arbitrary lookahead. for example: {char[][]}args. i guess ddbg expressions will never need the D meaning of curly brackets, so this will not collide at some point. Bill Baxter wrote:Jascha Wetzel wrote:slices are supported. in your example, the cast needs to be in brackets, though: (cast(int[])hugelist)[200..210]Ah, ok. I didn't think to try that for some reason. So what do you think about allowing C-style (or even better -- c++ style) casts? I think the various reasons they are not allowed in D do not really apply to an interactive debugger. The main thing you want in a debugger is just something easy to type and read. I think C++ function-style casts fit the bill very nicely there. In Visual Studio for instance I find I often end up with ridiculous looking watch expressions that are hard to read because of the cast syntax. Just a thought. Basically idea is that the debugger cast syntax doesn't *have* to look like the language syntax. (Note that in Visual Studio, for example, C cast syntax is all that's supported whether you're debugging C or C++). --bb
Mar 06 2007
to do the latter, you can adjust the syntax to identify bracketed terms as casts if they're followed by an identifier and identify them as expressions if they're followed by an operator or nothing.oh - it's even worse than i thought. even those little ddbg expressions can't be parsed *at all* without semantic information: is (asdf.qwer)(yxcv.fghj) a valid expression? you can only tell if you know what asdf.qwer and yxcv.fghj are. it might by (cast)(expr), (cast)(cast) or (expr)(expr). the first is ok, the latter two are invalid in ddbg. correct me if i'm wrong here, but these casts are also one root of evil in c++, since expressions like (foo)(bar) aren't parseable without semantic information about the identifiers involved. foo could evaluate to an object that has the () operator overwritten, then (bar) is an argument list. it could also be a class name, then (foo) is a cast and (bar) is another expression. this stuff is pandora's box - i won't open it ;) we can have the {cast} syntax though, if you like. i can't possibly think of anything else ddbg could ever need the curly brackets for. to be sure we could also use something else: §cast§ #cast :) Jascha Wetzel wrote:the main reason i used the cast keyword is that it's faster and easier to parse. (asdf.qwer) can be interpreted as class/struct access or a cast to the type qwer in package asdf. to tell them apart you either need to know semantics, namely whether asdf and qwer are variables, types or packages, or you need arbitrary lookahead. to do the latter, you can adjust the syntax to identify bracketed terms as casts if they're followed by an identifier and identify them as expressions if they're followed by an operator or nothing. atm the parser is a recursive descent LL(k) parser and not very fast. it's not even working in linear time. using syntax that makes use of arbitrary lookaheads will make it worse. considering that expressions will potentially have to be evaluated very often (open watch window while stepping through the code), i really want this to be as fast as possible and therefore use a LALR parser in some of the next releases, which doesn't allow arbitrary lookaheads. so if you don't like the cast keyword for it's length, then i could add an alternative, shorthand syntax, that doesn't require arbitrary lookahead. for example: {char[][]}args. i guess ddbg expressions will never need the D meaning of curly brackets, so this will not collide at some point. Bill Baxter wrote:Jascha Wetzel wrote:slices are supported. in your example, the cast needs to be in brackets, though: (cast(int[])hugelist)[200..210]Ah, ok. I didn't think to try that for some reason. So what do you think about allowing C-style (or even better -- c++ style) casts? I think the various reasons they are not allowed in D do not really apply to an interactive debugger. The main thing you want in a debugger is just something easy to type and read. I think C++ function-style casts fit the bill very nicely there. In Visual Studio for instance I find I often end up with ridiculous looking watch expressions that are hard to read because of the cast syntax. Just a thought. Basically idea is that the debugger cast syntax doesn't *have* to look like the language syntax. (Note that in Visual Studio, for example, C cast syntax is all that's supported whether you're debugging C or C++). --bb
Mar 06 2007
Jascha Wetzel wrote:i can't possibly think of anything else ddbg could ever need the curly brackets for. to be sure we could also use something else: §cast§ #cast :)What if ddbg sometime in the future allows you to set the value of a struct by using a struct literal? set point = { 5, 77 } Might be a while until that feature materializes, but who knows. Setting variables during debugging comes in handy sometimes.
Mar 10 2007
setting single variables actually isn't that much work. the current expression parser produces a memory chunk plus it's type. so what's left is doing that twice (for lvalue and rvalue), checking whether the types are identical and then copying one chunk over the other. maybe i can get this into v0.0.5. your example would become set point.x = 5 set point.y = 77 torhu wrote:Jascha Wetzel wrote:i can't possibly think of anything else ddbg could ever need the curly brackets for. to be sure we could also use something else: §cast§ #cast :)What if ddbg sometime in the future allows you to set the value of a struct by using a struct literal? set point = { 5, 77 } Might be a while until that feature materializes, but who knows. Setting variables during debugging comes in handy sometimes.
Mar 10 2007
oh, the new console window is a change (also noted in the change-list ;) i thought that should be the better way to separate the program's from the debugger's ouput in codeblocks. you can switch between shared console and new console in Ddbg mode only, though. i forgot to add this for GDB mode. it's always on there. Bill Baxter wrote:Jascha Wetzel wrote:Ddbg is a Win32 D Debugger http://ddbg.mainia.de/releases.html This release mainly adds support for type cast and associative arrays. Type casts can be used to workaround the missing array and enum support in DMD's debug symbols.Very nice! cast(char[][])args works too. This is starting to be really usable! It would be nice to offer a way to print only part of a list though. Most natural would probably be to expand the expression grammar to allow slices -- cast(int[])hugelist[200..210]; I also noticed that the console window now appears with my program's writefln output. Did you change something there? Or maybe it was there before and I just didn't notice it? (It appears behind the debugger window.) --bb
Mar 05 2007
Jascha Wetzel wrote:Ddbg is a Win32 D Debugger http://ddbg.mainia.de/releases.html This release mainly adds support for type cast and associative arrays. Type casts can be used to workaround the missing array and enum support in DMD's debug symbols.dbbg is turning into a great tool ! I took it from the docs that I should now be able to view contents of strings. This doesn't seem to be the case, at least for class members. Test program --------------------- import std.stdio; int main(char[][] args) { FOO foo = new FOO; return 0; } class FOO { private char [] str = "Hello"; this() { writefln(str); } } Debug results. Note ddbg reports str as null -------------------M:\D-projects\TEST1>ddbg test.exe Ddbg v0.0.4 alpha - D Debugger Copyright (c) 2007 Jascha Wetzel http://ddbg.mainia.de/ ->bp test.d:1 Breakpoint set: test.d:4 0x402010 ->r ntdll.dll loaded KERNEL32.dll loaded USER32.dll loaded GDI32.dll loaded Breakpoint 0 hit test.d:4 0x402010 int main(char[][] args) ->in test.d:6 0x402014 FOO foo = new FOO; -> test.d:15 0x402030 this() -> test.d:17 0x402037 writefln(str); ->lsv Scope: MFZC4test3FOO test.FOO._ctor class test.FOO* this [ebp-4] = {str = 0x0041409800000005} ->= (cast(char[])this.str) null ->
Mar 05 2007
oh - bug! :) fixed in 0.0.4.1 which i just put on the website. pointers didn't get handled correctly by the expression evaluator and therefore the "this" reference wasn't interpreted correctly. thanks for the report! dickl wrote:Jascha Wetzel wrote:Ddbg is a Win32 D Debugger http://ddbg.mainia.de/releases.html This release mainly adds support for type cast and associative arrays. Type casts can be used to workaround the missing array and enum support in DMD's debug symbols.dbbg is turning into a great tool ! I took it from the docs that I should now be able to view contents of strings. This doesn't seem to be the case, at least for class members. Test program --------------------- import std.stdio; int main(char[][] args) { FOO foo = new FOO; return 0; } class FOO { private char [] str = "Hello"; this() { writefln(str); } } Debug results. Note ddbg reports str as null -------------------M:\D-projects\TEST1>ddbg test.exe Ddbg v0.0.4 alpha - D Debugger Copyright (c) 2007 Jascha Wetzel http://ddbg.mainia.de/ ->bp test.d:1 Breakpoint set: test.d:4 0x402010 ->r ntdll.dll loaded KERNEL32.dll loaded USER32.dll loaded GDI32.dll loaded Breakpoint 0 hit test.d:4 0x402010 int main(char[][] args) ->in test.d:6 0x402014 FOO foo = new FOO; -> test.d:15 0x402030 this() -> test.d:17 0x402037 writefln(str); ->lsv Scope: MFZC4test3FOO test.FOO._ctor class test.FOO* this [ebp-4] = {str = 0x0041409800000005} ->= (cast(char[])this.str) null ->
Mar 05 2007
Jascha Wetzel wrote:oh - bug! :) fixed in 0.0.4.1 which i just put on the website. pointers didn't get handled correctly by the expression evaluator and therefore the "this" reference wasn't interpreted correctly. thanks for the report! dickl wrote:Well, I got the latest 0.0.4.1 or at least I thought I did. It's still didn't show the content of the str only the address of the string. vtpJascha Wetzel wrote:Ddbg is a Win32 D Debugger http://ddbg.mainia.de/releases.html This release mainly adds support for type cast and associative arrays. Type casts can be used to workaround the missing array and enum support in DMD's debug symbols.dbbg is turning into a great tool ! I took it from the docs that I should now be able to view contents of strings. This doesn't seem to be the case, at least for class members. Test program --------------------- import std.stdio; int main(char[][] args) { FOO foo = new FOO; return 0; } class FOO { private char [] str = "Hello"; this() { writefln(str); } } Debug results. Note ddbg reports str as null -------------------M:\D-projects\TEST1>ddbg test.exe Ddbg v0.0.4 alpha - D Debugger Copyright (c) 2007 Jascha Wetzel http://ddbg.mainia.de/ ->bp test.d:1 Breakpoint set: test.d:4 0x402010 ->r ntdll.dll loaded KERNEL32.dll loaded USER32.dll loaded GDI32.dll loaded Breakpoint 0 hit test.d:4 0x402010 int main(char[][] args) ->in test.d:6 0x402014 FOO foo = new FOO; -> test.d:15 0x402030 this() -> test.d:17 0x402037 writefln(str); ->lsv Scope: MFZC4test3FOO test.FOO._ctor class test.FOO* this [ebp-4] = {str = 0x0041409800000005} ->= (cast(char[])this.str) null ->
Mar 06 2007
it does when i try dickl's example. can you give an example where it doesn't work? vanh wrote:Jascha Wetzel wrote:oh - bug! :) fixed in 0.0.4.1 which i just put on the website. pointers didn't get handled correctly by the expression evaluator and therefore the "this" reference wasn't interpreted correctly. thanks for the report! dickl wrote:Well, I got the latest 0.0.4.1 or at least I thought I did. It's still didn't show the content of the str only the address of the string. vtpJascha Wetzel wrote:Ddbg is a Win32 D Debugger http://ddbg.mainia.de/releases.html This release mainly adds support for type cast and associative arrays. Type casts can be used to workaround the missing array and enum support in DMD's debug symbols.dbbg is turning into a great tool ! I took it from the docs that I should now be able to view contents of strings. This doesn't seem to be the case, at least for class members. Test program --------------------- import std.stdio; int main(char[][] args) { FOO foo = new FOO; return 0; } class FOO { private char [] str = "Hello"; this() { writefln(str); } } Debug results. Note ddbg reports str as null -------------------M:\D-projects\TEST1>ddbg test.exe Ddbg v0.0.4 alpha - D Debugger Copyright (c) 2007 Jascha Wetzel http://ddbg.mainia.de/ ->bp test.d:1 Breakpoint set: test.d:4 0x402010 ->r ntdll.dll loaded KERNEL32.dll loaded USER32.dll loaded GDI32.dll loaded Breakpoint 0 hit test.d:4 0x402010 int main(char[][] args) ->in test.d:6 0x402014 FOO foo = new FOO; -> test.d:15 0x402030 this() -> test.d:17 0x402037 writefln(str); ->lsv Scope: MFZC4test3FOO test.FOO._ctor class test.FOO* this [ebp-4] = {str = 0x0041409800000005} ->= (cast(char[])this.str) null ->
Mar 06 2007
Jascha Wetzel wrote:it does when i try dickl's example. can you give an example where it doesn't work? vanh wrote:I just copy and past the above code into codeblock and check the watch window while stepping through it. All I see is str=0x0041408000000005 vtpJascha Wetzel wrote:oh - bug! :) fixed in 0.0.4.1 which i just put on the website. pointers didn't get handled correctly by the expression evaluator and therefore the "this" reference wasn't interpreted correctly. thanks for the report! dickl wrote:Well, I got the latest 0.0.4.1 or at least I thought I did. It's still didn't show the content of the str only the address of the string. vtpJascha Wetzel wrote:Ddbg is a Win32 D Debugger http://ddbg.mainia.de/releases.html This release mainly adds support for type cast and associative arrays. Type casts can be used to workaround the missing array and enum support in DMD's debug symbols.dbbg is turning into a great tool ! I took it from the docs that I should now be able to view contents of strings. This doesn't seem to be the case, at least for class members. Test program --------------------- import std.stdio; int main(char[][] args) { FOO foo = new FOO; return 0; } class FOO { private char [] str = "Hello"; this() { writefln(str); } } Debug results. Note ddbg reports str as null -------------------M:\D-projects\TEST1>ddbg test.exe Ddbg v0.0.4 alpha - D Debugger Copyright (c) 2007 Jascha Wetzel http://ddbg.mainia.de/ ->bp test.d:1 Breakpoint set: test.d:4 0x402010 ->r ntdll.dll loaded KERNEL32.dll loaded USER32.dll loaded GDI32.dll loaded Breakpoint 0 hit test.d:4 0x402010 int main(char[][] args) ->in test.d:6 0x402014 FOO foo = new FOO; -> test.d:15 0x402030 this() -> test.d:17 0x402037 writefln(str); ->lsv Scope: MFZC4test3FOO test.FOO._ctor class test.FOO* this [ebp-4] = {str = 0x0041409800000005} ->= (cast(char[])this.str) null ->
Mar 06 2007
you need to add a watch with a cast manually: cast(char[])this.str DMD doesn't add the full type to array symbols, yet, that's why ddbg can't find out that this.str is a char[] by itself. therefore you have to help out with the cast. vanh wrote:Jascha Wetzel wrote:it does when i try dickl's example. can you give an example where it doesn't work? vanh wrote:I just copy and past the above code into codeblock and check the watch window while stepping through it. All I see is str=0x0041408000000005 vtpJascha Wetzel wrote:oh - bug! :) fixed in 0.0.4.1 which i just put on the website. pointers didn't get handled correctly by the expression evaluator and therefore the "this" reference wasn't interpreted correctly. thanks for the report! dickl wrote:Well, I got the latest 0.0.4.1 or at least I thought I did. It's still didn't show the content of the str only the address of the string. vtpJascha Wetzel wrote:Ddbg is a Win32 D Debugger http://ddbg.mainia.de/releases.html This release mainly adds support for type cast and associative arrays. Type casts can be used to workaround the missing array and enum support in DMD's debug symbols.dbbg is turning into a great tool ! I took it from the docs that I should now be able to view contents of strings. This doesn't seem to be the case, at least for class members. Test program --------------------- import std.stdio; int main(char[][] args) { FOO foo = new FOO; return 0; } class FOO { private char [] str = "Hello"; this() { writefln(str); } } Debug results. Note ddbg reports str as null -------------------M:\D-projects\TEST1>ddbg test.exe Ddbg v0.0.4 alpha - D Debugger Copyright (c) 2007 Jascha Wetzel http://ddbg.mainia.de/ ->bp test.d:1 Breakpoint set: test.d:4 0x402010 ->r ntdll.dll loaded KERNEL32.dll loaded USER32.dll loaded GDI32.dll loaded Breakpoint 0 hit test.d:4 0x402010 int main(char[][] args) ->in test.d:6 0x402014 FOO foo = new FOO; -> test.d:15 0x402030 this() -> test.d:17 0x402037 writefln(str); ->lsv Scope: MFZC4test3FOO test.FOO._ctor class test.FOO* this [ebp-4] = {str = 0x0041409800000005} ->= (cast(char[])this.str) null ->
Mar 06 2007
Jascha Wetzel wrote:you need to add a watch with a cast manually: cast(char[])this.str DMD doesn't add the full type to array symbols, yet, that's why ddbg can't find out that this.str is a char[] by itself. therefore you have to help out with the cast. vanh wrote:Now I know. It a bit of a pain for a very short while I hope. vtpJascha Wetzel wrote:it does when i try dickl's example. can you give an example where it doesn't work? vanh wrote:I just copy and past the above code into codeblock and check the watch window while stepping through it. All I see is str=0x0041408000000005 vtpJascha Wetzel wrote:oh - bug! :) fixed in 0.0.4.1 which i just put on the website. pointers didn't get handled correctly by the expression evaluator and therefore the "this" reference wasn't interpreted correctly. thanks for the report! dickl wrote:Well, I got the latest 0.0.4.1 or at least I thought I did. It's still didn't show the content of the str only the address of the string. vtpJascha Wetzel wrote:Ddbg is a Win32 D Debugger http://ddbg.mainia.de/releases.html This release mainly adds support for type cast and associative arrays. Type casts can be used to workaround the missing array and enum support in DMD's debug symbols.dbbg is turning into a great tool ! I took it from the docs that I should now be able to view contents of strings. This doesn't seem to be the case, at least for class members. Test program --------------------- import std.stdio; int main(char[][] args) { FOO foo = new FOO; return 0; } class FOO { private char [] str = "Hello"; this() { writefln(str); } } Debug results. Note ddbg reports str as null -------------------M:\D-projects\TEST1>ddbg test.exe Ddbg v0.0.4 alpha - D Debugger Copyright (c) 2007 Jascha Wetzel http://ddbg.mainia.de/ ->bp test.d:1 Breakpoint set: test.d:4 0x402010 ->r ntdll.dll loaded KERNEL32.dll loaded USER32.dll loaded GDI32.dll loaded Breakpoint 0 hit test.d:4 0x402010 int main(char[][] args) ->in test.d:6 0x402014 FOO foo = new FOO; -> test.d:15 0x402030 this() -> test.d:17 0x402037 writefln(str); ->lsv Scope: MFZC4test3FOO test.FOO._ctor class test.FOO* this [ebp-4] = {str = 0x0041409800000005} ->= (cast(char[])this.str) null ->
Mar 06 2007
0.0.4.1 seems to have fixed the problem for me Can't wait to uninstall Visual Studio from my computer :-) Jascha Wetzel wrote:oh - bug! :) fixed in 0.0.4.1 which i just put on the website. pointers didn't get handled correctly by the expression evaluator and therefore the "this" reference wasn't interpreted correctly. thanks for the report! dickl wrote:Jascha Wetzel wrote:Ddbg is a Win32 D Debugger http://ddbg.mainia.de/releases.html This release mainly adds support for type cast and associative arrays. Type casts can be used to workaround the missing array and enum support in DMD's debug symbols.dbbg is turning into a great tool ! I took it from the docs that I should now be able to view contents of strings. This doesn't seem to be the case, at least for class members. Test program --------------------- import std.stdio; int main(char[][] args) { FOO foo = new FOO; return 0; } class FOO { private char [] str = "Hello"; this() { writefln(str); } } Debug results. Note ddbg reports str as null -------------------M:\D-projects\TEST1>ddbg test.exe Ddbg v0.0.4 alpha - D Debugger Copyright (c) 2007 Jascha Wetzel http://ddbg.mainia.de/ ->bp test.d:1 Breakpoint set: test.d:4 0x402010 ->r ntdll.dll loaded KERNEL32.dll loaded USER32.dll loaded GDI32.dll loaded Breakpoint 0 hit test.d:4 0x402010 int main(char[][] args) ->in test.d:6 0x402014 FOO foo = new FOO; -> test.d:15 0x402030 this() -> test.d:17 0x402037 writefln(str); ->lsv Scope: MFZC4test3FOO test.FOO._ctor class test.FOO* this [ebp-4] = {str = 0x0041409800000005} ->= (cast(char[])this.str) null ->
Mar 06 2007
Jascha Wetzel wrote:Ddbg is a Win32 D Debugger http://ddbg.mainia.de/releases.html This release mainly adds support for type cast and associative arrays. Type casts can be used to workaround the missing array and enum support in DMD's debug symbols.Just curious when you are going to release the source code?
Mar 05 2007
the source isn't in best shape. but i've put it here for you: http://ddbg.mainia.de/Ddbg-0.0.4.1-alpha-src.zip the license is proprietary, so it's just food for curiosity. J Duncan wrote:Jascha Wetzel wrote:Ddbg is a Win32 D Debugger http://ddbg.mainia.de/releases.html This release mainly adds support for type cast and associative arrays. Type casts can be used to workaround the missing array and enum support in DMD's debug symbols.Just curious when you are going to release the source code?
Mar 05 2007
Jascha Wetzel wrote:the source isn't in best shape. but i've put it here for you: http://ddbg.mainia.de/Ddbg-0.0.4.1-alpha-src.zip the license is proprietary, so it's just food for curiosity.Very cool, thank you very much.
Mar 05 2007
oh wait, you're one of the ddl.coff authors, right? if you happen to be interested in the codeview stuff from ddbg or something, i'll donate this to the ddl project anytime... J Duncan wrote:Jascha Wetzel wrote:the source isn't in best shape. but i've put it here for you: http://ddbg.mainia.de/Ddbg-0.0.4.1-alpha-src.zip the license is proprietary, so it's just food for curiosity.Very cool, thank you very much.
Mar 06 2007
Jascha Wetzel wrote:oh wait, you're one of the ddl.coff authors, right? if you happen to be interested in the codeview stuff from ddbg or something, i'll donate this to the ddl project anytime... J Duncan wrote:Awesome! That would be cool, I am porting some stuff to Tango right now and am planning to convert at least ddl.coff to tango soon. I will definitely look into including your stuff as it looks like its more refined than the stuff piled into ddl.coff....Jascha Wetzel wrote:the source isn't in best shape. but i've put it here for you: http://ddbg.mainia.de/Ddbg-0.0.4.1-alpha-src.zip the license is proprietary, so it's just food for curiosity.Very cool, thank you very much.
Mar 08 2007
great! since i'm maintaining that code anyway, it would be convenient if we could agree on small changes that make the code usable to both projects. then i could submit updates easily. J Duncan wrote:Jascha Wetzel wrote:oh wait, you're one of the ddl.coff authors, right? if you happen to be interested in the codeview stuff from ddbg or something, i'll donate this to the ddl project anytime... J Duncan wrote:Awesome! That would be cool, I am porting some stuff to Tango right now and am planning to convert at least ddl.coff to tango soon. I will definitely look into including your stuff as it looks like its more refined than the stuff piled into ddl.coff....Jascha Wetzel wrote:the source isn't in best shape. but i've put it here for you: http://ddbg.mainia.de/Ddbg-0.0.4.1-alpha-src.zip the license is proprietary, so it's just food for curiosity.Very cool, thank you very much.
Mar 09 2007
Jascha Wetzel wrote:the source isn't in best shape. but i've put it here for you: http://ddbg.mainia.de/Ddbg-0.0.4.1-alpha-src.zip the license is proprietary, so it's just food for curiosity.Did you attach the right license.txt file? Because this doesn't seem very proprietary to me: """ Ddbg is Copyright (C) 2007 Jascha Wetzel Official website: http://ddbg.mainia.de This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, including commercial applications, and to redistribute it, subject to the following restrictions: * The origin of this software must not be misrepresented; you must not claim that you wrote the original software. * You may only redistribute the software unmodified, in the form and prepackaging it is available from the official website. """ If that's the license you meant to include, then boffo! That's great news. --bb
Mar 05 2007
Bill Baxter wrote:Jascha Wetzel wrote:Oh, wait... I see. I didn't look closely enough at the fine print. You can use it for any purpose, except for <huge category of potential purposes>. Oh well. Thanks for putting the source code out anyway. --bbthe source isn't in best shape. but i've put it here for you: http://ddbg.mainia.de/Ddbg-0.0.4.1-alpha-src.zip the license is proprietary, so it's just food for curiosity.Did you attach the right license.txt file? Because this doesn't seem very proprietary to me: """ Ddbg is Copyright (C) 2007 Jascha Wetzel Official website: http://ddbg.mainia.de This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, including commercial applications, and to redistribute it, subject to the following restrictions: * The origin of this software must not be misrepresented; you must not claim that you wrote the original software. * You may only redistribute the software unmodified, in the form and prepackaging it is available from the official website. """
Mar 05 2007
i will probably loosen that at some point. but i'm still not sure how i want to deal with this beyond the fact that ddbg will be free of charge. Bill Baxter wrote:Bill Baxter wrote:Jascha Wetzel wrote:Oh, wait... I see. I didn't look closely enough at the fine print. You can use it for any purpose, except for <huge category of potential purposes>. Oh well. Thanks for putting the source code out anyway. --bbthe source isn't in best shape. but i've put it here for you: http://ddbg.mainia.de/Ddbg-0.0.4.1-alpha-src.zip the license is proprietary, so it's just food for curiosity.Did you attach the right license.txt file? Because this doesn't seem very proprietary to me: """ Ddbg is Copyright (C) 2007 Jascha Wetzel Official website: http://ddbg.mainia.de This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, including commercial applications, and to redistribute it, subject to the following restrictions: * The origin of this software must not be misrepresented; you must not claim that you wrote the original software. * You may only redistribute the software unmodified, in the form and prepackaging it is available from the official website. """
Mar 06 2007
Another bug report... Debugger crashes when trying to list the class variables. The variable is a struct which contains an array of stuff. Source -------------------- import std.stdio; int main() { Foo f = new Foo; return 0; }//end int main() enum Stuff:ubyte { Item1=0, Item2, Item3, Item4, }//end enum Stuff:ubyte const uint Num=Stuff.max; struct Table { bool [Num]TableStuff; }//end struct Table class Foo { char [] FileName="Somefile.txt"; Table t1; this() { writefln(FileName); } }//end class F00 Debug results -------------------------------Ddbg v0.0.4.1 alpha - D Debugger Copyright (c) 2007 Jascha Wetzel http://ddbg.mainia.de/ ->bp test.d:1 Breakpoint set: test.d:4 0x402010 ->r ntdll.dll loaded KERNEL32.dll loaded USER32.dll loaded GDI32.dll loaded Breakpoint 0 hit test.d:4 0x402010 int main() ->in test.d:6 0x402014 Foo f = new Foo; -> test.d:33 0x402030 this() -> test.d:35 0x402037 writefln(FileName); ->lsv Scope: MFZC4test3Foo test.Foo._ctor this [ebp-4] = Error: array cast misalignment_____________________________________________________ Jascha Wetzel wrote:Ddbg is a Win32 D Debugger http://ddbg.mainia.de/releases.html This release mainly adds support for type cast and associative arrays. Type casts can be used to workaround the missing array and enum support in DMD's debug symbols.
Mar 06 2007
thanks! fixed in 0.0.4.2 dickl wrote:Another bug report... Debugger crashes when trying to list the class variables. The variable is a struct which contains an array of stuff. Source -------------------- import std.stdio; int main() { Foo f = new Foo; return 0; }//end int main() enum Stuff:ubyte { Item1=0, Item2, Item3, Item4, }//end enum Stuff:ubyte const uint Num=Stuff.max; struct Table { bool [Num]TableStuff; }//end struct Table class Foo { char [] FileName="Somefile.txt"; Table t1; this() { writefln(FileName); } }//end class F00 Debug results -------------------------------Ddbg v0.0.4.1 alpha - D Debugger Copyright (c) 2007 Jascha Wetzel http://ddbg.mainia.de/ ->bp test.d:1 Breakpoint set: test.d:4 0x402010 ->r ntdll.dll loaded KERNEL32.dll loaded USER32.dll loaded GDI32.dll loaded Breakpoint 0 hit test.d:4 0x402010 int main() ->in test.d:6 0x402014 Foo f = new Foo; -> test.d:33 0x402030 this() -> test.d:35 0x402037 writefln(FileName); ->lsv Scope: MFZC4test3Foo test.Foo._ctor this [ebp-4] = Error: array cast misalignment_____________________________________________________ Jascha Wetzel wrote:Ddbg is a Win32 D Debugger http://ddbg.mainia.de/releases.html This release mainly adds support for type cast and associative arrays. Type casts can be used to workaround the missing array and enum support in DMD's debug symbols.
Mar 06 2007
Found another one... The debugger doesn't always seems to single step correctly. Happens with "in" and "ov" stepping. Steps correctly up to a point then the app runs to completion. Source ---------------------- import std.stdio; import std.c.string; int main() { //QSettings f = new QSettings; char [1024] Cmd; strcpy(Cmd.ptr, "Hello"); printf("%s\n",Cmd.ptr); // have to printf 'cos writefln throws writefln("Finis"); return 0; }//end int main() Debug Results --------------------- Ddbg v0.0.4.2 alpha - D Debugger Copyright (c) 2007 Jascha Wetzel http://ddbg.mainia.de/ ->bp test.d:1 Breakpoint set: test.d:4 0x402010 ->r ntdll.dll loaded KERNEL32.dll loaded USER32.dll loaded GDI32.dll loaded Breakpoint 0 hit test.d:4 0x402010 int main() ->in test.d:7 0x402015 char [1024] Cmd; -> test.d:8 0x402027 strcpy(Cmd.ptr, "Hello"); -> Hello Finis Process terminated ->
Mar 06 2007
more thanks :) fixed in 0.0.4.3 dickl wrote:Found another one... The debugger doesn't always seems to single step correctly. Happens with "in" and "ov" stepping. Steps correctly up to a point then the app runs to completion. Source ---------------------- import std.stdio; import std.c.string; int main() { //QSettings f = new QSettings; char [1024] Cmd; strcpy(Cmd.ptr, "Hello"); printf("%s\n",Cmd.ptr); // have to printf 'cos writefln throws writefln("Finis"); return 0; }//end int main() Debug Results --------------------- Ddbg v0.0.4.2 alpha - D Debugger Copyright (c) 2007 Jascha Wetzel http://ddbg.mainia.de/ ->bp test.d:1 Breakpoint set: test.d:4 0x402010 ->r ntdll.dll loaded KERNEL32.dll loaded USER32.dll loaded GDI32.dll loaded Breakpoint 0 hit test.d:4 0x402010 int main() ->in test.d:7 0x402015 char [1024] Cmd; -> test.d:8 0x402027 strcpy(Cmd.ptr, "Hello"); -> Hello Finis Process terminated ->
Mar 06 2007
Awesome.. Unfortunately I forgot to look at that local variable Cmd (same test case). The debugger has a problem evaluating it: Ddbg v0.0.4.3 alpha - D Debugger Copyright (c) 2007 Jascha Wetzel http://ddbg.mainia.de/ ->bp test.d:1 Breakpoint set: test.d:3 0x402010 -> Breakpoint set: test.d:3 0x402010 ->r ntdll.dll loaded KERNEL32.dll loaded USER32.dll loaded GDI32.dll loaded Breakpoint 0 hit test.d:3 0x402010 int main() ->in test.d:6 0x402015 char [1024] Cmd; test.d:7 0x402027 strcpy(Cmd.ptr, "Hello"); test.d:8 0x402038 printf("%s\n",Cmd.ptr); ->= cast(char[])Cmd Expression evaluated to empty data -> -------------------------------------- Jascha Wetzel wrote:more thanks :) fixed in 0.0.4.3 dickl wrote:Found another one... The debugger doesn't always seems to single step correctly. Happens with "in" and "ov" stepping. Steps correctly up to a point then the app runs to completion. Source ---------------------- import std.stdio; import std.c.string; int main() { //QSettings f = new QSettings; char [1024] Cmd; strcpy(Cmd.ptr, "Hello"); printf("%s\n",Cmd.ptr); // have to printf 'cos writefln throws writefln("Finis"); return 0; }//end int main() Debug Results --------------------- Ddbg v0.0.4.2 alpha - D Debugger Copyright (c) 2007 Jascha Wetzel http://ddbg.mainia.de/ ->bp test.d:1 Breakpoint set: test.d:4 0x402010 ->r ntdll.dll loaded KERNEL32.dll loaded USER32.dll loaded GDI32.dll loaded Breakpoint 0 hit test.d:4 0x402010 int main() ->in test.d:7 0x402015 char [1024] Cmd; -> test.d:8 0x402027 strcpy(Cmd.ptr, "Hello"); -> Hello Finis Process terminated ->
Mar 06 2007
one thing is, that you can't cast a static array to a dynamic array in ddbg, yet. but not casting the expression gives the same result. this is a bug in DMD's codeview symbols, though. the array is marked as having length 0. i can't tell when exactly that happens, since it worked in your other example (the TableStuff array). dickl wrote:Awesome.. Unfortunately I forgot to look at that local variable Cmd (same test case). The debugger has a problem evaluating it: Ddbg v0.0.4.3 alpha - D Debugger Copyright (c) 2007 Jascha Wetzel http://ddbg.mainia.de/ ->bp test.d:1 Breakpoint set: test.d:3 0x402010 -> Breakpoint set: test.d:3 0x402010 ->r ntdll.dll loaded KERNEL32.dll loaded USER32.dll loaded GDI32.dll loaded Breakpoint 0 hit test.d:3 0x402010 int main() ->in test.d:6 0x402015 char [1024] Cmd; test.d:7 0x402027 strcpy(Cmd.ptr, "Hello"); test.d:8 0x402038 printf("%s\n",Cmd.ptr); ->= cast(char[])Cmd Expression evaluated to empty data -> -------------------------------------- Jascha Wetzel wrote:more thanks :) fixed in 0.0.4.3 dickl wrote:Found another one... The debugger doesn't always seems to single step correctly. Happens with "in" and "ov" stepping. Steps correctly up to a point then the app runs to completion. Source ---------------------- import std.stdio; import std.c.string; int main() { //QSettings f = new QSettings; char [1024] Cmd; strcpy(Cmd.ptr, "Hello"); printf("%s\n",Cmd.ptr); // have to printf 'cos writefln throws writefln("Finis"); return 0; }//end int main() Debug Results --------------------- Ddbg v0.0.4.2 alpha - D Debugger Copyright (c) 2007 Jascha Wetzel http://ddbg.mainia.de/ ->bp test.d:1 Breakpoint set: test.d:4 0x402010 ->r ntdll.dll loaded KERNEL32.dll loaded USER32.dll loaded GDI32.dll loaded Breakpoint 0 hit test.d:4 0x402010 int main() ->in test.d:7 0x402015 char [1024] Cmd; -> test.d:8 0x402027 strcpy(Cmd.ptr, "Hello"); -> Hello Finis Process terminated ->
Mar 06 2007
Great work! Another minor glitch - single stepping over a getch() runs to completion= = (ver. 0.0.4.3) Impressive fix/release cycle time too. Thanks! Jascha Wetzel <"[firstname]" mainia.de> wrote:one thing is, that you can't cast a static array to a dynamic array in=ddbg, yet. but not casting the expression gives the same result. this is a bug in=DMD's codeview symbols, though. the array is marked as having length 0=.i can't tell when exactly that happens, since it worked in your other example (the TableStuff array). dickl wrote:epAwesome.. Unfortunately I forgot to look at that local variable Cmd (same test case). The debugger has a problem evaluating it: Ddbg v0.0.4.3 alpha - D Debugger Copyright (c) 2007 Jascha Wetzel http://ddbg.mainia.de/ ->bp test.d:1 Breakpoint set: test.d:3 0x402010 -> Breakpoint set: test.d:3 0x402010 ->r ntdll.dll loaded KERNEL32.dll loaded USER32.dll loaded GDI32.dll loaded Breakpoint 0 hit test.d:3 0x402010 int main() ->in test.d:6 0x402015 char [1024] Cmd; test.d:7 0x402027 strcpy(Cmd.ptr, "Hello"); test.d:8 0x402038 printf("%s\n",Cmd.ptr); ->=3D cast(char[])Cmd Expression evaluated to empty data -> -------------------------------------- Jascha Wetzel wrote:more thanks :) fixed in 0.0.4.3 dickl wrote:Found another one... The debugger doesn't always seems to single st=to =correctly. Happens with "in" and "ov" stepping. Steps correctly up =a point then the app runs to completion. Source ---------------------- import std.stdio; import std.c.string; int main() { //QSettings f =3D new QSettings; char [1024] Cmd; strcpy(Cmd.ptr, "Hello"); printf("%s\n",Cmd.ptr); // have to printf 'cos writefln throws writefln("Finis"); return 0; }//end int main() Debug Results --------------------- Ddbg v0.0.4.2 alpha - D Debugger Copyright (c) 2007 Jascha Wetzel http://ddbg.mainia.de/ ->bp test.d:1 Breakpoint set: test.d:4 0x402010 ->r ntdll.dll loaded KERNEL32.dll loaded USER32.dll loaded GDI32.dll loaded Breakpoint 0 hit test.d:4 0x402010 int main() ->in test.d:7 0x402015 char [1024] Cmd; -> test.d:8 0x402027 strcpy(Cmd.ptr, "Hello"); -> Hello Finis Process terminated ->
Mar 06 2007
can you give an example? it works when i try it. sd wrote:Great work! Another minor glitch - single stepping over a getch() runs to completion (ver. 0.0.4.3) Impressive fix/release cycle time too. Thanks! Jascha Wetzel <"[firstname]" mainia.de> wrote:one thing is, that you can't cast a static array to a dynamic array in ddbg, yet. but not casting the expression gives the same result. this is a bug in DMD's codeview symbols, though. the array is marked as having length 0. i can't tell when exactly that happens, since it worked in your other example (the TableStuff array). dickl wrote:Awesome.. Unfortunately I forgot to look at that local variable Cmd (same test case). The debugger has a problem evaluating it: Ddbg v0.0.4.3 alpha - D Debugger Copyright (c) 2007 Jascha Wetzel http://ddbg.mainia.de/ ->bp test.d:1 Breakpoint set: test.d:3 0x402010 -> Breakpoint set: test.d:3 0x402010 ->r ntdll.dll loaded KERNEL32.dll loaded USER32.dll loaded GDI32.dll loaded Breakpoint 0 hit test.d:3 0x402010 int main() ->in test.d:6 0x402015 char [1024] Cmd; test.d:7 0x402027 strcpy(Cmd.ptr, "Hello"); test.d:8 0x402038 printf("%s\n",Cmd.ptr); ->= cast(char[])Cmd Expression evaluated to empty data -> -------------------------------------- Jascha Wetzel wrote:more thanks :) fixed in 0.0.4.3 dickl wrote:Found another one... The debugger doesn't always seems to single step correctly. Happens with "in" and "ov" stepping. Steps correctly up to a point then the app runs to completion. Source ---------------------- import std.stdio; import std.c.string; int main() { //QSettings f = new QSettings; char [1024] Cmd; strcpy(Cmd.ptr, "Hello"); printf("%s\n",Cmd.ptr); // have to printf 'cos writefln throws writefln("Finis"); return 0; }//end int main() Debug Results --------------------- Ddbg v0.0.4.2 alpha - D Debugger Copyright (c) 2007 Jascha Wetzel http://ddbg.mainia.de/ ->bp test.d:1 Breakpoint set: test.d:4 0x402010 ->r ntdll.dll loaded KERNEL32.dll loaded USER32.dll loaded GDI32.dll loaded Breakpoint 0 hit test.d:4 0x402010 int main() ->in test.d:7 0x402015 char [1024] Cmd; -> test.d:8 0x402027 strcpy(Cmd.ptr, "Hello"); -> Hello Finis Process terminated ->
Mar 06 2007
Sorry Jascha, I had two versions installed and an old one was active. = Confirmed that it's not a problem in 0.0.4.3! Jascha Wetzel <"[firstname]" mainia.de> wrote:can you give an example? it works when i try it. sd wrote:ionGreat work! Another minor glitch - single stepping over a getch() runs to complet=in(ver. 0.0.4.3) Impressive fix/release cycle time too. Thanks! Jascha Wetzel <"[firstname]" mainia.de> wrote:one thing is, that you can't cast a static array to a dynamic array =inddbg, yet. but not casting the expression gives the same result. this is a bug =0.DMD's codeview symbols, though. the array is marked as having length=ri can't tell when exactly that happens, since it worked in your othe=texample (the TableStuff array). dickl wrote:Awesome.. Unfortunately I forgot to look at that local variable Cmd (same tes==case). The debugger has a problem evaluating it: Ddbg v0.0.4.3 alpha - D Debugger Copyright (c) 2007 Jascha Wetzel http://ddbg.mainia.de/ ->bp test.d:1 Breakpoint set: test.d:3 0x402010 -> Breakpoint set: test.d:3 0x402010 ->r ntdll.dll loaded KERNEL32.dll loaded USER32.dll loaded GDI32.dll loaded Breakpoint 0 hit test.d:3 0x402010 int main() ->in test.d:6 0x402015 char [1024] Cmd; test.d:7 0x402027 strcpy(Cmd.ptr, "Hello"); test.d:8 0x402038 printf("%s\n",Cmd.ptr); ->=3D cast(char[])Cmd Expression evaluated to empty data -> -------------------------------------- Jascha Wetzel wrote:more thanks :) fixed in 0.0.4.3 dickl wrote:Found another one... The debugger doesn't always seems to single =pstep correctly. Happens with "in" and "ov" stepping. Steps correctly u=sto a point then the app runs to completion. Source ---------------------- import std.stdio; import std.c.string; int main() { //QSettings f =3D new QSettings; char [1024] Cmd; strcpy(Cmd.ptr, "Hello"); printf("%s\n",Cmd.ptr); // have to printf 'cos writefln throw=writefln("Finis"); return 0; }//end int main() Debug Results --------------------- Ddbg v0.0.4.2 alpha - D Debugger Copyright (c) 2007 Jascha Wetzel http://ddbg.mainia.de/ ->bp test.d:1 Breakpoint set: test.d:4 0x402010 ->r ntdll.dll loaded KERNEL32.dll loaded USER32.dll loaded GDI32.dll loaded Breakpoint 0 hit test.d:4 0x402010 int main() ->in test.d:7 0x402015 char [1024] Cmd; -> test.d:8 0x402027 strcpy(Cmd.ptr, "Hello"); -> Hello Finis Process terminated ->
Mar 07 2007
Jascha Wetzel wrote:Ddbg is a Win32 D Debugger http://ddbg.mainia.de/releases.html This release mainly adds support for type cast and associative arrays. Type casts can be used to workaround the missing array and enum support in DMD's debug symbols.A few things so far. The final example may actually be a problem with rebuild, but I thought I'd include it anyway. ====================================================================== C:\code\src\d\test>ddbg test.exe Ddbg v0.0.4.3 alpha - D Debugger Copyright (c) 2007 Jascha Wetzel http://ddbg.mainia.de/ ->dr ---------------------------------------- Unhandled exception in Ddbg v0.0.4.3 alpha: Access Violation Please report this problem! See the http://ddbg.mainia.de/releases.html for details. Thank you! C:\code\src\d\test> C:\code\src\d\test> C:\code\src\d\test> C:\code\src\d\test>ddbg test.exe Ddbg v0.0.4.3 alpha - D Debugger Copyright (c) 2007 Jascha Wetzel http://ddbg.mainia.de/ ->ds ---------------------------------------- Unhandled exception in Ddbg v0.0.4.3 alpha: Access Violation Please report this problem! See the http://ddbg.mainia.de/releases.html for details. Thank you! ====================================================================== C:\code\src\d\test>cat test.d import tango.util.collection.LinkSeq; import tango.stdc.stdio; LinkSeq!(C) cont; static this() { cont = new LinkSeq!(C); } class C { int x; } void main() { printf( "hello\n" ); } C:\code\src\d\test>rebuild -g test c:\bin\dmd\bin\..\..\dm\bin\link.exe .\test+.\tango-util-collection-LinkSeq+.\ta ngo-util-collection-model-Iterator+.\tango-util-collection-model-Sortable+.\tang o-util-collection-model-Dispenser+.\tango-util-collection-model-View+.\tango-uti l-collection-model-GuardIterator+.\tango-util-collection-model-Comparator+.\tang o-util-collection-impl-LLCell+.\tango-util-collection-impl-Cell+.\tango-util-col lection-impl-SeqCollection+.\tango-util-collection-model-Seq+.\tango-util-collec tion-model-SeqView+.\tango-util-collection-impl-Collection+.\tango-io-protocol-m odel-IReader+.\tango-io-model-IBuffer+.\tango-io-model-IConduit+.\tango-io-proto col-model-IProtocol+.\tango-io-protocol-model-IWriter+.\tango-util-collection-im pl-AbstractIterator+.\tango-stdc-stdio+.\tango-stdc-stdarg+.\tango-stdc-stddef+. \tango-stdc-config,test.exe,,user32+kernel32/noi; C:\code\src\d\test>ddbg test.exe Ddbg v0.0.4.3 alpha - D Debugger Copyright (c) 2007 Jascha Wetzel http://ddbg.mainia.de/ ---------------------------------------- Unhandled exception in Ddbg v0.0.4.3 alpha: No symbolic debug info present (no debugging symbols found), try compiling and l inking with -g Please report this problem! See the http://ddbg.mainia.de/releases.html for details. Thank you! C:\code\src\d\test>
Mar 06 2007
there are a few commands that will not work before the debuggee is running (like dr and ds) - will fix that in the next release. the symbolic-info-missing error shouldn't show up like an unhandled exception, will fix that too. the problem here is, that the link command is missing the -g switch. the linker won't copy debug symbols from the object files to the exe in that case. thanks for the reports! Sean Kelly wrote:Jascha Wetzel wrote:Ddbg is a Win32 D Debugger http://ddbg.mainia.de/releases.html This release mainly adds support for type cast and associative arrays. Type casts can be used to workaround the missing array and enum support in DMD's debug symbols.A few things so far. The final example may actually be a problem with rebuild, but I thought I'd include it anyway. ====================================================================== C:\code\src\d\test>ddbg test.exe Ddbg v0.0.4.3 alpha - D Debugger Copyright (c) 2007 Jascha Wetzel http://ddbg.mainia.de/ ->dr ---------------------------------------- Unhandled exception in Ddbg v0.0.4.3 alpha: Access Violation Please report this problem! See the http://ddbg.mainia.de/releases.html for details. Thank you! C:\code\src\d\test> C:\code\src\d\test> C:\code\src\d\test> C:\code\src\d\test>ddbg test.exe Ddbg v0.0.4.3 alpha - D Debugger Copyright (c) 2007 Jascha Wetzel http://ddbg.mainia.de/ ->ds ---------------------------------------- Unhandled exception in Ddbg v0.0.4.3 alpha: Access Violation Please report this problem! See the http://ddbg.mainia.de/releases.html for details. Thank you! ====================================================================== C:\code\src\d\test>cat test.d import tango.util.collection.LinkSeq; import tango.stdc.stdio; LinkSeq!(C) cont; static this() { cont = new LinkSeq!(C); } class C { int x; } void main() { printf( "hello\n" ); } C:\code\src\d\test>rebuild -g test c:\bin\dmd\bin\..\..\dm\bin\link.exe .\test+.\tango-util-collection-LinkSeq+.\ta ngo-util-collection-model-Iterator+.\tango-util-collection-model-Sortable+.\tang o-util-collection-model-Dispenser+.\tango-util-collection-model-View+.\tango-uti l-collection-model-GuardIterator+.\tango-util-collection-model-Comparator+.\tang o-util-collection-impl-LLCell+.\tango-util-collection-impl-Cell+.\tango-util-col lection-impl-SeqCollection+.\tango-util-collection-model-Seq+.\tango-util-collec tion-model-SeqView+.\tango-util-collection-impl-Collection+.\tango-io-protocol-m odel-IReader+.\tango-io-model-IBuffer+.\tango-io-model-IConduit+.\tango-io-proto col-model-IProtocol+.\tango-io-protocol-model-IWriter+.\tango-util-collection-im pl-AbstractIterator+.\tango-stdc-stdio+.\tango-stdc-stdarg+.\tango-stdc-stddef+. \tango-stdc-config,test.exe,,user32+kernel32/noi; C:\code\src\d\test>ddbg test.exe Ddbg v0.0.4.3 alpha - D Debugger Copyright (c) 2007 Jascha Wetzel http://ddbg.mainia.de/ ---------------------------------------- Unhandled exception in Ddbg v0.0.4.3 alpha: No symbolic debug info present (no debugging symbols found), try compiling and l inking with -g Please report this problem! See the http://ddbg.mainia.de/releases.html for details. Thank you! C:\code\src\d\test>
Mar 06 2007
oh - it's /CODEVIEW for link, of course, not -g Jascha Wetzel wrote:there are a few commands that will not work before the debuggee is running (like dr and ds) - will fix that in the next release. the symbolic-info-missing error shouldn't show up like an unhandled exception, will fix that too. the problem here is, that the link command is missing the -g switch. the linker won't copy debug symbols from the object files to the exe in that case. thanks for the reports! Sean Kelly wrote:Jascha Wetzel wrote:Ddbg is a Win32 D Debugger http://ddbg.mainia.de/releases.html This release mainly adds support for type cast and associative arrays. Type casts can be used to workaround the missing array and enum support in DMD's debug symbols.A few things so far. The final example may actually be a problem with rebuild, but I thought I'd include it anyway. ====================================================================== C:\code\src\d\test>ddbg test.exe Ddbg v0.0.4.3 alpha - D Debugger Copyright (c) 2007 Jascha Wetzel http://ddbg.mainia.de/ ->dr ---------------------------------------- Unhandled exception in Ddbg v0.0.4.3 alpha: Access Violation Please report this problem! See the http://ddbg.mainia.de/releases.html for details. Thank you! C:\code\src\d\test> C:\code\src\d\test> C:\code\src\d\test> C:\code\src\d\test>ddbg test.exe Ddbg v0.0.4.3 alpha - D Debugger Copyright (c) 2007 Jascha Wetzel http://ddbg.mainia.de/ ->ds ---------------------------------------- Unhandled exception in Ddbg v0.0.4.3 alpha: Access Violation Please report this problem! See the http://ddbg.mainia.de/releases.html for details. Thank you! ====================================================================== C:\code\src\d\test>cat test.d import tango.util.collection.LinkSeq; import tango.stdc.stdio; LinkSeq!(C) cont; static this() { cont = new LinkSeq!(C); } class C { int x; } void main() { printf( "hello\n" ); } C:\code\src\d\test>rebuild -g test c:\bin\dmd\bin\..\..\dm\bin\link.exe .\test+.\tango-util-collection-LinkSeq+.\ta ngo-util-collection-model-Iterator+.\tango-util-collection-model-Sortable+.\tang o-util-collection-model-Dispenser+.\tango-util-collection-model-View+.\tango-uti l-collection-model-GuardIterator+.\tango-util-collection-model-Comparator+.\tang o-util-collection-impl-LLCell+.\tango-util-collection-impl-Cell+.\tango-util-col lection-impl-SeqCollection+.\tango-util-collection-model-Seq+.\tango-util-collec tion-model-SeqView+.\tango-util-collection-impl-Collection+.\tango-io-protocol-m odel-IReader+.\tango-io-model-IBuffer+.\tango-io-model-IConduit+.\tango-io-proto col-model-IProtocol+.\tango-io-protocol-model-IWriter+.\tango-util-collection-im pl-AbstractIterator+.\tango-stdc-stdio+.\tango-stdc-stdarg+.\tango-stdc-stddef+. \tango-stdc-config,test.exe,,user32+kernel32/noi; C:\code\src\d\test>ddbg test.exe Ddbg v0.0.4.3 alpha - D Debugger Copyright (c) 2007 Jascha Wetzel http://ddbg.mainia.de/ ---------------------------------------- Unhandled exception in Ddbg v0.0.4.3 alpha: No symbolic debug info present (no debugging symbols found), try compiling and l inking with -g Please report this problem! See the http://ddbg.mainia.de/releases.html for details. Thank you! C:\code\src\d\test>
Mar 08 2007
there is also a problem with Tango in Ddbg prior to 0.0.4.4, which i've just put on the website. To enable Ddbg to catch unhandled exceptions in Tango applications, you need to rebuild Tango's phobos.lib after changing in tango\lib\compiler\dmd\dmain2.d, currently line 83 bool trapException = true; to extern(C) bool trapException = true; Here is why: With the default exception handler in dmain2.d enabled, Win32 will not report unhandled exceptions to the debugger. To not require the author of the debuggee to manually change this, just to be able to use the debugger for stack traces, Ddbg changes the value of no_catch_exceptions in standard Phobos to true and trapException to false before running the debuggee. However, the latter is only possible, if the address of that variable is exported. Sean Kelly wrote:Jascha Wetzel wrote:Ddbg is a Win32 D Debugger http://ddbg.mainia.de/releases.html This release mainly adds support for type cast and associative arrays. Type casts can be used to workaround the missing array and enum support in DMD's debug symbols.A few things so far. The final example may actually be a problem with rebuild, but I thought I'd include it anyway. ====================================================================== C:\code\src\d\test>ddbg test.exe Ddbg v0.0.4.3 alpha - D Debugger Copyright (c) 2007 Jascha Wetzel http://ddbg.mainia.de/ ->dr ---------------------------------------- Unhandled exception in Ddbg v0.0.4.3 alpha: Access Violation Please report this problem! See the http://ddbg.mainia.de/releases.html for details. Thank you! C:\code\src\d\test> C:\code\src\d\test> C:\code\src\d\test> C:\code\src\d\test>ddbg test.exe Ddbg v0.0.4.3 alpha - D Debugger Copyright (c) 2007 Jascha Wetzel http://ddbg.mainia.de/ ->ds ---------------------------------------- Unhandled exception in Ddbg v0.0.4.3 alpha: Access Violation Please report this problem! See the http://ddbg.mainia.de/releases.html for details. Thank you! ====================================================================== C:\code\src\d\test>cat test.d import tango.util.collection.LinkSeq; import tango.stdc.stdio; LinkSeq!(C) cont; static this() { cont = new LinkSeq!(C); } class C { int x; } void main() { printf( "hello\n" ); } C:\code\src\d\test>rebuild -g test c:\bin\dmd\bin\..\..\dm\bin\link.exe .\test+.\tango-util-collection-LinkSeq+.\ta ngo-util-collection-model-Iterator+.\tango-util-collection-model-Sortable+.\tang o-util-collection-model-Dispenser+.\tango-util-collection-model-View+.\tango-uti l-collection-model-GuardIterator+.\tango-util-collection-model-Comparator+.\tang o-util-collection-impl-LLCell+.\tango-util-collection-impl-Cell+.\tango-util-col lection-impl-SeqCollection+.\tango-util-collection-model-Seq+.\tango-util-collec tion-model-SeqView+.\tango-util-collection-impl-Collection+.\tango-io-protocol-m odel-IReader+.\tango-io-model-IBuffer+.\tango-io-model-IConduit+.\tango-io-proto col-model-IProtocol+.\tango-io-protocol-model-IWriter+.\tango-util-collection-im pl-AbstractIterator+.\tango-stdc-stdio+.\tango-stdc-stdarg+.\tango-stdc-stddef+. \tango-stdc-config,test.exe,,user32+kernel32/noi; C:\code\src\d\test>ddbg test.exe Ddbg v0.0.4.3 alpha - D Debugger Copyright (c) 2007 Jascha Wetzel http://ddbg.mainia.de/ ---------------------------------------- Unhandled exception in Ddbg v0.0.4.3 alpha: No symbolic debug info present (no debugging symbols found), try compiling and l inking with -g Please report this problem! See the http://ddbg.mainia.de/releases.html for details. Thank you! C:\code\src\d\test>
Mar 08 2007
Jascha Wetzel wrote:there is also a problem with Tango in Ddbg prior to 0.0.4.4, which i've just put on the website. To enable Ddbg to catch unhandled exceptions in Tango applications, you need to rebuild Tango's phobos.lib after changing in tango\lib\compiler\dmd\dmain2.d, currently line 83 bool trapException = true; to extern(C) bool trapException = true; Here is why: With the default exception handler in dmain2.d enabled, Win32 will not report unhandled exceptions to the debugger. To not require the author of the debuggee to manually change this, just to be able to use the debugger for stack traces, Ddbg changes the value of no_catch_exceptions in standard Phobos to true and trapException to false before running the debuggee. However, the latter is only possible, if the address of that variable is exported.Okay, that makes sense. I don't suppose it could execute cr_trapExeptions(false) instead? :-)
Mar 08 2007
i thought about that first, so i wouldn't have to patch tango. the problem is, that the linker strips cr_trapExeptions from the exe unless it's called somewhere. one could call it in main to initialize the variable, instead of initializing it statically. but that would require a change as well. maybe it's preferable to not have another export, though. it would be nice if you could submit one of the changes to the SVN. Sean Kelly wrote:Jascha Wetzel wrote:there is also a problem with Tango in Ddbg prior to 0.0.4.4, which i've just put on the website. To enable Ddbg to catch unhandled exceptions in Tango applications, you need to rebuild Tango's phobos.lib after changing in tango\lib\compiler\dmd\dmain2.d, currently line 83 bool trapException = true; to extern(C) bool trapException = true; Here is why: With the default exception handler in dmain2.d enabled, Win32 will not report unhandled exceptions to the debugger. To not require the author of the debuggee to manually change this, just to be able to use the debugger for stack traces, Ddbg changes the value of no_catch_exceptions in standard Phobos to true and trapException to false before running the debuggee. However, the latter is only possible, if the address of that variable is exported.Okay, that makes sense. I don't suppose it could execute cr_trapExeptions(false) instead? :-)
Mar 08 2007
Jascha Wetzel wrote:i thought about that first, so i wouldn't have to patch tango. the problem is, that the linker strips cr_trapExeptions from the exe unless it's called somewhere. one could call it in main to initialize the variable, instead of initializing it statically. but that would require a change as well. maybe it's preferable to not have another export, though.No problem. I thought about this a bit more this morning and I think I'm just going expose the variable as you suggest. It will either be named "trapExceptions" or "cr_trapExceptions" -- I haven't decided yet (but probably the former). Sean
Mar 08 2007
dmain2.d has another problem: even with cr_trapExceptions=false, exceptions get handled. they just get thrown again after being caught. therefore the stacktrace to the actual location of the problem gets lost. with tango's dmain2.d the debugger can only show the stacktrace to that throw statement, which is useless. to fix this, the code needs to be more like the original dmain2, not using a try/catch block at all, if cr_trapException=false. Sean Kelly wrote:Jascha Wetzel wrote:i thought about that first, so i wouldn't have to patch tango. the problem is, that the linker strips cr_trapExeptions from the exe unless it's called somewhere. one could call it in main to initialize the variable, instead of initializing it statically. but that would require a change as well. maybe it's preferable to not have another export, though.No problem. I thought about this a bit more this morning and I think I'm just going expose the variable as you suggest. It will either be named "trapExceptions" or "cr_trapExceptions" -- I haven't decided yet (but probably the former). Sean
Mar 10 2007
Jascha Wetzel wrote:dmain2.d has another problem: even with cr_trapExceptions=false, exceptions get handled. they just get thrown again after being caught. therefore the stacktrace to the actual location of the problem gets lost.Darnit. I was afraid of this, but when I tried it with VC++8 it seemed to work.with tango's dmain2.d the debugger can only show the stacktrace to that throw statement, which is useless. to fix this, the code needs to be more like the original dmain2, not using a try/catch block at all, if cr_trapException=false.So the debugger would set cr_trapExceptions=false before C main is even executed? Okay, I can change that. Sean
Mar 10 2007
Sean Kelly wrote:So the debugger would set cr_trapExceptions=false before C main is even executed? Okay, I can change that.Done. Changing cr_trapExceptions now only has an effect if done before C main is called, just like the flag in Phobos. Sean
Mar 10 2007
great, thanks! ddbg v0.0.4.5 makes use of this. FYI, it works like this: right after the process has been created (before it's started), ddbg looks for an export "_main" and sets a breakpoint on it's start address. when that one is hit, it looks for "_cr_trapExceptions" and "_no_catch_exceptions" exports and sets them accordingly, if found. Sean Kelly wrote:Sean Kelly wrote:So the debugger would set cr_trapExceptions=false before C main is even executed? Okay, I can change that.Done. Changing cr_trapExceptions now only has an effect if done before C main is called, just like the flag in Phobos. Sean
Mar 10 2007
I see a problem when trying to list members of class. The debugger crashes with "Unhandled exception in Ddbg v0.0.4.3 alpha: 4invalid UTF-8 sequence" There aren't any strings in the class, just single element ints, bools & etc. I can't nail it down to a single member since every single member evaluates fine, just when I do a "lsv" does the debugger crash. This brings up a potentially bigger issue I think. Using the D library UTF-8 restrictive routines will cause problem evaluating strings, particularly in Windows Apps. You might want to consider replacing format/sformat/writefln with something that is more forgiving. ------------------------------- Jascha Wetzel wrote:Ddbg is a Win32 D Debugger http://ddbg.mainia.de/releases.html This release mainly adds support for type cast and associative arrays. Type casts can be used to workaround the missing array and enum support in DMD's debug symbols.
Mar 07 2007
good point about the utf8 routines. i will consider that. can you email me an exe and ddbg command sequence that produces the unhandled exception? dickl wrote:I see a problem when trying to list members of class. The debugger crashes with "Unhandled exception in Ddbg v0.0.4.3 alpha: 4invalid UTF-8 sequence" There aren't any strings in the class, just single element ints, bools & etc. I can't nail it down to a single member since every single member evaluates fine, just when I do a "lsv" does the debugger crash. This brings up a potentially bigger issue I think. Using the D library UTF-8 restrictive routines will cause problem evaluating strings, particularly in Windows Apps. You might want to consider replacing format/sformat/writefln with something that is more forgiving. ------------------------------- Jascha Wetzel wrote:Ddbg is a Win32 D Debugger http://ddbg.mainia.de/releases.html This release mainly adds support for type cast and associative arrays. Type casts can be used to workaround the missing array and enum support in DMD's debug symbols.
Mar 07 2007
OK, I think I got it narrowed down to only 2 modules. I'll email you the exe, DLLs needed + source when I get things a little further refined. ---------------------------------------------------------- Jascha Wetzel wrote:good point about the utf8 routines. i will consider that. can you email me an exe and ddbg command sequence that produces the unhandled exception? dickl wrote:I see a problem when trying to list members of class. The debugger crashes with "Unhandled exception in Ddbg v0.0.4.3 alpha: 4invalid UTF-8 sequence" There aren't any strings in the class, just single element ints, bools & etc. I can't nail it down to a single member since every single member evaluates fine, just when I do a "lsv" does the debugger crash. This brings up a potentially bigger issue I think. Using the D library UTF-8 restrictive routines will cause problem evaluating strings, particularly in Windows Apps. You might want to consider replacing format/sformat/writefln with something that is more forgiving. ------------------------------- Jascha Wetzel wrote:Ddbg is a Win32 D Debugger http://ddbg.mainia.de/releases.html This release mainly adds support for type cast and associative arrays. Type casts can be used to workaround the missing array and enum support in DMD's debug symbols.
Mar 07 2007