From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/12042 Path: news.gmane.org!.POSTED!not-for-mail From: Szabolcs Nagy Newsgroups: gmane.linux.lib.musl.general Subject: Re: How to handle attempts to combine ARM Thumb with frame pointers? Date: Fri, 27 Oct 2017 13:47:09 +0200 Message-ID: <20171027114709.GV15263@port70.net> References: <20171008032153.GH1627@brightrain.aerifal.cx> <20171025211623.GU15263@port70.net> <20171026170054.GA1627@brightrain.aerifal.cx> 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 1509104854 15339 195.159.176.226 (27 Oct 2017 11:47:34 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 27 Oct 2017 11:47:34 +0000 (UTC) User-Agent: Mutt/1.6.0 (2016-04-01) To: musl@lists.openwall.com Original-X-From: musl-return-12055-gllmg-musl=m.gmane.org@lists.openwall.com Fri Oct 27 13:47:30 2017 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 1e836c-0002Q2-QX for gllmg-musl@m.gmane.org; Fri, 27 Oct 2017 13:47:18 +0200 Original-Received: (qmail 17738 invoked by uid 550); 27 Oct 2017 11:47:22 -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 17719 invoked from network); 27 Oct 2017 11:47:21 -0000 Mail-Followup-To: musl@lists.openwall.com Content-Disposition: inline In-Reply-To: Xref: news.gmane.org gmane.linux.lib.musl.general:12042 Archived-At: * Adhemerval Zanella [2017-10-26 16:46:04 -0200]: > On 26/10/2017 15:00, Rich Felker wrote: > > If you're compiling with frame pointers because you want them to be > > present (and always valid) for debugging purposes or similar, there's > > no way to achieve that while making syscalls -- and the most likely > > place for a process to get stopped debugging is usually at a syscall. > > Maybe this doesn't matter. It's not something we can change, just an > > observation about a problem with the ABI, I think. > > I think this might be a problem for musl where it does not provide > unwind information through CFI. For debugging with GLIBC, afaik GDB > will these information along libgcc unwind symbols to get correct call > frame and libc-do-syscall.S does seems to have correct CFI annotations. > if you configure musl with --enable-debug (i.e. -g cflag) then you get cfi annotations, but not for asm code (except on some targets we do generate cfi for asm, but not yet on arm) there are no runtime unwind tables though, so libgcc would not work, however that does not work at interrupts in glibc either because arm unwind tables are not asynchronous. i think some tools prefer to use frame pointers for unwinding (e.g. perf call graph profiler uses fp by default, not sure how that works on arm thumb)