From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19399 invoked by alias); 26 Jan 2006 23:45:06 -0000 Received: (qmail 19370 invoked by uid 22791); 26 Jan 2006 23:45:03 -0000 X-Spam-Check-By: sourceware.org Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.31.1) with ESMTP; Thu, 26 Jan 2006 23:45:00 +0000 Received: from drow by nevyn.them.org with local (Exim 4.54) id 1F2GnQ-0005eX-38; Thu, 26 Jan 2006 18:44:56 -0500 Date: Thu, 26 Jan 2006 23:45:00 -0000 From: Daniel Jacobowitz To: Jim Blandy Cc: NZG , gdb-patches@sourceware.org, Mark Kettenis Subject: Re: remote connection crash, was frame theory Message-ID: <20060126234456.GA21704@nevyn.them.org> Mail-Followup-To: Jim Blandy , NZG , gdb-patches@sourceware.org, Mark Kettenis References: <200601231438.26040.ngustavson@emacinc.com> <200601262240.k0QMe7SC026344@elgar.sibelius.xs4all.nl> <20060126224429.GA20076@nevyn.them.org> <200601261726.11037.ngustavson@emacinc.com> <8f2776cb0601261542t6b5f002al343ed6c0d78f840c@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8f2776cb0601261542t6b5f002al343ed6c0d78f840c@mail.gmail.com> User-Agent: Mutt/1.5.8i X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2006-01/txt/msg00442.txt.bz2 On Thu, Jan 26, 2006 at 03:42:02PM -0800, Jim Blandy wrote: > On 1/26/06, NZG wrote: > > On Thursday 26 January 2006 4:44 pm, Daniel Jacobowitz wrote: > > > On Thu, Jan 26, 2006 at 11:40:07PM +0100, Mark Kettenis wrote: > > > > To me, it looks like you're connecting to a buggy stub. > > > > > > He's connecting to basically a standard gdbserver, poised at > > > the first instruction of the program. Memory has garbage > > > and/or is invalid - no MMU so reading from garbage memory > > > is a bit more serious than is typical for GDB. > > righto, it crashes the remote kernel and sends my host into an infinite loop > > in gdb. > > > > > The best thing here would be, if the stub can find out from > > > the kernel what constitutes "valid" RAM, to refuse reads to > > > it. Then ignore the ugliness when you type backtrace and > > > don't have a stack yet - it's not real surprising that doesn't > > > work! > > The PC is valid at this point, right? If there were clean Dwarf CFI > for the entry point, marking it as the oldest frame, would that calm > GDB down? That could be another approach. Yes, that should generally work. -- Daniel Jacobowitz CodeSourcery