[llvm-commits] [llvm] r169218 - in /llvm/trunk: include/llvm/ lib/CodeGen/AsmPrinter/ lib/VMCore/ test/CodeGen/ARM/ test/CodeGen/Thumb/ test/CodeGen/X86/ test/DebugInfo/ test/DebugInfo/X86/ test/JitListener/

Duncan Sands baldrick at free.fr
Thu Dec 6 02:24:32 PST 2012


Hi Bill,

 >> Frontends (Clang, DragonEgg, etc) know which language they're emitting
>> debug info for & what the default is. They emit lower bounds whenever
>> the bound is not the language-specific default.
>> Backend (LLVM) unconditionally emits whatever the frontend gave it.
>>
>> & thus we get the minimum required debug info: values when they're not
>> the default, relying on the default when it matches.
>>
> Here's my problem. Let's say that Ada is using an array that starts at '0'. Right now, we treat a lower bound of '0' as the default for the language (because we're assuming C/C++ here) and we won't emit it in the DWARF.

why don't you emit it?  If the front-end produced it, shouldn't you just output
it?  Or is this basically a compression scheme to reduce the size of object
files?

  This is wrong for Ada, which defaults to '1' as the lower bound of an array.

There isn't really a default specified by the Ada language itself.  However I
guess what matters is what gdb/lldb thinks the lower bound is if there is no
explicit lower bound.  Did anyone rummage around inside the debuggers to
determine that?

Ciao, Duncan.

  Conversely, we *will* emit a lower bound for Ada if it says that the lower 
bound is '1', since we don't expect that to be the default. Emitting a lower 
bound of '1' is not needed here, of course.
>
> I just need a way of determining if the lower bound given to us is the default for the source language or not. If it's not, then we will emit the lower bound attribute. Otherwise, we won't.
>
> -bw
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>




More information about the llvm-commits mailing list