| Commit message (Collapse) | Author | Age | Files | Lines |
| |\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
ChangeLog
backends/ChangeLog
config/ChangeLog
lib/ChangeLog
libasm/ChangeLog
libcpu/ChangeLog
libdw/ChangeLog
libdwfl/ChangeLog
libdwfl/derelocate.c
libdwfl/linux-kernel-modules.c
libebl/ChangeLog
libelf/ChangeLog
src/ChangeLog
tests/ChangeLog
Change-Id: I3b7ced947c6498290aaae27443985b84531f0bcd
|
| | |
| |
| |
| |
| |
| |
| | |
Set version to 0.169. Update copyright year. Update po/*.po files.
And add user visible changes to new 0.169 NEWS section.
Signed-off-by: Mark Wielaard <[email protected]>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
At least one test (dwfl-addr-sect) depends on the order of elf sections
with equal addresses. This is not guaranteed by the code. Compare also
by end address and section index to tell entries apart.
Signed-off-by: Ulf Hermann <[email protected]>
Signed-off-by: Mark Wielaard <[email protected]>
|
| | |
| |
| |
| |
| |
| |
| | |
We don't want to use it, even if it exists.
Signed-off-by: Ulf Hermann <[email protected]>
Signed-off-by: Mark Wielaard <[email protected]>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
If we don't find any debug information for a given frame, we usually
cannot unwind any further. However, the binary in question might have
been compiled with frame pointers, in which case we can look up the
well known frame pointer locations in the stack snapshot and use them
to bridge the frames without debug information.
Relax the backtrace core testcases a little by allowing a duplicate
sigusr2 frame or a backtrace ending with an invalid register. Both of
which can happen if the frame pointer unwinder guesses slightly wrong.
Signed-off-by: Ulf Hermann <[email protected]>
Signed-off-by: Mark Wielaard <[email protected]>
|
| | |
| |
| |
| |
| |
| |
| | |
Add a simple i386_unwind.c frame pointer unwinder as fallback if DWARF/CFI
unwinding fails.
Signed-off-by: Mark Wielaard <[email protected]>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
If we don't find any debug information for a given frame, we usually
cannot unwind any further. However, the binary in question might have
been compiled with frame pointers, in which case we can look up the
well known frame pointer locations in the stack snapshot and use them
to bridge the frames without debug information.
The "unwind" hook is the right place for this as it is so far only
used on s390 and called only after trying to unwind with debug
information.
Signed-off-by: Ulf Hermann <[email protected]>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Add a check to check_core to make sure the backtracegen function is
found in the backtrace. This function is in the middle of the backtrace
in the main executable and if not found it means the backtrace was
incomplete or the frame was skipped (which could happen on a bad frame
pointer only unwind).
This showed that the ppc32 backtrace test files were missing DWARF CFI
for the main executable. Regenerated them to include full CFI.
Signed-off-by: Mark Wielaard <[email protected]>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This reverts commit f9971cb422df39adea7e8c7e22689b879e39c626.
Allowing no symbol resolving at all makes it too hard to see
whether the test actually tests anything.
But do keep "address out of range" as allowed error in check_err.
This can be interpreted as DWARF not available (if end of callstack
marker is missing, which it unfortunately often is missing even if CFI
is available.).
Signed-off-by: Mark Wielaard <[email protected]>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
config.h doesn't have include guards, so including it twice is bad. We
deal with this by checking for PACKAGE_NAME, but only in some places.
Once we start using gnulib, we will need to include config.h before any
gnulib-generated headers. This is problematic if we include it
transitively through our own private headers.
In order to set a clear rule about inclusion of config.h, it is now
included in every .c file as first header, but not in any header. This
will definitely avoid double-inclusion and satisfy the condition that it
has to be included before gnulib headers. It comes at the price of
adding some redundancy, but there is no clean way to avoid this.
Signed-off-by: Ulf Hermann <[email protected]>
|
| | |
| |
| |
| |
| |
| |
| | |
F_GETFD is both cheaper and easier to port, and otherwise has the same
effect here.
Signed-off-by: Ulf Hermann <[email protected]>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
__attribute__ is a GNU extension. If we want to link against the
libraries using a different compiler, it needs to be disabled. It was
already disabled in libdw.h, and this patch extends this to the other
headers. We move the defines to libelf.h as that is included in all
the others.
Signed-off-by: Ulf Hermann <[email protected]>
|
| | |
| |
| |
| |
| |
| |
| |
| | |
The way it was before it didn't actually test if elf_update failed, but
rather did something random. !!(<some number>) is a boolean and boolean
true can be represented as anything non-0, including negative numbers.
Signed-off-by: Ulf Hermann <[email protected]>
|
| | |
| |
| |
| |
| |
| | |
Otherwise we skip the munmap() later. This leaks resources.
Signed-off-by: Ulf Hermann <[email protected]>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Some compilers implicitly cast the result of uint_fast16_t *
uint_fast16_t to something signed and then complain about the
comparison to (unsigned) size_t.
Casting phnum to size_t is a good idea anyway as 16bit multiplication
can easily overflow and we are not checking for this.
Signed-off-by: Ulf Hermann <[email protected]>
|
| | |
| |
| |
| |
| |
| | |
We cannot rely on it to be available from any of the other headers.
Signed-off-by: Ulf Hermann <[email protected]>
|
| | |
| |
| |
| |
| |
| |
| | |
If shnum is 0, the many "shnum - 1" would result in an overflow. Check it
for 0, and only subtract once, rather than on every usage.
Signed-off-by: Ulf Hermann <[email protected]>
|
| | |
| |
| |
| |
| |
| |
| | |
Otherwise the build will fail on systems that actually need file
extension for executables.
Signed-off-by: Ulf Hermann <[email protected]>
|
| | |
| |
| |
| |
| |
| | |
BYTE_ORDER and friends are customarily defined in endian.h.
Signed-off-by: Ulf Hermann <[email protected]>
|
| | |
| |
| |
| | |
Signed-off-by: Ulf Hermann <[email protected]>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
Those are deprecated and apparently some implementations of nl_langinfo
return empty strings for them. The tests even tested for those empty
strings even though the intention of the code was clearly to output
"yes" or "no" there.
Signed-off-by: Ulf Hermann <[email protected]>
|
| | |
| |
| |
| |
| |
| | |
Not all search.h declare it, and it is not very helpful anyway.
Signed-off-by: Ulf Hermann <[email protected]>
|
| | |
| |
| |
| |
| |
| | |
We only include them where we actually need them and only on linux.
Signed-off-by: Ulf Hermann <[email protected]>
|
| | |
| |
| |
| |
| |
| |
| | |
The bad fts not only needs to be included before config.h, but also
requires various special types without including sys/types.h.
Signed-off-by: Ulf Hermann <[email protected]>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When building with gcc -Os it seems we can inline read_number_entries
but if that function fails then n will not be initialized. GCC seems not
to realize that in that case n won't be used at all. Explicitly initialize
n to zero to prevent a spurious error: 'n' may be used uninitialized in
this function [-Werror=maybe-uninitialized] in that case.
https://sourceware.org/bugzilla/show_bug.cgi?id=21011
Signed-off-by: Mark Wielaard <[email protected]>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
If we don't find any debug information for a given frame, we usually
cannot unwind any further. However, the binary in question might have
been compiled with frame pointers, in which case we can look up the
well known frame pointer locations in the stack snapshot and use them
to bridge the frames without debug information.
At the moment this works only for ARM code. THUMB code uses a
different mechanism for unwinding. Also, in order to figure out if
a function was compiled in ARM or in THUMB mode we need a symbol
table which might not be available (e.g. with JIT-compiled code).
Furthermore, there doesn't seem to be a fixed convention on the order in
which LR and FP are pushed to the stack on a new frame. The code assumes
FP is first and LR second. This is what QV4 does.
Change-Id: Iac732e11b7434043cd613d95d8cb2ac753b93920
Reviewed-by: Christian Kandeler <[email protected]>
|
| | |
| |
| |
| |
| | |
Change-Id: I51b9bb88dc86c3378451e07ade19b21526b9eb0c
Reviewed-by: Christian Kandeler <[email protected]>
|
| | |
| |
| |
| |
| | |
Change-Id: I6b5eb620bbd3d20e0dfff173917f1615cddd5718
Reviewed-by: Christian Kandeler <[email protected]>
|
| | |
| |
| |
| |
| |
| |
| | |
The tree functions are more widely available.
Change-Id: Ic11a6485ae45f83e7ec8c18dcd7fa1a1902f7ff4
Reviewed-by: Christian Kandeler <[email protected]>
|
| | |
| |
| |
| |
| |
| |
| | |
We drop the preserve_dates mode.
Change-Id: I79ec3737a41f30bd942e7bc7ea6b1abe33ee9616
Reviewed-by: Christian Kandeler <[email protected]>
|
| | |
| |
| |
| |
| |
| |
| |
| | |
The fnmatch implementation in gnulib is buggy and cannot understand
".?(z)debug*". We split it into two patterns.
Change-Id: Ia70b56a9852b442344ebdd7f2a64ae52321411cf
Reviewed-by: Christian Kandeler <[email protected]>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
elf.h does include features.h which should define those. However, on
windows there is no features.h. We have the empty features.h in libgnu
that depends on config.h being included before (which we can't), and the
features.h in lib that is only available when installed in selfcontained
mode. Therefore we need a workaround here.
Change-Id: Ib9074d485ab56e53eb671b859e085b934a782b55
Reviewed-by: Christian Kandeler <[email protected]>
|
| | |
| |
| |
| |
| |
| |
| |
| | |
strip explicitly creates the new files. This will not work on windows if
the files already exist.
Change-Id: Icdedcd61d26c390669c5c4915ce84e91a9044f20
Reviewed-by: Christian Kandeler <[email protected]>
|
| | |
| |
| |
| |
| |
| |
| | |
error() will only output the file name, but with ".exe" on windows.
Change-Id: Icbf9c026003d3e18abc9f68e13789d04811af48b
Reviewed-by: Christian Kandeler <[email protected]>
|
| | |
| |
| |
| |
| |
| |
| |
| | |
The permission macros are not guaranteed to be defined and the octal
numbers are rather well known.
Change-Id: I90ea2f98013f963857946a2f150a4a7114ca2b9a
Reviewed-by: Christian Kandeler <[email protected]>
|
| | |
| |
| |
| |
| |
| |
| |
| | |
/dev/zero is meant for reading zeroes. /dev/null is for writing into
nirvana.
Change-Id: Ic04eaefd72944776a1d3515c0008baf3d3d8de09
Reviewed-by: Christian Kandeler <[email protected]>
|
| | |
| |
| |
| |
| |
| |
| | |
strndupa doesn't exist, so we use strndup and free.
Change-Id: Ibb3fed05bcfcf9d74b31e5695e43e08766512cbf
Reviewed-by: Christian Kandeler <[email protected]>
|
| | |
| |
| |
| |
| |
| |
| |
| | |
On windows x86_64 pid_t is 64bit wide. We need to adapt our printf
format respectively.
Change-Id: I0e78ed597b780ea9ede6044d9d10ef08736b9009
Reviewed-by: Christian Kandeler <[email protected]>
|
| | |
| |
| |
| |
| |
| |
| | |
On windows x86_64 we need more stack in some places.
Change-Id: Ic56d3294388521786bf429a24e76f21fa6d626d7
Reviewed-by: Christian Kandeler <[email protected]>
|
| | |
| |
| |
| |
| |
| |
| |
| | |
We want to generate libraries for the same machine type we're builting
the dlls for, not only for x86.
Change-Id: I93525647c1ff87992ad69282875c8edaec0c31fe
Reviewed-by: Christian Kandeler <[email protected]>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
We need to export open(), close(), malloc(), and free() from the C
library we are using so that we can handle resources passed to and from
elfutils correctly. For example, on Windows, calling free() on memory
malloc()'d with a different C library will not work. In addition, having
__cxa_demangle from the GNU libstdc++ available is very helpful, so we
include that, too.
Change-Id: I8e47e8f313fb3ffcc18309dadabf24acf36465f0
Reviewed-by: Christian Kandeler <[email protected]>
|
| | |
| |
| |
| |
| |
| |
| |
| | |
$ORIGIN and $LIB are not supported by all implementations of dlopen() and
on windows we need backslashes as directory separators.
Change-Id: I7394fcda65fa0eca8e21e4d1035fd890dac0b32d
Reviewed-by: Christian Kandeler <[email protected]>
|
| | |
| |
| |
| |
| |
| |
| |
| | |
The printf format attribute is not supported there. Also, SIGBUS and
SI_USER don't exist, so we don't have to check for them.
Change-Id: I1472150c83946337954cbbc475318dbb05549fc2
Reviewed-by: Christian Kandeler <[email protected]>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The mechanism of moving argp_program_version_hook and
argp_program_bug_address to .rodata is not portable and two pointers
per program are not worth the effort to make it portable. Revert the
pointers to be non-const.
Change-Id: Iea458a5927cf31c72d972bc014229eb62fe2a5a5
Reviewed-by: Christian Kandeler <[email protected]>
|
| | |
| |
| |
| |
| |
| |
| | |
On windows we cannot rename or unlink open files.
Change-Id: Ieae8712266a3e65217580d4936219767c5f26f21
Reviewed-by: Christian Kandeler <[email protected]>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
On windows the resulting ino and dev entries are always 0, so the file
would always be discarded. We apply a heuristic instead: If the ctime,
mtime, mode and size of the two files are all equal then we consider
them to be the same. It's exceedingly unlikely to produce two different
files for which that holds by chance.
Change-Id: I491c95ab8b90fc3c1b786cceae242e142b5a491f
Reviewed-by: Christian Kandeler <[email protected]>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
In general we need to use ';' as path separator and '\' and directory
separator on windows. The shell will automatically translate paths to
some extent, but we have to call "pwd -W" rather than plain "pwd" to
get something useful.
Change-Id: I1a117d219a2aa00c1f77ae7d3a1d92b9bae526db
Reviewed-by: Christian Kandeler <[email protected]>
|
| | |
| |
| |
| |
| |
| |
| |
| | |
This accounts for the CR/LF problem we get when producing text files on
windows.
Change-Id: Ia37bfa31840dbb9874ab7dd37be17cc88d9da817
Reviewed-by: Christian Kandeler <[email protected]>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
If O_BINARY is not defined, define it to 0, so that the change has no
effect then. Some systems have separate binary and text modes for files,
and we don't want the text mode to be used.
Change-Id: If7efb5bd448c2a1c7d1eb5dab276849b1b15a3ce
Reviewed-by: Christian Kandeler <[email protected]>
|
| | |
| |
| |
| |
| | |
Change-Id: I6ea2f6f6684ce1df10c7008ad4a894c9205a267c
Reviewed-by: Christian Kandeler <[email protected]>
|