From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/10733 Path: news.gmane.org!.POSTED!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: [PATCH v2] fix x86_64 sigreturn trampoline so gdb recognizes it Date: Sat, 12 Nov 2016 21:46:14 -0500 Message-ID: <20161113024614.GQ1555@brightrain.aerifal.cx> References: <20161112170712.GP5749@port70.net> <20161113001205.GR5749@port70.net> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: blaine.gmane.org 1479005203 3042 195.159.176.226 (13 Nov 2016 02:46:43 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 13 Nov 2016 02:46:43 +0000 (UTC) User-Agent: Mutt/1.5.21 (2010-09-15) To: musl@lists.openwall.com Original-X-From: musl-return-10746-gllmg-musl=m.gmane.org@lists.openwall.com Sun Nov 13 03:46:39 2016 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by blaine.gmane.org with smtp (Exim 4.84_2) (envelope-from ) id 1c5koN-0007ER-JT for gllmg-musl@m.gmane.org; Sun, 13 Nov 2016 03:46:27 +0100 Original-Received: (qmail 21729 invoked by uid 550); 13 Nov 2016 02:46:29 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 21711 invoked from network); 13 Nov 2016 02:46:28 -0000 Content-Disposition: inline In-Reply-To: <20161113001205.GR5749@port70.net> Original-Sender: Rich Felker Xref: news.gmane.org gmane.linux.lib.musl.general:10733 Archived-At: On Sun, Nov 13, 2016 at 01:12:05AM +0100, Szabolcs Nagy wrote: > gdb can only unwind across signal handlers if it recognizes the trampoline. > on x86_64 this means the pc must be in a function called __restore_rt or > if gdb cannot determine the symbol name the instruction sequence must match > to what gdb expects. > > a nop is added before __restore_rt, the __restore alias is removed and > size annotation is added to make sure gdb maps any pc value within > __restore_rt unambigously to the __restore_rt symbol name. > > and the instruction sequence got fixed to match what gdb expects. Thanks! Committed a patch based on this as discussed on irc. Rich