[LLVMdev] Dwarf debugging strangeness, continued...

Talin viridia at gmail.com
Thu Oct 21 12:43:22 PDT 2010


On Thu, Oct 21, 2010 at 8:56 AM, Devang Patel <dpatel at apple.com> wrote:

>
> On Oct 20, 2010, at 10:49 PM, Talin wrote:
>
>
>    - First, there are a bunch of .bc files that are generated by my
>    frontend, and which contain debugging metadata (I checked using llvm-dis and
>    the metadata appears to be OK). These are then combined by my linker,
>    tartln, which combines the functions of 'opt' and 'llc', as well as having
>    some custom passes for reflection and garbage collection. (In fact, about
>    half of the source code for tartln was lifted directly from opt and llc,
>    although this cut & paste operation occurred somewhere around the 2.5
>    timeframe, and I've tried to keep the code up to date since then.)
>       - The output of this compilation phase is a .o file.
>
>
> If you can send me couple of small .bc files and linked .o file (mach-O)
> created using tartln then I'll try to see if I can find anything suspicious
> here.
>

OK I'll work on that when I get home. It may take a while to come up with a
"small" .bc file, since even a "hello world" type program pulls in a
substantial amount of library code (i/o libraries, container classes,
root-level exception handling, argv handling, garbage collection runtime
code, and so on.)

It may be something as simple as me doing something stupid in my build
script, (although I did remember to use -fno-omit-framepointer).

I suppose I should mention one odd thing about my current build script: the
current optimization level is -O2. I can't use -O0, this causes an assertion
failure in the lowering pass for LLVM intrinsics. The problem has to do with
inlining and llvm.gcroot(). My frontend insures that all calls to
llvm.gcroot() are in the first block of a function, but the inlining pass
does not preserve this constraint - which causes the assertion failure. For
some reason optimization makes this problem go away.


> -
> Devang
>

-- 
-- Talin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20101021/23a7dde6/attachment.html>


More information about the llvm-dev mailing list