This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: backtrace for hppa


On Tue, Jan 16, 2018 at 11:20 AM, Joseph Myers <joseph@codesourcery.com> wrote:
> As far as I can tell, the only architecture in glibc that uses the generic
> debug/backtrace.c is hppa.
> <https://sourceware.org/glibc/wiki/Release/2.26#HPPA> also shows the
> debug/tst-backtrace* tests as failing for hppa.  That suggests the generic
> debug/backtrace.c is not in fact functional anywhere and so the x86_64
> backtrace implementation (which many other architectures include) would be
> a better generic version.

I observe that sysdeps/hppa/frame.h has received no substantive
changes since 2000, and contains

| /* FIXME: will verify this later */
| struct layout
| {
|   void *next;
|   void *return_address;
| };

which suggests that the use of debug/backtrace.c for HPPA was never
properly validated.

> --- a/sysdeps/x86_64/backtrace.c
> +++ b/sysdeps/x86_64/backtrace.c
> @@ -20,6 +20,7 @@
>  #include <libc-lock.h>
>  #include <dlfcn.h>
>  #include <execinfo.h>
> +#include <gnu/lib-names.h>
>  #include <stdlib.h>
>  #include <unwind.h>
>
> @@ -49,7 +50,7 @@ dummy_getcfa (struct _Unwind_Context *ctx __attribute__ ((unused)))
>  static void
>  init (void)
>  {
> -  libgcc_handle = __libc_dlopen ("libgcc_s.so.1");
> +  libgcc_handle = __libc_dlopen (LIBGCC_S_SO);
>
>    if (libgcc_handle == NULL)
>      return;

This change should probably be applied independently of whether it
helps hppa (and I don't see any reason to wait, either).

zw


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]