-
Notifications
You must be signed in to change notification settings - Fork 11.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add basic fission support to SymbolFileDWARF
* Create new dwo symbol file class * Add handling for .dwo sections * Change indexes in SymbolFileDWARF to store compile unit offset next to DIE offset * Propagate queries from dwarf compile unit to the dwo compile unit where applicable Differential revision: http://reviews.llvm.org/D12291 llvm-svn: 247132
- Loading branch information
Tamas Berghammer
committed
Sep 9, 2015
1 parent
715cbe8
commit eb882fc
Showing
25 changed files
with
1,045 additions
and
532 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
//===-- DIERef.cpp ----------------------------------------------*- C++ -*-===// | ||
// | ||
// The LLVM Compiler Infrastructure | ||
// | ||
// This file is distributed under the University of Illinois Open Source | ||
// License. See LICENSE.TXT for details. | ||
// | ||
//===----------------------------------------------------------------------===// | ||
|
||
#include "DIERef.h" | ||
#include "DWARFCompileUnit.h" | ||
#include "DWARFFormValue.h" | ||
|
||
DIERef::DIERef() : | ||
cu_offset(DW_INVALID_OFFSET), | ||
die_offset(DW_INVALID_OFFSET) | ||
{} | ||
|
||
DIERef::DIERef(dw_offset_t d) : | ||
cu_offset(DW_INVALID_OFFSET), | ||
die_offset(d) | ||
{} | ||
|
||
DIERef::DIERef(dw_offset_t c, dw_offset_t d) : | ||
cu_offset(c), | ||
die_offset(d) | ||
{} | ||
|
||
DIERef::DIERef(lldb::user_id_t uid) : | ||
cu_offset(uid>>32), | ||
die_offset(uid&0xffffffff) | ||
{} | ||
|
||
DIERef::DIERef(const DWARFFormValue& form_value) : | ||
cu_offset(DW_INVALID_OFFSET), | ||
die_offset(DW_INVALID_OFFSET) | ||
{ | ||
if (form_value.IsValid()) | ||
{ | ||
const DWARFCompileUnit* dwarf_cu = form_value.GetCompileUnit(); | ||
if (dwarf_cu) | ||
{ | ||
if (dwarf_cu->GetBaseObjOffset() != DW_INVALID_OFFSET) | ||
cu_offset = dwarf_cu->GetBaseObjOffset(); | ||
else | ||
cu_offset = dwarf_cu->GetOffset(); | ||
} | ||
die_offset = form_value.Reference(); | ||
} | ||
} | ||
|
||
lldb::user_id_t | ||
DIERef::GetUID() const | ||
{ | ||
return ((lldb::user_id_t)cu_offset) << 32 | die_offset; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
//===-- DIERef.h ------------------------------------------------*- C++ -*-===// | ||
// | ||
// The LLVM Compiler Infrastructure | ||
// | ||
// This file is distributed under the University of Illinois Open Source | ||
// License. See LICENSE.TXT for details. | ||
// | ||
//===----------------------------------------------------------------------===// | ||
|
||
#ifndef SymbolFileDWARF_DIERef_h_ | ||
#define SymbolFileDWARF_DIERef_h_ | ||
|
||
#include "lldb/Core/dwarf.h" | ||
#include "lldb/lldb-defines.h" | ||
|
||
class DWARFFormValue; | ||
|
||
struct DIERef | ||
{ | ||
DIERef(); | ||
|
||
explicit | ||
DIERef(dw_offset_t d); | ||
|
||
DIERef(dw_offset_t c, dw_offset_t d); | ||
|
||
explicit | ||
DIERef(lldb::user_id_t uid); | ||
|
||
explicit | ||
DIERef(const DWARFFormValue& form_value); | ||
|
||
lldb::user_id_t | ||
GetUID() const; | ||
|
||
dw_offset_t cu_offset; | ||
dw_offset_t die_offset; | ||
}; | ||
|
||
typedef std::vector<DIERef> DIEArray; | ||
|
||
#endif // SymbolFileDWARF_DIERef_h_ |
Oops, something went wrong.