libunwind/libunwind-0.98.6.diff

115 lines
3.5 KiB
Diff

--- configure.in
+++ configure.in
@@ -83,8 +83,7 @@ AC_CONFIG_LINKS(include/libunwind.h:incl
include/tdep.h:include/tdep-$target_arch.h)
AC_ARG_ENABLE(debug,
-[ --enable-debug turn on debug support (slows down execution)],
-[enable_debug=yes], [])
+[ --enable-debug turn on debug support (slows down execution)])
LIBUNWIND___THREAD
--- include/internal.h
+++ include/internal.h
@@ -201,11 +201,11 @@ extern int unwi_dyn_validate_cache (unw_
extern unw_dyn_info_list_t _U_dyn_info_list;
extern pthread_mutex_t _U_dyn_info_list_lock;
+#include <stdio.h>
#if UNW_DEBUG
#define unwi_debug_level UNWI_ARCH_OBJ(debug_level)
extern long unwi_debug_level;
-# include <stdio.h>
# define Debug(level,format...) \
do { \
if (unwi_debug_level > level) \
--- src/ia64/Gscript.c
+++ src/ia64/Gscript.c
@@ -113,7 +113,7 @@ get_script_cache (unw_addr_space_t as, s
sigprocmask (SIG_SETMASK, &unwi_full_sigmask, saved_sigmaskp);
if (likely (caching == UNW_CACHE_GLOBAL))
{
- Debug (16, "%s: acquiring lock\n");
+ Debug (16, "acquiring lock\n");
mutex_lock (&cache->lock);
}
#endif
--- src/os-linux.h
+++ src/os-linux.h
@@ -226,7 +226,7 @@ maps_next (struct map_iterator *mi,
{
/* copy down the remaining bytes, if any */
if (bytes_left > 0)
- memcpy (mi->buf_end - mi->buf_size, mi->buf, bytes_left);
+ memmove (mi->buf_end - mi->buf_size, mi->buf, bytes_left);
mi->buf = mi->buf_end - mi->buf_size;
nread = read (mi->fd, mi->buf + bytes_left,
@@ -238,8 +238,8 @@ maps_next (struct map_iterator *mi,
/* Move contents to the end of the buffer so we
maintain the invariant that all bytes between
mi->buf and mi->buf_end are valid. */
- memcpy (mi->buf_end - nread - bytes_left, mi->buf,
- nread + bytes_left);
+ memmove (mi->buf_end - nread - bytes_left, mi->buf,
+ nread + bytes_left);
mi->buf = mi->buf_end - nread - bytes_left;
}
--- src/x86_64/Gresume.c
+++ src/x86_64/Gresume.c
@@ -35,6 +35,7 @@ HIDDEN inline int
x86_64_local_resume (unw_addr_space_t as, unw_cursor_t *cursor, void *arg)
{
# warning Implement me!
+ return -UNW_EINVAL;
}
#endif /* !UNW_REMOTE_ONLY */
--- tests/Gtest-concurrent.c
+++ tests/Gtest-concurrent.c
@@ -84,9 +84,10 @@ doit (void)
int i;
for (i = 0; i < NTHREADS; ++i)
- pthread_create (th + i, NULL, worker, NULL);
+ if (pthread_create (th + i, NULL, worker, NULL))
+ break;
- for (i = 0; i < NTHREADS; ++i)
+ while (i-- > 0)
pthread_join (th[i], NULL);
}
--- tests/Makefile.am
+++ tests/Makefile.am
@@ -23,7 +23,7 @@ if ARCH_IA64
Gia64-test-nat Lia64-test-nat \
Gia64-test-rbs Lia64-test-rbs \
Gia64-test-readonly Lia64-test-readonly \
- ia64-test-setjmp ia64-test-sig
+ ia64-test-sig
endif
check_SCRIPTS_cdep = run-ptrace-mapper run-ptrace-misc
check_PROGRAMS_cdep = Gtest-bt Ltest-bt Gtest-exc Ltest-exc \
@@ -83,7 +83,6 @@ LIBUNWIND = ../src/libunwind-$(arch).la
LDADD = $(LIBUNWIND)
test_setjmp_LDADD = ../src/libunwind-setjmp.la
-ia64_test_setjmp_LDADD = ../src/libunwind-setjmp.la
test_ptrace_LDADD = ../src/libunwind-ptrace.a $(LIBUNWIND)
Ltest_concurrent_LDADD = $(LIBUNWIND) -lpthread
Gtest_concurrent_LDADD = $(LIBUNWIND) -lpthread
--- tests/ia64-test-setjmp.c
+++ tests/ia64-test-setjmp.c
@@ -34,6 +34,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DE
#include <setjmp.h>
#include <signal.h>
#include <stdlib.h>
+#include <string.h>
#include <unistd.h>
#include <sys/mman.h>