### Eclipse Workspace Patch 1.0 #P lldb Index: source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp =================================================================== --- source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp (revision 125228) +++ source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp (working copy) @@ -559,7 +559,7 @@ { FileSpec cu_file_spec; - if (cu_die_name[0] == '/' || cu_comp_dir == NULL && cu_comp_dir[0]) + if (cu_die_name[0] == '/' || cu_comp_dir == NULL || !cu_comp_dir[0]) { // If we have a full path to the compile unit, we don't need to resolve // the file. This can be expensive e.g. when the source files are NFS mounted. @@ -1882,7 +1882,7 @@ m_aranges->Sort(); #if defined (ENABLE_DEBUG_PRINTF) - StreamFile s(stdout); + StreamFile s(stdout, false); s.Printf ("DWARF index for (%s) '%s/%s':", GetObjectFile()->GetModule()->GetArchitecture().AsCString(), GetObjectFile()->GetFileSpec().GetDirectory().AsCString(), Index: source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp =================================================================== --- source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp (revision 124754) +++ source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp (working copy) @@ -136,75 +136,70 @@ offset += fixed_skip_size; else { - bool form_is_indirect = false; - do +die_fastextract_indirect_form: + register uint32_t form_size = 0; + switch (form) { - register uint32_t form_size = 0; - switch (form) - { - // Blocks if inlined data that have a length field and the data bytes - // inlined in the .debug_info - case DW_FORM_block : form_size = debug_info_data.GetULEB128 (&offset); break; - case DW_FORM_block1 : form_size = debug_info_data.GetU8_unchecked (&offset); break; - case DW_FORM_block2 : form_size = debug_info_data.GetU16_unchecked (&offset);break; - case DW_FORM_block4 : form_size = debug_info_data.GetU32_unchecked (&offset);break; - - // Inlined NULL terminated C-strings - case DW_FORM_string : - debug_info_data.GetCStr (&offset); - break; + // Blocks if inlined data that have a length field and the data bytes + // inlined in the .debug_info + case DW_FORM_block : form_size = debug_info_data.GetULEB128 (&offset); break; + case DW_FORM_block1 : form_size = debug_info_data.GetU8_unchecked (&offset); break; + case DW_FORM_block2 : form_size = debug_info_data.GetU16_unchecked (&offset);break; + case DW_FORM_block4 : form_size = debug_info_data.GetU32_unchecked (&offset);break; - // Compile unit address sized values - case DW_FORM_addr : - case DW_FORM_ref_addr : - form_size = cu->GetAddressByteSize(); - break; + // Inlined NULL terminated C-strings + case DW_FORM_string : + debug_info_data.GetCStr (&offset); + break; - // 1 byte values - case DW_FORM_data1 : - case DW_FORM_flag : - case DW_FORM_ref1 : - form_size = 1; - break; + // Compile unit address sized values + case DW_FORM_addr : + case DW_FORM_ref_addr : + form_size = cu->GetAddressByteSize(); + break; - // 2 byte values - case DW_FORM_data2 : - case DW_FORM_ref2 : - form_size = 2; - break; + // 1 byte values + case DW_FORM_data1 : + case DW_FORM_flag : + case DW_FORM_ref1 : + form_size = 1; + break; - // 4 byte values - case DW_FORM_strp : - case DW_FORM_data4 : - case DW_FORM_ref4 : - form_size = 4; - break; + // 2 byte values + case DW_FORM_data2 : + case DW_FORM_ref2 : + form_size = 2; + break; - // 8 byte values - case DW_FORM_data8 : - case DW_FORM_ref8 : - form_size = 8; - break; + // 4 byte values + case DW_FORM_strp : + case DW_FORM_data4 : + case DW_FORM_ref4 : + form_size = 4; + break; - // signed or unsigned LEB 128 values - case DW_FORM_sdata : - case DW_FORM_udata : - case DW_FORM_ref_udata : - debug_info_data.Skip_LEB128 (&offset); - break; + // 8 byte values + case DW_FORM_data8 : + case DW_FORM_ref8 : + form_size = 8; + break; - case DW_FORM_indirect : - form_is_indirect = true; - form = debug_info_data.GetULEB128 (&offset); - break; + // signed or unsigned LEB 128 values + case DW_FORM_sdata : + case DW_FORM_udata : + case DW_FORM_ref_udata : + debug_info_data.Skip_LEB128 (&offset); + break; - default: - *offset_ptr = m_offset; - return false; - } - offset += form_size; + case DW_FORM_indirect : + form = debug_info_data.GetULEB128 (&offset); + goto die_fastextract_indirect_form; - } while (form_is_indirect); + default: + *offset_ptr = m_offset; + return false; + } + offset += form_size; } } *offset_ptr = offset; Index: source/Symbol/ClangASTContext.cpp =================================================================== --- source/Symbol/ClangASTContext.cpp (revision 124754) +++ source/Symbol/ClangASTContext.cpp (working copy) @@ -755,6 +755,11 @@ if (QualTypeMatchesBitSize (bit_size, ast, ast->WCharTy)) return ast->WCharTy.getAsOpaquePtr(); } + else if (streq(type_name, "void")) + { + if (QualTypeMatchesBitSize (bit_size, ast, ast->VoidTy)) + return ast->VoidTy.getAsOpaquePtr(); + } } // We weren't able to match up a type name, just search by size if (QualTypeMatchesBitSize (bit_size, ast, ast->CharTy)) @@ -835,6 +840,8 @@ case DW_ATE_unsigned_char: if (QualTypeMatchesBitSize (bit_size, ast, ast->UnsignedCharTy)) return ast->UnsignedCharTy.getAsOpaquePtr(); + if (QualTypeMatchesBitSize (bit_size, ast, ast->UnsignedShortTy)) + return ast->UnsignedShortTy.getAsOpaquePtr(); break; case DW_ATE_imaginary_float: