summaryrefslogtreecommitdiffstats
path: root/cddl/contrib/opensolaris/tools/ctf/cvt/dwarf.c
Commit message (Collapse)AuthorAgeFilesLines
* MFC r304055:markj2016-08-311-0/+5
| | | | Fix handling of forward enum declarations in the CTF tools.
* DWARF emitted by clang 3.7 encodes array sizes using the DW_AT_countmarkj2015-10-241-0/+4
| | | | | | | | attribute rather than DW_AT_upper_bound. Teach ctfconvert about this so that array type sizes are encoded correctly. PR: 203772 MFC after: 1 week
* Mechanically convert cddl sun #ifdef's to illumossmh2015-01-171-2/+2
| | | | | | | | | | | | Since the upstream for cddl code is now illumos not sun, mechanically convert all sun #ifdef's to illumos #ifdef's which have been used in all newer code for some time. Also do a manual pass to correct the use if #ifdef comments as per style(9) as well as few uses of #if defined(__FreeBSD__) vs #ifndef illumos. MFC after: 1 month Sponsored by: Multiplay
* Fix a couple of bugs around the handling of structs and unions of size zero.markj2014-11-161-2/+8
| | | | | | | | | These would cause ctfconvert(1) to return an error when attempting to resolve valid C types. Reviewed by: Robert Mustacchi <rm@joyent.com> MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Division
* Only declare `bysz' variable under little endian archs.kaiw2014-01-291-1/+4
|
* Simplify DWARF version check.kaiw2014-01-251-8/+2
| | | | Submitted by: emaste
* Let ctfconvert accept DWARF version 3 and 4.kaiw2014-01-221-3/+6
|
* Clang 3.4 will sometimes emit DIE for struct/union member beforekaiw2014-01-201-3/+21
| | | | | | | | | | | | | | | emitting the DIE for the type of that member. ctfconvert can not handle this properly and will calculate a wrong member bit offset. Same struct/union type from different .o file will be treated as different types when their member bit offsets are different, and gets added/merged multiple times. This will in turn cause many other structs/pointers/typedefs that refer to the duplicated struct/union gets added/merged multiple times and eventually causes numerous duplicated CTF types in the kernel.debug file. The simple workaround here is to make use of DW_AT_byte_size attribute of the member DIE to calculate the bits occupied by the member's type, without actually resolving the type.
* * Make die_mem_offset() be able to handle DW_AT_data_member_locationkaiw2014-01-191-9/+57
| | | | | | | attributes generated by Clang 3.4. * Document how different compilers generate DW_AT_data_member_location attributes differently. * Document the quirks about DW_FORM_data[48].
* We should not set the unnamed DIE's name to "__anon__" since that willkaiw2014-01-171-1/+1
| | | | | | | bring back a known issue with DTrace regarding type name comparison. Instead, we can set the name to an empty string. Pointed out by: avg
* If function die_name() finds a DIE without a name, set its name tokaiw2014-01-161-0/+2
| | | | | | | | "__anon__". This hack is used to workaround a issue that compilers like GCC could generate DW_TAG_base_type DIE without a name. Note that we didn't need this before because the old libdwarf internally set all the unnamed DIE's name to "__anon__".
* Convert ctfconvert to use the new libdwarf API.kaiw2014-01-161-30/+34
|
* Merge various CTF fixes from illumospfg2013-08-261-5/+65
| | | | | | | | | | | | | | | 2942 CTF tools need to handle files which legitimately lack data 2978 ctfconvert still needs to ignore legitimately dataless files on SPARC Illumos Revisions: 13745:6b3106b4250f 13754:7231b684c18b Reference: https://www.illumos.org/issues/2942 https://www.illumos.org/issues/2978 MFC after: 3 weeks
* Fix a segfault in ctfmerge due to a bug in gcc.pfg2013-07-261-2/+40
| | | | | | | | | | | | | GCC can generate bogus dwarf attributes with DW_AT_byte_size set to 0xFFFFFFFF. The issue was originaly detected in NetBSD but it has been adapted for portability and to avoid compiler warnings. Reference: https://www.illumos.org/issues/3776 Obtained from: NetBSD MFC after: 1 month
* Use FreeBSD's libdwarf which is BSD licensed instead of the GPL'd one thatjb2008-04-261-137/+105
| | | | is used in Solaris.
* Vendor import of the full userland contrib part of DTrace support fromjb2008-04-261-105/+137
| | | | | | | | | | | OpenSolaris. This commit resets files to match the versions in the OpenSolaris tree as of 2008/04/10. The changes in this import from the previous import are the ones that will subsequently re-applied to take files off the vendor branch. This is unfortunately necessary because the Solaris developers won't allow FreeBSD support #ifdefs in their source code because that creates 'dead code' (stuff that they never compile).
* Vendor import of the CTF (Compact C Type Format) code used by DTracejb2008-04-251-0/+1848
from OpenSolaris.
OpenPOWER on IntegriCloud