363050 |
09-Jul-2020 |
brooks |
MFC r362979:
Fix a -Wvoid-pointer-to-enum-cast warning missed in r359978.
This pattern is used in callbacks with void * data arguments and seems both relatively uncommon and relatively harmless. Silence the warning by casting through uintptr_t.
This warning is on by default in Clang 11.
Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D24425 |
305105 |
31-Aug-2016 |
markj |
MFC r304055: Fix handling of forward enum declarations in the CTF tools. |
302408 |
08-Jul-2016 |
gjb |
Copy head@r302406 to stable/11 as part of the 11.0-RELEASE cycle. Prune svn:mergeinfo from the new branch, as nothing has been merged here.
Additional commits post-branch will follow.
Approved by: re (implicit) Sponsored by: The FreeBSD Foundation |
293861 |
14-Jan-2016 |
markj |
Remove a dead local variable, missed in r274565.
MFC after: 3 days Sponsored by: EMC / Isilon Storage Division
|
289866 |
24-Oct-2015 |
markj |
DWARF emitted by clang 3.7 encodes array sizes using the DW_AT_count 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
|
287234 |
28-Aug-2015 |
markj |
Re-apply r274569. It was reverted in r276848 since that appeared to fix some ctfmerge crashes that started to occur on i386 weeks after r274569 was committed. Some later investigation indicated that the crashes were caused by malformed CTF info that led to a stack overflow. The issue with CTF info in i386 kernels seems to have been resolved by r261246, which updated libdwarf and libelf.
r274569 fixes a bug which caused duplicate types to appear in the kernel's CTF info. This duplication generally does not cause problems when using DTrace, but makes it easier to hit the limit of 2^15 - 1 distinct type definitions in a CTF container.
MFC after: 2 weeks
|
280125 |
15-Mar-2015 |
markj |
Add a missing format string argument.
PR: 197391 MFC after: 3 days
|
279861 |
10-Mar-2015 |
markj |
MFV r279822:
This merge is effectively a no-op since parts of it are already present in FreeBSD, and the rest is incorrect since gelf_newehdr(3) and gelf_newphdr(3) return pointers on FreeBSD rather than integers.
Illumos issue: 5589 improper use of NULL in tools/ctf
MFC after: 3 days
|
278529 |
10-Feb-2015 |
gnn |
Initial version of DTrace on ARM32.
Submitted by: Howard Su based on work by Oleksandr Tymoshenko Reviewed by: ian, andrew, rpaulo, markj
|
277300 |
17-Jan-2015 |
smh |
Mechanically convert cddl sun #ifdef's to illumos
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
|
276848 |
08-Jan-2015 |
markj |
Revert r274569. It seems to be causing a crash when merging CTF data for recent i386 GENERIC kernels.
Reported by: David Wolfskill
|
275563 |
06-Dec-2014 |
delphij |
MFV r275536:
Illumos issue: 3363 Mark non-returning functions in ctftools
MFC after: 2 weeks
|
274569 |
16-Nov-2014 |
markj |
Only compare visitation counters if they've both been set for the current type graph walk.
Reviewed by: Robert Mustacchi <rm@joyent.com> MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Division
|
274565 |
16-Nov-2014 |
markj |
Remove an incorrect optimization. The type IDs of each member of a struct or union must be checked when determine whether two types are equivalent. This bug could cause ctfmerge(1) to incorrectly merge distinct types.
Reviewed by: Robert Mustacchi <rm@joyent.com> MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Division
|
274564 |
16-Nov-2014 |
markj |
Fix a couple of bugs around the handling of structs and unions of size zero. 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
|
261259 |
29-Jan-2014 |
kaiw |
Only declare `bysz' variable under little endian archs.
|
261246 |
28-Jan-2014 |
kaiw |
Merge from projects/elftoolchain: Upgrade libelf and libdwarf to newer versions from elftoolchain upstream (r2974). Convert ctfconvert to use the APIs from the new libdwarf and make ctfconvert work with Clang 3.4.
__FreeBSD_version is bumped to 1100006.
A list of notable changes:
[libelf]
* The old libelf source code in lib/libelf has been removed. Instead, the new libelf is built from contrib/elftoolchain/libelf. * Manual pages are largely improved. * Internal implementation was refactored and improved for better correctness and portability. * Fixed a few memory leaks. * Extended with extension APIs `elf_open()` and `elf_openmemory()`. These APIs are similar to `elf_begin()` and `elf_memory()` respectively, except that they return an ELF descriptor of kind `ELF_K_NONE` instead of an error if the object being opened could not be parsed. * Implement support for translating sections of type ELF_T_VDEF and ELF_T_VNEED. * Improve `elf_update()` to check that the executable header, the program header table, section contents and the section header table do not overlap, and to ensure that gaps between extents are filled with the fill character specified by `elf_fill()`. * Allow `Elf_Data` descriptors to have types and alignments differing from their containing section. * Remove functionality controlled by `LIBELF_TEST_HOOKS`. * Support processing of BSD-flavor archives. * Add knowledge of section types `SHT_GNU_ATTRIBUTES` and `SHT_GNU_LIBLIST`. * Use elftoolchain style symbol versioning. * Shared library version is bumped.
[libdwarf]
* The old libdwarf source code in lib/libdwarf has been removed. Instead, the new libdwarf is built from contrib/elftoolchain/libdwarf. * Support full DWARF3 and partial DWARF4 parsing. * Support DWARF2 generation. * Support for DWARF line number, call frame, location expression, macro info and address ranges, among other things. * The APIs for the new libdwarf are mostly compatible with the widely used LGPL libdwarf. Some of the incompatible APIs from the old libdwarf are kept as its own extensions. All the APIs are documented. * Use elftoolchain style symbol versioning. * Shared library version is bumped.
[ctfconvert]
* Switch to the APIs from the new libdwarf. * Improve die_mem_offset() so that DW_AT_data_member_location attributes generated by Clang 3.4 can be handled properly. * 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. This way ctfconvert can deal with the case that Clang 3.4 sometimes emits DIE for struct/union member before emitting the DIE for the type of that member.
Obtained from: elftoolchain No objection: -toolchain mailing list
|
254941 |
26-Aug-2013 |
pfg |
Merge various CTF fixes from illumos
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
|
253678 |
26-Jul-2013 |
pfg |
Style issue in r253661.
Pointed out by: avg MFC after: 1 month
|
253661 |
26-Jul-2013 |
pfg |
Fix a segfault in ctfmerge due to a bug in gcc.
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
|
249656 |
19-Apr-2013 |
ed |
Fix -Wmissing-variable-declarations compiler warnings.
References: https://www.illumos.org/issues/3700
|
248991 |
01-Apr-2013 |
dim |
Follow up to r247960 and rr247960 by also amending ctfmerge. For the only other case where STT_FILE symbols are used, in symit_next() in cddl/contrib/opensolaris/tools/ctf/cvt/input.c, save the basename of the symbol, instead of the full pathname.
Reported by: avg Tested by: avg, jimharris MFC after: 1 week
|
247962 |
07-Mar-2013 |
dim |
Fix error in r247960: actually assign the basename to match.iim_file.
Pointed out by: avg Pointy hat to: dim MFC after: 1 week X-MFC-With: r247960
|
247960 |
07-Mar-2013 |
dim |
Make ctfconvert work correctly on clang-compiled object files. Clang puts the full original source filename in the STT_FILE entry of the ELF symbol table, while gcc saves only the basename.
Since the DWARF DW_AT_name attribute contains the full source filename, both for clang and gcc, ctfconvert takes just the basename of it, for matching with the STT_FILE entry. So when attempting to match with such an entry, use its basename, if necessary.
Reported by: avg MFC after: 1 week
|
233407 |
24-Mar-2012 |
gonzo |
Maintain target's byte order for multi-byte fields in CTF structures.
CTF format is not cross-platform by design, e.g. it is not guaranteed that data generated by ctfconvert/ctfmerge on one architecture will be successfuly read on another. CTF structures are saved/restored using naive approach. Roughly it looks like: write(fd, &ctf_struct, sizeof(ctf_struct)) read(fd, &ctf_struct, sizeof(ctf_struct))
By sheer luck memory layout of all type-related CTF structures is the same on amd64/i386/mips32/mips64. It's different on ARM though. sparc, ia64, powerpc, and powerpc64 were not tested. So in order to get file compatible with dtrace on ARM it should be compiled on ARM. Alternative solution would be to have "signatures" for every platform and ctfmerge should convert host's reperesentation of CTF structure to target's one using "signature" as template.
This patch checks byte order of ELF files used for generating CTF record and makes sure that byte order of data written to resulting files is the same as target's byte order.
|
228597 |
16-Dec-2011 |
dim |
In cddl/contrib/opensolaris/tools/ctf/cvt/ctfmerge.c, a size_t is passed to fprintf as a field width. It should be an int instead, so cast it.
MFC after: 1 week
|
210767 |
02-Aug-2010 |
rpaulo |
MFV OpenSolaris DTrace userland bits.
|
210438 |
23-Jul-2010 |
np |
Catch up with r210324. d_buf will be NULL for SHT_NOBITS sections, do not attempt to copy from it in that case.
MFC after: 1 month
|
207578 |
03-May-2010 |
kan |
Do not encode more than CTF_MAX_VLEN(1023) enum members.
CTF can not represent enums with more than CTF_MAX_VLEN members, but ctfconvert will happily ignore that limitation and create CTF section no other tool can interpret.
This change is different from similar change from upstream, which just returns an error if big enum is encountered. Doing that means that every FreeBSD kernel with compiled in hwpmc will have no useable CTF information due to pmc_event enum having 1236+ members.
|
178546 |
26-Apr-2008 |
jb |
A lot of changes to make this code compile cleanly on FreeBSD.
|
178545 |
26-Apr-2008 |
jb |
Use FreeBSD's libdwarf which is BSD licensed instead of the GPL'd one that is used in Solaris.
|
178544 |
26-Apr-2008 |
jb |
We need to be consistent with prototype definitions. It isn't OK to use 'const' and just override it whenever we feel like it. If we use it at all, then we need to do it properly.
Add a couple of functions that were useful in getting this code ported.
|
178542 |
26-Apr-2008 |
jb |
Make this file compile cleanly.
|
178529 |
26-Apr-2008 |
jb |
This commit was generated by cvs2svn to compensate for changes in r178528, which included commits to RCS files with non-trunk default branches.
|
178482 |
25-Apr-2008 |
jb |
This commit was generated by cvs2svn to compensate for changes in r178481, which included commits to RCS files with non-trunk default branches.
|