Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Not all debuggers are line-based. Many of LLVM's tools give descriptive errors ("expressive diagnostics").

Here's an example of gcc versus clang (a "frontend" for LLVM):

  $ gcc-4.2 -fsyntax-only -Wformat format-strings.c
  format-strings.c:91: warning: too few arguments for format
  $ clang -fsyntax-only format-strings.c
  format-strings.c:91:13: warning: '.*' specified field precision is missing a matching 'int' argument
    printf("%.*d");
              ^
LLVM is does some cool stuff :). Some other nice examples are at http://clang.llvm.org/diagnostics.html.


That's not a debugger though; that's a compiler.

All of the debuggers I've seen are line based with the option of single stepping through assembly.

Hopefully the LLDB people will be able to modernize debugging to the degree that the clang guys have modernized error messages, but that still remains to be seen.


Given that LLVM is way behind on producing good debug info compared to GCC, i don't think LLDB is going to improve as quick as one would like.


To be fair, that page is severely out of date, and gcc 4.2 was released six years ago. An updated comparison is here: http://gcc.gnu.org/wiki/ClangDiagnosticsComparison

Anyway, those are compiler warnings rather than after-the-fact debugging. I don't think LLVM's debugger, lldb, does any better in this case.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: