[llvm] r265452 - llvm-dwp: Handle dwo files produced by GCC

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 13 11:44:38 PDT 2016


Added some text in r266225 (eventually I'll have to do a proper error
handling pass over the whole thing - obviously it's easy to construct an
input that would trigger that assertion, which isn't ideal/correct behavior)

On Tue, Apr 5, 2016 at 3:19 PM, Eric Christopher <echristo at gmail.com> wrote:

>
>> +  assert(Form == dwarf::DW_FORM_GNU_str_index);
>>
>
> Text after asserts is cool. :)
>
> -eric
>
>
>> +  auto StrIndex = InfoData.getULEB128(&InfoOffset);
>>    DataExtractor StrOffsetsData(StrOffsets, true, 0);
>>    uint32_t StrOffsetsOffset = 4 * StrIndex;
>>    uint32_t StrOffset = StrOffsetsData.getU32(&StrOffsetsOffset);
>> @@ -163,12 +168,11 @@ static CompileUnitIdentifiers getCUIdent
>>           (Name != 0 || Form != 0)) {
>>      switch (Name) {
>>      case dwarf::DW_AT_name: {
>> -      ID.Name = getIndexedString(InfoData.getULEB128(&Offset),
>> StrOffsets, Str);
>> +      ID.Name = getIndexedString(Form, InfoData, Offset, StrOffsets,
>> Str);
>>        break;
>>      }
>>      case dwarf::DW_AT_GNU_dwo_name: {
>> -      ID.DWOName =
>> -          getIndexedString(InfoData.getULEB128(&Offset), StrOffsets,
>> Str);
>> +      ID.DWOName = getIndexedString(Form, InfoData, Offset, StrOffsets,
>> Str);
>>        break;
>>      }
>>      case dwarf::DW_AT_GNU_dwo_id:
>>
>>
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at lists.llvm.org
>> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160413/2a58c659/attachment.html>


More information about the llvm-commits mailing list