From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16134 invoked by alias); 12 Oct 2010 16:56:37 -0000 Received: (qmail 16123 invoked by uid 22791); 12 Oct 2010 16:56:35 -0000 X-SWARE-Spam-Status: No, hits=-1.3 required=5.0 tests=AWL,BAYES_00,MSGID_FROM_MTA_HEADER,SPF_SOFTFAIL,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mtagate2.de.ibm.com (HELO mtagate2.de.ibm.com) (195.212.17.162) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 12 Oct 2010 16:56:28 +0000 Received: from d12nrmr1607.megacenter.de.ibm.com (d12nrmr1607.megacenter.de.ibm.com [9.149.167.49]) by mtagate2.de.ibm.com (8.13.1/8.13.1) with ESMTP id o9CGuOu9021765 for ; Tue, 12 Oct 2010 16:56:24 GMT Received: from d12av02.megacenter.de.ibm.com (d12av02.megacenter.de.ibm.com [9.149.165.228]) by d12nrmr1607.megacenter.de.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id o9CGuO4q3895336 for ; Tue, 12 Oct 2010 18:56:24 +0200 Received: from d12av02.megacenter.de.ibm.com (loopback [127.0.0.1]) by d12av02.megacenter.de.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id o9CGuNK7025046 for ; Tue, 12 Oct 2010 18:56:24 +0200 Received: from tuxmaker.boeblingen.de.ibm.com (tuxmaker.boeblingen.de.ibm.com [9.152.85.9]) by d12av02.megacenter.de.ibm.com (8.12.11.20060308/8.12.11) with SMTP id o9CGuMDo025020; Tue, 12 Oct 2010 18:56:22 +0200 Message-Id: <201010121656.o9CGuMDo025020@d12av02.megacenter.de.ibm.com> Received: by tuxmaker.boeblingen.de.ibm.com (sSMTP sendmail emulation); Tue, 12 Oct 2010 18:56:22 +0200 Subject: Re: [rfa] ARM prologue parsing support for Thumb-2 instructions To: dan@codesourcery.com (Daniel Jacobowitz) Date: Tue, 12 Oct 2010 16:56:00 -0000 From: "Ulrich Weigand" Cc: matthew.gretton-dann@arm.com, rearnsha@arm.com, gdb-patches@sourceware.org In-Reply-To: <20101008132747.GO23776@caradoc.them.org> from "Daniel Jacobowitz" at Oct 08, 2010 09:27:48 AM MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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/msg00194.txt.bz2 Daniel Jacobowitz wrote: > On Fri, Oct 08, 2010 at 02:54:59PM +0200, Ulrich Weigand wrote: > > All these are caused by failures to parse the prologues of hand-written > > *ARM* assembler routines in glibc (system call handlers like nanosleep). > > These simply deviate too far from the usual rules (e.g. by intermixing > > stack saving/restoring of registers with conditional branches, or by > > temporarily saving registers into other registers instead of the stack) > > for the ARM prologue parser to be able to handle them. > > > > It seems to me that there is not much sense in attempting to support > > even this type of code. I guess we should strongly recommend to have > > (at least) glibc debuginfo files installed if you want to debug. > > I agree with your conclusion. It's just not worthwhile; either > install debuginfo files, or leave .debug_frame in the stripped > libraries. Hmm, I noticed one set of problems is due to the __libc_do_syscall function you added in this patch: http://sourceware.org/ml/gdb-patches/2010-10/msg00137.html .thumb .syntax unified .hidden __libc_do_syscall ENTRY (__libc_do_syscall) .fnstart push {r7, lr} .save {r7, lr} cfi_adjust_cfa_offset (8) cfi_rel_offset (r7, 0) cfi_rel_offset (lr, 4) mov r7, ip swi 0x0 pop {r7, pc} .fnend END (__libc_do_syscall) The GDB prologue parser would actually be easily capable of understanding this function prologue. However, it doesn't work because GDB does not even find the start of the function in the first place, since the symbol is present only in the regular symbol table (which is stripped), and not in the dynamic symbol table, because of the ".hidden" directive. Is there any particular reason why this function could not be at least .protected instead? [ Note that this shows up even with glibc debuginfo installed when running the break-interp.exp test case, because that test uses a copy of libc.so so that GDB doesn't find the install debuginfo any more ... ] Bye, Ulrich -- Dr. Ulrich Weigand GNU Toolchain for Linux on System z and Cell BE Ulrich.Weigand@de.ibm.com