This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB 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: [PATCH] Add sparc64-linux sigtramp support


   Date: Wed, 20 Apr 2005 20:44:27 -0700
   From: "David S. Miller" <davem@davemloft.net>

   This patch gets signal backtraces working properly on sparc64/linux
   targets.  The two non-straightforward parts of the implementation are:

   1) proper stack bias adjusting of cache->base
   2) registering the sniffer in the correct order

   The issue in #2 is that we use the solaris2 sparc64 target support
   as our base, then override and add things which are different for the
   linux sparc64 target.

FYI, "issue" #1 is to make sure the frame base address matches with
what the DWARF2 unwinder thinks.

   The solaris2 sparc64 osabi init which we call registers first the
   solaris2 sigtramp sniffer, then the generic sparc64 frame sniffer,
   via sparc64_init_abi().

   Therefore we have to register the linux sparc64 sniffer before we
   invoke sparc64_sol2_init_abi().

Yes, indeed.

   While doing this work I noticed that the signal trampoline symbols
   names were wrong in the 32-bit sparc linux sigtramp support.  Those
   are the i386 glibc symbol names, not the sparc ones :-)  So I corrected
   those and also documented the "struct pt_regs" layout that we're
   picking sigtramp registers from.

Ah thanks for noticing that pasto; I probably didn't notice for the
reason explained in the comment.

I'm not thrilled by documenting the "struct pt_regs" layout.  The
constants already are there in the code.  I think it is more important
to document where to find the offsets.  I also think it is better to
point people to "struct sigcontext" instead of "struct pt_regs".
That's where I got them from.  Can you change the comment in something
like:

/* Offsets from <bits/sigcontext.h>.  */

?

Otherwise this is ok, so please go ahead.  Oh, except for the fact
that there is a tab instead of a space between "symbol" and "names" in
the ChangeLog entry ;-).

Mark

P.S. I'm close to enabling the DWARF2 unwinder for SPARC, but there
still are a few issues that I have to solve yet.  None of these affect
Linux/sparc64.  I can send you a patch to test if you want.


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