On Fri, Oct 2, 2009 at 10:38 PM, Talin <viridia at gmail.com>
wrote:> I've been working on getting my front end to generate the proper
> source-level debugging intrinsics, and I have a couple of observations:
>
> 1) I've never actually been able to get gdb to recognize my debug data.
> I've tried the various -O0 and disabling frame pointer elimination, and
> when I look at the assembly it seems OK, but gdb just won't recognize
> it. I've even tried downloading a more recent version of gdb, but
> unfortunately the latest official gdb release won't configure under OS
> X, and when I tried checking out the branch head it wouldn't compile.
>
> 2) It's very hard to determine whether or not the generated debug
> information is correct. One reason is that the way that debug
> information is encoded in LL files is essentially unreadable. I can look
> at a typical IR file and puzzle out what the code is supposed to be
> doing, but there's no easy way to look at the metadata and verify that
> it is correct.
>
> What I would like to see is either (a) a way to encode debugging
> information in the module that is slightly easier on the eyes, or (b)
> some sort of pretty-printer utility that would take in a module and
> print a summary of the debug info for a given symbol.
(b) is the right choice here. A MDPrinter as part of AsmWriter to
pretty-print debug info is the way to go.
There is also a need for DwarfChecker. The goal here is to check
consistency of debug info encoded in LLVM IR and remove inconsistent
info. This is not same as traditional Verifier, which is readonly. The
debug info is optional and various passes are allowed to
discard/remove debug info that gets in their way.
-
Devang