From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19667 invoked by alias); 7 Aug 2009 16:22:59 -0000 Received: (qmail 19658 invoked by uid 22791); 7 Aug 2009 16:22:59 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from NaN.false.org (HELO nan.false.org) (208.75.86.248) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 07 Aug 2009 16:22:52 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id BA34B109FD for ; Fri, 7 Aug 2009 16:22:50 +0000 (GMT) Received: from caradoc.them.org (209.195.188.212.nauticom.net [209.195.188.212]) by nan.false.org (Postfix) with ESMTP id 7F88010709 for ; Fri, 7 Aug 2009 16:22:50 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.69) (envelope-from ) id 1MZSDR-0005gO-Aj for gdb-patches@sourceware.org; Fri, 07 Aug 2009 12:22:49 -0400 Date: Fri, 07 Aug 2009 17:22:00 -0000 From: Daniel Jacobowitz To: gdb-patches@sourceware.org Subject: Re: syscall backtraces on arm-linux-gnu Message-ID: <20090807162249.GA18641@caradoc.them.org> Mail-Followup-To: gdb-patches@sourceware.org References: <20090805160852.GA25684@radix50.net> <20090807154949.GC28041@radix50.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20090807154949.GC28041@radix50.net> User-Agent: Mutt/1.5.20 (2009-06-14) X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2009-08/txt/msg00112.txt.bz2 On Fri, Aug 07, 2009 at 05:49:49PM +0200, Baurzhan Ismagulov wrote: > It turned out that select is implemented in assembly in glibc, so no CFI > is provided and gdb falls back to prologue analysis. The following hack > fixes the use case for me: The right answer is to somehow get CFI for this. My preferred solution is to teach gas how to generate DWARF-2 CFI from the ARM EH directives (the functions in glibc are already annotated). Worst case, someone can write the necessary DWARF by hand using .byte directives. > @@ -988,8 +990,6 @@ arm_scan_prologue (struct frame_info *th > regs[fp_start_reg++]); > } > } > - else if ((insn & 0xf0000000) != 0xe0000000) > - break; /* Condition not true, exit early */ > else if ((insn & 0xfe200000) == 0xe8200000) /* ldm? */ > break; /* Don't scan past a block load */ > else Skipping a jump during scanning is definitely not safe. That means GDB's got no idea whether following instructions - pushes and stack adjusts included - were executed. You won't see much in the way of testsuite changes with this, because the testsuite runs (A) with DWARF CFI from the compiler, and (B) mostly without optimization. -- Daniel Jacobowitz CodeSourcery