This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Fix signal trampoline detection/unwinding on recent FreeBSD/i386 and FreeBSD/amd64
- From: Pedro Alves <palves at redhat dot com>
- To: John Baldwin <jhb at freebsd dot org>
- Cc: gdb-patches at sourceware dot org, Mark Kettenis <mark dot kettenis at xs4all dot nl>
- Date: Mon, 16 Feb 2015 22:55:54 +0000
- Subject: Re: [PATCH] Fix signal trampoline detection/unwinding on recent FreeBSD/i386 and FreeBSD/amd64
- Authentication-results: sourceware.org; auth=none
- References: <11386216 dot Yv1qECs4Mc at ralph dot baldwin dot cx> <1764587 dot lQfaPVNLAm at ralph dot baldwin dot cx> <54DB85F1 dot 3070901 at redhat dot com> <5792555 dot u7sbdTrmvU at ralph dot baldwin dot cx>
On 02/16/2015 04:37 PM, John Baldwin wrote:
> On Wednesday, February 11, 2015 04:40:17 PM Pedro Alves wrote:
>> On 02/11/2015 03:32 PM, John Baldwin wrote:
>>> Actually, this does sound far simpler. I was simply updating the sigtramp
>>> code that was already present. I can certainly work on changing both i386
>>> and amd64 to do this instead if that is the preferred method (and it seems
>>> to be from looking at other targets).
>>
>> Yep, that's the preferred method. That'd be great.
>
> I've implemented this and attached the updated patch below. I'm not quite
> sure if the updated Changelog is correct however. I ran into one hiccup
> though which is that the signal trampoline code is not included in process
> core dumps in recent FreeBSD versions (after it was moved off of the stack and
> into a global shared page). I've fixed this in FreeBSD so that future
> versions will include the trampoline in core dumps, but I've retained the
> change to use KERN_PROC_SIGTRAMP to support core dumps from the versions that
> do not include it in the core. I've removed the support for specifying a
> signal trampoline location for older verions using either hardcoded offsets or
> ps_strings as it is no longer needed.
Looks great to me! Mark, any comments?
(I see a couple minor formatting issues, but I can fix them up
for you before pushing.)
Thanks,
Pedro Alves