From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14816 invoked by alias); 21 Oct 2010 18:42:40 -0000 Received: (qmail 14807 invoked by uid 22791); 21 Oct 2010 18:42:39 -0000 X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (38.113.113.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 21 Oct 2010 18:42:35 +0000 Received: (qmail 25163 invoked from network); 21 Oct 2010 18:42:33 -0000 Received: from unknown (HELO caradoc.them.org) (dan@127.0.0.2) by mail.codesourcery.com with ESMTPA; 21 Oct 2010 18:42:33 -0000 Date: Thu, 21 Oct 2010 18:42:00 -0000 From: Daniel Jacobowitz To: Ulrich Weigand Cc: gdb-patches@sourceware.org, rearnsha@arm.com, matthew.gretton-dann@arm.com Subject: Re: [rfc/rfa] Use ARM exception tables as GDB unwinder Message-ID: <20101021184229.GR8337@caradoc.them.org> References: <20101021160155.GP8337@caradoc.them.org> <201010211826.o9LIQ9P5012162@d12av02.megacenter.de.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201010211826.o9LIQ9P5012162@d12av02.megacenter.de.ibm.com> User-Agent: Mutt/1.5.20 (2009-06-14) 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: 2010-10/txt/msg00339.txt.bz2 On Thu, Oct 21, 2010 at 08:26:09PM +0200, Ulrich Weigand wrote: > One issue with this just occurred to me: comparing personality routines > by *name* relies on symbol information being present. Since we're doing > the whole ARM unwinder support primarily to better cope with the case > where symbol information is absent, this may be counter-productive ... > > Is there some other way to recognize those particular unwinders? Yes, it's true that this requires names. Fortunately, in the usual case they are in the dynamic symbol table. So, I think you'll have the names - or do we not see dynamic symbols here? > Another, related topic: Running the GDB testsuite on a system without > debug/symbol info, I'm still seeing failures in unwinding from interrupted > system calls. This is because the assembler code to do the syscall > clobbers r7 without generating appropriate unwind records, and thus > unwinding fails somewhere higher up the stack. > > Now, this is exactly the problem you fixed by moving the actual syscall > into a separate routine __libc_do_syscall. However, this routine is > only called from C code built for -mthumb. C code built for -marm, > as well as code originally in (ARM) assembler, will continue to use > inline sequences clobbering r7. This should work... the problem with r7 was that it's the hard frame pointer for Thumb (even Thumb-2 - although it shouldn't be, most likely, it's a wasteful choice). So we couldn't mark it as clobbered. Does GCC not mark r7 as saved on the stack for the ARM code? It should know perfectly well that r7 is not unchanged. -- Daniel Jacobowitz CodeSourcery