New debugger for D!!!

Sarath Kodali sarath at dummy.com
Mon Jan 27 08:42:13 PST 2014


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:
     -f    follow 'prog', 'proc', 'thread' or 'all' or 'none'
     -l    load only; do not run new program / thread till its 
'start' function
     -s    paths for source files
     -S    paths 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>


More information about the Digitalmars-d-announce mailing list