From owner-freebsd-arm@freebsd.org Tue Feb 7 19:06:25 2017 Return-Path: Delivered-To: freebsd-arm@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1CA50CD4857 for ; Tue, 7 Feb 2017 19:06:25 +0000 (UTC) (envelope-from andrew@fubar.geek.nz) Received: from kif.fubar.geek.nz (kif.fubar.geek.nz [178.62.119.249]) by mx1.freebsd.org (Postfix) with ESMTP id DD85374D; Tue, 7 Feb 2017 19:06:24 +0000 (UTC) (envelope-from andrew@fubar.geek.nz) Received: from zapp (global-5-144.nat-2.net.cam.ac.uk [131.111.5.144]) by kif.fubar.geek.nz (Postfix) with ESMTPSA id 121C6D8561; Tue, 7 Feb 2017 19:00:51 +0000 (UTC) Date: Tue, 7 Feb 2017 19:06:22 +0000 From: Andrew Turner To: John Marino Cc: marino@freebsd.org, freebsd-arm@freebsd.org, Andreas Tobler Subject: Re: ARM64: PC/IP not saved in signal frame Message-ID: <20170207190622.1a7a3673@zapp> In-Reply-To: <86279411-3979-edab-7ba2-4a1e3fa6429e@marino.st> References: <530c18cd-d50d-4709-a0ca-22324a0cb592@marino.st> <86279411-3979-edab-7ba2-4a1e3fa6429e@marino.st> X-Mailer: Claws Mail 3.14.1 (GTK+ 2.24.29; amd64-portbld-freebsd12.0) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Feb 2017 19:06:25 -0000 On Tue, 7 Feb 2017 12:55:51 -0600 John Marino wrote: > On 2/7/2017 12:47, John Marino wrote: > > Hi guys, > > I've been struggling to provide unwind support on the > > aarch64-*-freebsd* target of FreeBSD. The only working example on > > this arch is aarch64-linux (attached). I think I'm 99% done with > > the freebsd version (attached) but the last value that needs to be > > pass to the _Unwind_FrameState is the program counter offset. > > > > I know the PC is not register-based on aarch64. Linux still saves > > the value in the signal context, but AFAICT FreeBSD does not. > > > > Can somebody > > A) confirm that the program counter is missing from the saved signal > > context > > B) confirm that it needs to be added for proper signal frame > > unwinding? > > > > Alternatively, maybe somebody can figure out a solution given the > > current freebsd structures, but I'm losing hope on that one. (line > > 99) > > Apparently attachments are stripped out on this mail list. > You can see the headers here: > https://leaf.dragonflybsd.org/~marino/linux-unwind.h > https://leaf.dragonflybsd.org/~marino/freebsd-unwind.h You want sc->REG_NAME(elr). Andrew