Re: New debugger for D!!!
On Wednesday, 29 January 2014 at 07:06:43 UTC, Andrei Alexandrescu wrote: On 1/28/14 4:26 PM, Meta wrote: On Wednesday, 29 January 2014 at 00:07:00 UTC, Namespace wrote: I did not do any research on name; just shortened debug to dbg :) I'm bad at coming up with good names, so any suggestions are always welcome. - Sarath D!buger Too complicated, keep it simple. Maybe Dug, which stands for D Debug. noice http://www.noicedebugger.com/ already exists!
Re: New debugger for D!!!
On Tuesday, 28 January 2014 at 05:19:13 UTC, Andrei Alexandrescu wrote: This does sound very interesting - and don't forget to submit a talk on the topic to DConf!!! Andrei Can't commit but will try :( too many things in my hand ...
Re: New debugger for D!!!
On Tuesday, 28 January 2014 at 10:03:03 UTC, Jacob Carlborg wrote: On 2014-01-28 04:00, Sarath Kodali wrote: Next month I will be releasing an alpha version with support for Linux, x86, Elf+Dwarf, DMD and GCC. I'm waiting for the OS X version :) But in the coming months I will add support for other 64 bit OSes and compilers. I'm also planning to add a JSON or CSV output format so that it will be easy to parse the output when integrating with IDEs. Why not make it useable as a library that can be directly integrated into an IDE. If dbg is a library, whenever the debugger hangs or crashes, the IDE also hangs or crashes and you may loose all your data. It is much safer to have dbg as a server and have an IDE plugin as a client.
Re: New debugger for D!!!
On Tuesday, 28 January 2014 at 06:34:50 UTC, dennis luehring wrote: Am 28.01.2014 04:00, schrieb Sarath Kodali: I'm also planning to add a JSON or CSV output format so that it will be easy to parse the output when integrating with IDEs. So I would recommend that you wait till I release 1.0 version - sometime before Dconf 2014 - hopefully! why don't ease the IDE integration even more - for example the pin tool from intel (ptools.org) is a normal executable (the server) but you can give pin a tool/commander dll per commandline which is then responsible for controling the debugger - this way its very easy to integrate the debugger into any environment fast and performant examples pin.exe -t idadbg.dll - starts pin with an IDA-tool-dll to be able to control pin with the ida debugger pin.exe -t vsdbg.dll - starts pin with an vs-studio debug helper this way you can use pin as an debugger for VStudio etc. csv and json is nice - but there a much nicer ways of doing ipc I expect this is how it will be even with dbg and IDEs. The IDE will have a plugin that sits between the debugger and IDE. The communication between the IDE plugin and debugger will be over a socket and the dbg output will be in JSON format so that IDE plugin can parse it properly. Depending on the IDE, the plugin will be either a library (dll) or an independent executable.
Re: New debugger for D!!!
On Tuesday, 28 January 2014 at 15:23:28 UTC, Idan Arye wrote: On Monday, 27 January 2014 at 16:42:14 UTC, Sarath Kodali wrote: p1.1 SUSPENDED [D main in dbg.d] 179: auto cmd = new Command(uiType); dbg step -o p1.1 STEPPED [D main in dbg.d] 180: cmd.rc_exec(GLOBAL_DBGRC_FILE); Would you mind putting the line number in the same line as the file name? I'm working on a debugger plugin for Vim, and I would obviously want to support your debugger once it's released. I find it easy to interpret the debugger output line by line, and it really makes things hard when I have to join data from multiple lines... You said you want to add JSON and\or CSV output formats, Vim doesn't support JSON natively and CSV is still multiple lines. So, if it wouldn't be too hard having data in the same line can be really be helpful! This is also true when printing values - having the expression and the result printed at the same line makes things easier to interpret. The output is configurable, independent of JSON or CSV, and this is just one form. I will make it as easy of possible for plug-ins to parse the output. BTW, would you mind picking a different name? I understand that dbg stands for D Debugger, but there is already a debugger named dbg(http://www.php-debugger.com/dbg/) and with a name so generic I would be surprised if there aren't other debuggers with that name... I did not do any research on name; just shortened debug to dbg :) I'm bad at coming up with good names, so any suggestions are always welcome. - Sarath
Re: New debugger for D!!!
On Tuesday, 28 January 2014 at 16:24:32 UTC, dennis luehring wrote: Am 28.01.2014 17:16, schrieb Sarath Kodali: I expect this is how it will be even with dbg and IDEs. The IDE will have a plugin that sits between the debugger and IDE. The communication between the IDE plugin and debugger will be over a socket and the dbg output will be in JSON format so that IDE plugin can parse it properly. Depending on the IDE, the plugin will be either a library (dll) or an independent executable. its a little bit different to pin because pin is the host of the given tool-communication dll - so the dll interface is the interface not JSON (pin(tool dll--)-- any protocol -- ide/whatever in your idea dbg --- socker/JASON -- ide/whatever the question is - debuggers needs to throw masses of information around - why put a slow JSON parser between, every single step command gets JSONed, parsed, singlestep, result gets JSOned etc... millions of times - why? I'm not fixated on JSON :) I thought that is more popular now-a-days :). Today dbg outputs in human readable format. After the alpha release, I will add the machine readable format - what everyone prefers.
Re: New debugger for D!!!
On Wednesday, 29 January 2014 at 01:13:12 UTC, Martin Nowak wrote: On Monday, 27 January 2014 at 16:42:14 UTC, Sarath Kodali wrote: I'm planning to release a new debugger for D sometime during end of February. This is a heads up for all those who are eagerly looking for a good debugger for D. Here is a sample debug session: Do you know ngdb (https://github.com/MartinNowak/ngdb)? It might be helpful for your implementation. Thanks for the link, I will take a look. Is this a working debugger? - Sarath
New debugger for D!!!
I'm planning to release a new debugger for D sometime during end of February. This is a heads up for all those who are eagerly looking for a good debugger for D. Here is a sample debug session: $ ./dbg ./dbg New session s1 (./dbg) started New process p1 (program dbg) created p1.1 SUSPENDED [D main in dbg.d] 78: main(string[] args) dbg list 175 Source listing for thread p1.1, program dbg 175: if (srcpath !is null) 176: dv_dbgSrcpath(srcpath); 177: if (sympath !is null) 178: dv_dbgSympath(sympath); 179: auto cmd = new Command(uiType); 180: cmd.rc_exec(GLOBAL_DBGRC_FILE); 181: if (dbgrc is null) 182: { 183: dbgrc = homedir ~ / ~ DBGRC_FILE; 184: cmd.rc_exec(dbgrc);// home dir dbgrc dbg run -u 179 p1.1 SUSPENDED [D main in dbg.d] 179: auto cmd = new Command(uiType); dbg step -o p1.1 STEPPED [D main in dbg.d] 180: cmd.rc_exec(GLOBAL_DBGRC_FILE); dbg help Run help on the following topics to get additional help. Start Stop: create, grab, quit, release, %follow, %srcpath, %sympath Execution: halt, jump, kill, run, step, wait, %thread Events: events, onstop, signal, stop, syscall, %lastevent, %thisevent View or Modify: dump, list, maps, print, regs, set, stack, status, symbols, vars, which %dbg_lang, %file, %frame, %func, %lang, %line, %list_file, %list_line, %loc, %num_lines Convenience: !, alias, help, logoff, logon, script, %cwd, %logfile, %log_prefix, %prompt, %result, %verbose For a full list of help topics, run help toc. dbg help create SYNOPSIS: create [-f follow] [-l] [-s srcpath] [-S sympath] [shell_cmd_string] DESCRIPTION: Create a new debugging session for shell_cmd_string. The existing debug sessions are not affected by this command. One could simultaneously have multiple debug sessions. If shell_cmd_string is not specified, the shell_cmd_string from previous create command is used and the previous create session is destroyed. After the session is created, this command runs all the processes till their 'start' function. OPTIONS: -ffollow 'prog', 'proc', 'thread' or 'all' or 'none' -lload only; do not run new program / thread till its 'start' function -spaths for source files -Spaths for debug symbol files NOTES: It is not possible to redirect or pipe the output of create command. EXAMPLES: create test_prog1 arg1 arg2 2/tmp/prog1.err | test_prog2 # creates a new debug session for test_prog1 and test_prog2 create MANPAGER=more man 1p man create xterm -e ./cmd SEE ALSO: events, quit, kill, release, run, shell_cmd_string, status, step %dbg_follow, %dbg_srcpath, %dbg_sympath, %follow, %srcpath, %sympath dbg
Re: New debugger for D!!!
On Monday, 27 January 2014 at 18:10:03 UTC, Alexander Bothe wrote: Which OSs are supported? Which compilers are supported, which debug info base is used? Is the info directly extracted from the executable aka Dwarf/CV4/PDB support? The sample debug session looks cool, so I'd really like to know this to estimate whether it's worth to integrate it into Mono-D or other IDEs :-) Next month I will be releasing an alpha version with support for Linux, x86, Elf+Dwarf, DMD and GCC. But in the coming months I will add support for other 64 bit OSes and compilers. I'm also planning to add a JSON or CSV output format so that it will be easy to parse the output when integrating with IDEs. So I would recommend that you wait till I release 1.0 version - sometime before Dconf 2014 - hopefully! Thanks for the interest, Sarath
Re: New debugger for D!!!
On Monday, 27 January 2014 at 17:13:05 UTC, John Colvin wrote: Without the nasty line-wrapping: http://pastebin.com/1Z4T4vep woops, missed a couple: http://pastebin.com/t0sejnF9 Thanks!