[llvm] r204697 - DebugInfo: Support debug_loc under fission
David Blaikie
dblaikie at gmail.com
Tue Apr 1 18:58:18 PDT 2014
On Mon, Mar 31, 2014 at 3:46 PM, Eric Christopher <echristo at gmail.com> wrote:
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/Dwarf.h?rev=204697&r1=204696&r2=204697&view=diff
>> ==============================================================================
>> --- llvm/trunk/include/llvm/Support/Dwarf.h (original)
>> +++ llvm/trunk/include/llvm/Support/Dwarf.h Mon Mar 24 20:44:02 2014
>> @@ -771,6 +771,14 @@ enum Constants {
>> DW_EH_PE_indirect = 0x80
>> };
>>
>> +enum LocationListEntry : unsigned char {
>> + DW_LLE_end_of_list_entry,
>> + DW_LLE_base_address_selection_entry,
>> + DW_LLE_start_end_entry,
>> + DW_LLE_start_length_entry,
>> + DW_LLE_offset_pair_entry
>> +};
>
> Can you go ahead and comment this as being a DWARF5/fission feature
> that's subject to change? I tried to do this for the rest of them, but
> don't recall how successful I was.
r205268
>> - if (CU->getRanges().size() == 1) {
>> + if (useSplitDwarf()) {
>> + // Just always use start_length for now - at least that's one address
>> + // rather than two. We could get fancier and try to, say, reuse an
>> + // address we know we've emitted elsewhere (the start of the function?
>> + // The start of the CU or CU subrange that encloses this range?)
>> + Asm->EmitInt8(dwarf::DW_LLE_start_length_entry);
>> + unsigned idx = InfoHolder.getAddrPoolIndex(Entry.getBeginSym());
>> + Asm->EmitULEB128(idx);
>> + Asm->EmitLabelDifference(Entry.getEndSym(), Entry.getBeginSym(), 4);
>
> With the way this looks along-side the comment I'd almost rather two
> functions and split the emission that way.
Good point - done in r205385 (with a few other improvements to reduce
the duplication between the two functions).
> *shrug*
>
>>
>> Modified: llvm/trunk/lib/DebugInfo/DWARFContext.cpp
>
> Would have been nice to split the dumping out to a separate commit :)
Yeah - thought about that, but I always feel like it's a little
overkill to write test cases for dwarfdump (I go back & forth on this)
& a bit poor form to checkin completely unused code... so sometimes I
just find it easier to roll it in with the functionality that it's
there to test.
But yeah *waffles back & forth on that*.
- Dave
>
>
> Looks great otherwise, thanks!
>
> -eric
More information about the llvm-commits
mailing list