From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25154 invoked by alias); 26 Jul 2007 16:29:05 -0000 Received: (qmail 25140 invoked by uid 22791); 26 Jul 2007 16:29:04 -0000 X-Spam-Check-By: sourceware.org Received: from venus.billgatliff.com (HELO venus.billgatliff.com) (209.251.101.201) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 26 Jul 2007 16:28:59 +0000 Received: from [192.168.2.10] (adsl-75-23-81-9.dsl.peoril.sbcglobal.net [75.23.81.9]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by venus.billgatliff.com (Postfix) with ESMTP id E6339A418B; Thu, 26 Jul 2007 11:28:55 -0500 (CDT) Message-ID: <46A8CBC0.8010909@billgatliff.com> Date: Thu, 26 Jul 2007 20:01:00 -0000 From: Bill Gatliff User-Agent: Icedove 1.5.0.10 (X11/20070329) MIME-Version: 1.0 To: Bill Gatliff , gdb@sourceware.org, linuxppc-embedded@ozlabs.org Subject: Re: Gdbserver syscall clobber References: <469B922D.3050701@billgatliff.com> <20070716155348.GA5281@caradoc.them.org> <469E550E.5080905@billgatliff.com> <20070718183143.GA25324@caradoc.them.org> <46A4D1F5.1060005@billgatliff.com> <20070723161512.GA3235@caradoc.them.org> In-Reply-To: <20070723161512.GA3235@caradoc.them.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2007-07/txt/msg00184.txt.bz2 Daniel Jacobowitz wrote: > Look around do_signal: > > regs->nip -= 4; /* Back up & retry system call */ > > If your kernel has corrupted the register containing the syscall > number at this point, that would explain your problem. It will then > do the wrong syscall. I guess PPC only backs up one instruction. > > Found the code in do_signal, right where you said it would be. I threw in a printk or two to see what's up when an ERESTARTSYS is detected, and started getting OOPSes all over the place. Apparently that's not a good place for printk. :) Before I go on, can anyone confirm that gdbserver and/or strace _ever_ worked with circa 2.4.16 PPC kernels? b.g. -- Bill Gatliff bgat@billgatliff.com