Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [RFA]: Patch to handle new libunwind release
@ 2004-08-03 15:38 Jeff Johnston
  2004-08-04 18:17 ` Andrew Cagney
  0 siblings, 1 reply; 3+ messages in thread
From: Jeff Johnston @ 2004-08-03 15:38 UTC (permalink / raw)
  To: gdb-patches

[-- Attachment #1: Type: text/plain, Size: 636 bytes --]

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.


[-- Attachment #2: libunwind-frame.patch --]
[-- Type: text/plain, Size: 1090 bytes --]

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));

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [RFA]: Patch to handle new libunwind release
  2004-08-03 15:38 [RFA]: Patch to handle new libunwind release Jeff Johnston
@ 2004-08-04 18:17 ` Andrew Cagney
  2004-08-06 18:44   ` Jeff Johnston
  0 siblings, 1 reply; 3+ messages in thread
From: Andrew Cagney @ 2004-08-04 18:17 UTC (permalink / raw)
  To: Jeff Johnston; +Cc: gdb-patches

> 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.
> 

I feel ill

+#ifndef LIBUNWIND_SO
+#define LIBUNWIND_SO "libunwind-" STRINGIFY(UNW_TARGET) ".so"
+#endif

however, we've clearly got no choice, so "obvious".

Andrew



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [RFA]: Patch to handle new libunwind release
  2004-08-04 18:17 ` Andrew Cagney
@ 2004-08-06 18:44   ` Jeff Johnston
  0 siblings, 0 replies; 3+ messages in thread
From: Jeff Johnston @ 2004-08-06 18:44 UTC (permalink / raw)
  To: Andrew Cagney; +Cc: gdb-patches

Andrew Cagney wrote:
>> 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.
>>
> 
> I feel ill
> 
> +#ifndef LIBUNWIND_SO
> +#define LIBUNWIND_SO "libunwind-" STRINGIFY(UNW_TARGET) ".so"
> +#endif
> 
> however, we've clearly got no choice, so "obvious".
> 
> Andrew
>

Patch checked in.  Thanks.

-- Jeff J.

> 
> 


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-08-06 18:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-08-03 15:38 [RFA]: Patch to handle new libunwind release Jeff Johnston
2004-08-04 18:17 ` Andrew Cagney
2004-08-06 18:44   ` Jeff Johnston

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox