1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 11:02:59 +02:00
Commit Graph

18 Commits

Author SHA1 Message Date
Alexey Samsonov
ea5a42fe9c [DWARF parser] Refactor fetching DIE address ranges.
Add a helper method to get address ranges specified in a DIE
(either by DW_AT_low_pc/DW_AT_high_pc, or by DW_AT_ranges). Use it
to untangle and simplify the code.

No functionality change.

llvm-svn: 206624
2014-04-18 17:25:46 +00:00
Alexey Samsonov
740617d186 [C++11] Convert DWARF parser to range-based for loops
llvm-svn: 203766
2014-03-13 07:52:54 +00:00
Alexey Samsonov
7b56aa1648 Merge DWARFDIE::extractFast and DWARFDIE::extract into one function.
Complicated CU-DIE-specific logic in the latter was never used,
and it makes sense to have safety checks for broken dwarf in the former.

llvm-svn: 193563
2013-10-28 23:58:58 +00:00
Alexey Samsonov
08970d884d DWARF parser: Use ArrayRef to represent form sizes and simplify DWARFDIE::extractFast() interface. No functionality change.
llvm-svn: 193560
2013-10-28 23:41:49 +00:00
Alexey Samsonov
c8dd7e63e8 DebugInfo: Introduce the notion of "form classes"
Summary:
Use DWARF4 table of form classes to fetch attributes from DIE
in a more consistent way. This shouldn't change the functionality and
serves as a refactoring for upcoming change: DW_AT_high_pc has different
semantics depending on its form class.

Reviewers: dblaikie, echristo

Reviewed By: echristo

CC: echristo, llvm-commits

Differential Revision: http://llvm-reviews.chandlerc.com/D1961

llvm-svn: 193553
2013-10-28 23:01:48 +00:00
Alexey Samsonov
9568db6ca5 [DebugInfo] Delete dead code, simplify and fix code style for some existing code. No functionality change.
llvm-svn: 192894
2013-10-17 13:28:16 +00:00
David Blaikie
641c46dab7 Exract most of DWARFCompileUnit into a new DWARFUnit to prepare for the coming DWARFTypeUnit.
llvm-svn: 191233
2013-09-23 22:44:40 +00:00
Alexey Samsonov
349607af6f Add support for DebugFission to DWARF parser
Summary:
1) Make llvm-symbolizer properly symbolize
files with split debug info (by using stanalone .dwo files).
2) Make DWARFCompileUnit parse and store corresponding .dwo file,
if necessary.
3) Make bits of DWARF parsing more CompileUnit-oriented.

Reviewers: echristo

Reviewed By: echristo

CC: bkramer, llvm-commits

Differential Revision: http://llvm-reviews.chandlerc.com/D1164

llvm-svn: 189329
2013-08-27 09:20:22 +00:00
Alexey Samsonov
72db336586 Store compile unit corresponding to each chain of inlined debug info entries. No functionality change.
llvm-svn: 187792
2013-08-06 10:49:15 +00:00
Alexey Samsonov
5a62adc696 DWARF parser: remove duplicated code and fix code style in DIE extractors.
llvm-svn: 179023
2013-04-08 14:37:16 +00:00
Alexey Samsonov
0dd3d6f49e Add support for fetching inlining context (stack of source code locations)
by instruction address from DWARF.

Add --inlining flag to llvm-dwarfdump to demonstrate and test this functionality,
so that "llvm-dwarfdump --inlining --address=0x..." now works much like
"addr2line -i 0x...", provided that the binary has debug info
(Clang's -gline-tables-only *is* enough).

llvm-svn: 163128
2012-09-04 08:12:33 +00:00
Alexey Samsonov
5204605486 Improve behavior of DebugInfoEntryMinimal::getSubprogramName() introduced in r159512.
To fetch a subprogram name we should not only inspect the DIE for this subprogram, but optionally inspect
its specification, or its abstract origin (even if there is no inlining), or even specification of an abstract origin.

Reviewed by Benjamin Kramer.

llvm-svn: 160365
2012-07-17 15:28:35 +00:00
Alexey Samsonov
2e5d156c11 This patch extends the libLLVMDebugInfo which contains a minimalistic DWARF parser:
1) DIContext is now able to return function name for a given instruction address (besides file/line info).
2) llvm-dwarfdump accepts flag --functions that prints the function name (if address is specified by --address flag).
3) test case that checks the basic functionality of llvm-dwarfdump added

llvm-svn: 159512
2012-07-02 05:54:45 +00:00
Benjamin Kramer
638df7f8c4 Reduce the offsets in DwarfDebugInfoEntry to 32 bit, they're printed with %x and
that breaks on big-endian machines.

I have to clean up the 32/64 bit confusion in libDebugInfo some day.

llvm-svn: 143812
2011-11-05 15:35:00 +00:00
Benjamin Kramer
00648a5c53 DWARF: Generate the address lookup table from the DIE tree if .debug_aranges is not available.
Ported from LLDB.

llvm-svn: 139732
2011-09-14 20:52:27 +00:00
Benjamin Kramer
62f1c110f1 DebugInfo: Don't print DIEs multiple times.
llvm-svn: 139671
2011-09-14 00:15:32 +00:00
Benjamin Kramer
c592744658 Style & indentation tweaks.
llvm-svn: 139646
2011-09-13 21:47:32 +00:00
Benjamin Kramer
c4e7a56915 Sketch out a DWARF parser.
This introduces a new library to LLVM: libDebugInfo. It will provide debug information
parsing to LLVM. Much of the design and some of the code is taken from the LLDB project.

It also contains an llvm-dwarfdump tool that can dump the abbrevs and DIEs from an
object file. It can be used to write tests for DWARF input and output easily.

llvm-svn: 139627
2011-09-13 19:42:23 +00:00