| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
Submitted by: emaste
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
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].
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
"__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__".
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
| |
Pointed out by: avg
MFC after: 1 month
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
| |
References:
https://www.illumos.org/issues/3700
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
Pointed out by: avg
Pointy hat to: dim
MFC after: 1 week
X-MFC-With: r247960
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
to fprintf as a field width. It should be an int instead, so cast it.
MFC after: 1 week
|
| |
|
|
|
|
|
|
| |
attempt to copy from it in that case.
MFC after: 1 month
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
is used in Solaris.
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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).
|
|
from OpenSolaris.
|