Commit Graph

16 Commits

Author SHA1 Message Date
David Blaikie f5cb6279a6 [llvm-dwp] Deduplicate type units
It's O(N^2) because it does a simple walk through the existing types to
find duplicates, but that will be fixed in a follow-up commit to use a
mapping data structure of some kind.

llvm-svn: 255482
2015-12-14 07:42:00 +00:00
David Blaikie 429f8ca66d [llvm-dwp] Remove some unused test code
llvm-svn: 255481
2015-12-14 07:41:56 +00:00
David Blaikie a8933d1bc5 [llvm-dwp] Restructure inputs for test case so they're all grouped together
llvm-svn: 254922
2015-12-07 18:46:41 +00:00
David Blaikie 9e51c844da [llvm-dwp] Add coverage for both the presence and absence of type units, and fix/remove the emission of a broken tu_index when no type units are present
llvm-svn: 254833
2015-12-05 03:41:53 +00:00
David Blaikie 45d85c0906 [llvm-dwp] Fix the type_units.test since I renamed its inputs as well
llvm-svn: 254830
2015-12-05 03:11:17 +00:00
David Blaikie ef9de01d9f [llvm-dwp] Rename the sufficiently-modified test to reflect it's non-simplicity
llvm-svn: 254829
2015-12-05 03:10:05 +00:00
David Blaikie 24c8ac93f3 [llvm-dwp] Support debug_tu_index
llvm-svn: 254827
2015-12-05 03:05:45 +00:00
David Blaikie efadacfb14 [llvm-dwp] Remove some out of date comments
llvm-svn: 254772
2015-12-04 21:38:39 +00:00
David Blaikie 7c4ffe018a [llvm-dwp] Implement the required on-disk probed hash table
llvm-svn: 254770
2015-12-04 21:30:23 +00:00
David Blaikie b7020255e5 [llvm-dwp] Include the debug_line.dwo section
This probably shouldn't be generated in the .dwo file for CUs, only for
TUs, but it's in the sample .dwos (generated by clang) so dwp should
reflect that.

Arguably the DWP tool could be smart enough to know that the CUs
shouldn't need a debug_line.dwo section and skip that even when it's
legitimately generated for TUs, but that's a bit more off-book.

llvm-svn: 254767
2015-12-04 21:16:42 +00:00
David Blaikie ad07b5d65e [llvm-dwp] Retrieve the DWOID from the CU for the cu_index entry
llvm-svn: 254731
2015-12-04 17:20:04 +00:00
David Blaikie b3757c008b [llvm-dwp] Include only the non-empty columns in the cu_index
llvm-svn: 254555
2015-12-02 22:01:56 +00:00
David Blaikie b073cb9be2 [llvm-dwp] Emit a rather fictional debug_cu_index
This is very rudimentary support for debug_cu_index, but it is enough to
allow llvm-dwarfdump to find the offsets for  contributions and
correctly dump debug_info.

It will need to actually find the real signature of the unit and build
the real hash table with the right number of buckets, as per the DWP
specification.

It will also need to be expanded to cover the tu_index as well.

llvm-svn: 254489
2015-12-02 06:21:34 +00:00
David Blaikie bb94e440d5 [llvm-dwp] Deduplicate strings in the debug_str.dwo section
Also, ensure that references to those strings in debug_str_offsets.dwo
correctly refer to the deduplicated strings.

llvm-svn: 254441
2015-12-01 19:17:58 +00:00
David Blaikie 98ad82a6a1 [llvm-dwp] Correctly update debug_str_offsets.dwo when linking dwo files
This doesn't deduplicate strings in the debug_str section, nor does it
properly wire up the index so that debug_info can /find/ these strings,
but it does correct the str_offsets specifically.

Follow up patches to address those related/next issues.

llvm-svn: 254431
2015-12-01 18:07:07 +00:00
David Blaikie 242b948817 [llvm-dwp] Initial partial prototype
This just concatenates the common DWP sections without doing any of the
fancy DWP things like:

1) update str_offsets
2) deduplicating strings
3) merging/creating cu/tu_index

Patches for these will follow shortly.

(also not sure about target triple/object file type for this tool - do I
really need a whole triple just to write an object file that contains
purely static/hardcoded bytes in each section? & I guess I should just
pick it based on the first input, maybe, rather than hardcoding for now
- but we only produce .dwo on ELF platforms with objcopy for now anyway)

llvm-svn: 254355
2015-12-01 00:48:39 +00:00