[Top] [All Lists]

Re: [PATCH] Make mips-linux signal frame unwinding more robust.

To: Joel Brobecker <>
Subject: Re: [PATCH] Make mips-linux signal frame unwinding more robust.
From: David Daney <>
Date: Thu, 25 Feb 2010 10:48:11 -0800
Cc:, "Pinski, Andrew" <>, Ralf Baechle <>, linux-mips <>
In-reply-to: <>
Original-recipient: rfc822;
References: <> <>
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv: Gecko/20100120 Fedora/3.0.1-1.fc12 Thunderbird/3.0.1
On 02/25/2010 09:47 AM, Joel Brobecker wrote:
This patch makes gdb follow suit and find the sigcontext_base using
the signal frame's SP rather than an offset from the trampoline.

Is there a document that explains that the sigcontext structure is
always going to be at the frame's SP?

No official document, however the principle of maintaining binary compatibility is important, and recognized by the kernel maintainers.

There are several things that constrain the the changes that can be made in the kernel:

1) The glibc setcontext API as discussed here:

2) libgcc's unwinder:

I don't know mips-linux, but something looked funny to me: You avoid
the use of SIGFRAME_CODE_OFFSET to compute the address where the sigcontext
structure is located, but you still use it to compute the frame base
address (used when building the frame ID).  Is the frame base address
still a constant offset from FUNC, or does the frame ID base address
also needs to be changed.

Right, I missed that part. When it started working, I stopped patching. I will take another look at that part.

I believe that Daniel J has a good knowledge of mips-linux, and would be
an ideal reviewer.  If he doesn't have time, though, I'm OK with approving
a patch for the HEAD branch.  For the 7.1 branch, though, I'd rather have
a more knowledgeable opinion.

David Daney

<Prev in Thread] Current Thread [Next in Thread>