This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[RFA]: Patch to handle new libunwind release
- From: Jeff Johnston <jjohnstn at redhat dot com>
- To: gdb-patches at sources dot redhat dot com
- Date: Tue, 03 Aug 2004 11:38:23 -0400
- Subject: [RFA]: Patch to handle new libunwind release
The attached patch changes libunwind-frame.c to dlopen "libunwind-xxxx.so"
instead of "libunwind.so". This is needed as the design has changed in
libunwind 0.97 and the interface functions are no longer found in the vanilla
library. Without the patch, ia64 debugging will revert to the examine prologue
method which cannot handle a number of scenarios, including backtraces on threads.
Tested on ia64 with libunwind-0.96 and libunwind-0.97.
Ok to commit?
2004-07-28 Jeff Johnston <jjohnstn@redhat.com>
* libunwind-frame.c (LIBUNWIND_SO): Change to be of form:
libunwind-xxxx.so" where xxxx is UNW_TARGET.
Index: libunwind-frame.c
===================================================================
RCS file: /cvs/src/src/gdb/libunwind-frame.c,v
retrieving revision 1.4
diff -u -p -r1.4 libunwind-frame.c
--- libunwind-frame.c 14 Apr 2004 15:18:06 -0000 1.4
+++ libunwind-frame.c 28 Jul 2004 22:27:48 -0000
@@ -45,10 +45,6 @@
static int libunwind_initialized;
static struct gdbarch_data *libunwind_descr_handle;
-#ifndef LIBUNWIND_SO
-#define LIBUNWIND_SO "libunwind.so"
-#endif
-
/* Required function pointers from libunwind. */
static int (*unw_get_reg_p) (unw_cursor_t *, unw_regnum_t, unw_word_t *);
static int (*unw_get_fpreg_p) (unw_cursor_t *, unw_regnum_t, unw_fpreg_t *);
@@ -75,6 +71,10 @@ struct libunwind_frame_cache
#define STRINGIFY2(name) #name
#define STRINGIFY(name) STRINGIFY2(name)
+#ifndef LIBUNWIND_SO
+#define LIBUNWIND_SO "libunwind-" STRINGIFY(UNW_TARGET) ".so"
+#endif
+
static char *get_reg_name = STRINGIFY(UNW_OBJ(get_reg));
static char *get_fpreg_name = STRINGIFY(UNW_OBJ(get_fpreg));
static char *get_saveloc_name = STRINGIFY(UNW_OBJ(get_save_loc));