summaryrefslogtreecommitdiff
path: root/cddl/contrib/opensolaris/tools/ctf/cvt/dwarf.c
Commit message (Collapse)AuthorAgeFilesLines
* Increase ctfconvert buffer sizeLeandro Lupori2019-02-251-1/+1
| | | | | | | | Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D19353 Notes: svn path=/head/; revision=344534
* Process CUs with a language attribute of DW_LANG_Mips_Assembler.Mark Johnston2018-06-111-1/+2
| | | | | | | | | | | At the moment ctfconvert(1) does not do much with such CUs, but that may not be true in the future, and we run ctfconvert on several assembly files during the build. X-MFC with: r334883 Notes: svn path=/head/; revision=334961
* Don't process DWARF generated from non-C/C++ code.Mark Johnston2018-06-091-3/+22
| | | | | | | | | | | | ctfconvert(1) is not designed to handle DWARF generated from such code, and will generally fail in non-obvious ways. Use an explicit check to help catch such potential failures. Reported by: Johannes Lundberg <johalun0@gmail.com> MFC after: 2 weeks Notes: svn path=/head/; revision=334883
* ctf dwarf: don't report "no dwarf entry" as if it were an errorMatt Macy2018-05-191-3/+6
| | | | Notes: svn path=/head/; revision=333885
* ctfconvert/ctfmerge: Fix a memory leak enumerating DWARF filesConrad Meyer2018-03-261-0/+1
| | | | | | | | Reported by: Coverity Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=331600
* Revert r253678, r253661:Pedro F. Giffuni2016-12-031-40/+2
| | | | | | | | | | | | | | | | Fix a segfault in ctfmerge(1) due to a bug in GCC. The change was correct and the bug real, but upstream didn't adopt it and we want to remain in sync. When/if upstream does something about it we can bring their version. The bug in question was fixed in GCC 4.9 which is now the default in FreeBSD's ports. Our native gcc-4.2, which is still in use in some Tier-2 platforms also has a workaround so no end-user should be harmed by the revert. Notes: svn path=/head/; revision=309490
* Fix handling of forward enum declarations in the CTF tools.Mark Johnston2016-08-131-0/+5
| | | | | | | | Reported by: mmacy MFC after: 2 weeks Notes: svn path=/head/; revision=304055
* DWARF emitted by clang 3.7 encodes array sizes using the DW_AT_countMark Johnston2015-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 Notes: svn path=/head/; revision=289866
* Mechanically convert cddl sun #ifdef's to illumosSteven Hartland2015-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 Notes: svn path=/head/; revision=277300
* Fix a couple of bugs around the handling of structs and unions of size zero.Mark Johnston2014-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 Notes: svn path=/head/; revision=274564
* Only declare `bysz' variable under little endian archs.Kai Wang2014-01-291-1/+4
| | | | Notes: svn path=/head/; revision=261259
* Simplify DWARF version check.Kai Wang2014-01-251-8/+2
| | | | | | | Submitted by: emaste Notes: svn path=/projects/elftoolchain/; revision=261154
* Let ctfconvert accept DWARF version 3 and 4.Kai Wang2014-01-221-3/+6
| | | | Notes: svn path=/projects/elftoolchain/; revision=261025
* Clang 3.4 will sometimes emit DIE for struct/union member beforeKai Wang2014-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. Notes: svn path=/projects/elftoolchain/; revision=260897
* * Make die_mem_offset() be able to handle DW_AT_data_member_locationKai Wang2014-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]. Notes: svn path=/projects/elftoolchain/; revision=260880
* We should not set the unnamed DIE's name to "__anon__" since that willKai Wang2014-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 Notes: svn path=/projects/elftoolchain/; revision=260809
* If function die_name() finds a DIE without a name, set its name toKai Wang2014-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__". Notes: svn path=/projects/elftoolchain/; revision=260797
* Convert ctfconvert to use the new libdwarf API.Kai Wang2014-01-161-30/+34
| | | | Notes: svn path=/projects/elftoolchain/; revision=260795
* Merge various CTF fixes from illumosPedro F. Giffuni2013-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 Notes: svn path=/head/; revision=254941
* Fix a segfault in ctfmerge due to a bug in gcc.Pedro F. Giffuni2013-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 Notes: svn path=/head/; revision=253661
* Use FreeBSD's libdwarf which is BSD licensed instead of the GPL'd one thatJohn Birrell2008-04-261-137/+105
| | | | | | | is used in Solaris. Notes: svn path=/head/; revision=178545
* This commit was generated by cvs2svn to compensate for changes in r178528,John Birrell2008-04-261-105/+137
| | | | | | | which included commits to RCS files with non-trunk default branches. Notes: svn path=/head/; revision=178529
* This commit was generated by cvs2svn to compensate for changes in r178481,John Birrell2008-04-251-0/+1848
which included commits to RCS files with non-trunk default branches. Notes: svn path=/head/; revision=178482