From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20127 invoked by alias); 22 Sep 2008 12:50:54 -0000 Received: (qmail 20117 invoked by uid 22791); 22 Sep 2008 12:50:54 -0000 X-Spam-Check-By: sourceware.org Received: from NaN.false.org (HELO nan.false.org) (208.75.86.248) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 22 Sep 2008 12:50:15 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id CAEE910C30; Mon, 22 Sep 2008 12:50:12 +0000 (GMT) Received: from caradoc.them.org (22.svnf5.xdsl.nauticom.net [209.195.183.55]) by nan.false.org (Postfix) with ESMTP id A6D9C10194; Mon, 22 Sep 2008 12:50:12 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.69) (envelope-from ) id 1Khkrj-0006pV-Kd; Mon, 22 Sep 2008 08:50:11 -0400 Date: Mon, 22 Sep 2008 12:50:00 -0000 From: Daniel Jacobowitz To: Andrew Stubbs Cc: Mark Kettenis , gdb@sourceware.org Subject: Re: [commited] Detect bad debug info Message-ID: <20080922125011.GA25948@caradoc.them.org> Mail-Followup-To: Andrew Stubbs , Mark Kettenis , gdb@sourceware.org References: <48D3EC6C.8050809@codesourcery.com> <200809192224.m8JMOHEh032757@brahms.sibelius.xs4all.nl> <48D76849.90806@codesourcery.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <48D76849.90806@codesourcery.com> User-Agent: Mutt/1.5.17 (2008-05-11) 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: 2008-09/txt/msg00118.txt.bz2 On Mon, Sep 22, 2008 at 10:41:29AM +0100, Andrew Stubbs wrote: > Mark Kettenis wrote: >> Would it be possible to add some detail about this? "a particular >> falvour of bad debug info" is pretty non-informative. > > Sorry, you've caught me out. :) > > I don't really know in what way the debug info was bad. I only have a bad > binary (no source code, no compiler). I suspect that it had marked an a > array as being in registers, rather than a pointer to the array, but it > doesn't really matter. What I do know is that the effect was that the > debugger was attempting to read an impossibly large quantity of data from > the register file. The result was a assertion failure and a bad user > experience. You are correct. Something was confused by the automatic decay of arrays to pointers, and there was a DW_OP_reg0 instead of DW_OP_breg0 because of that. > The patch ensures that the debugger never attempts to read beyond the end > of the register file. Could you explain this in the code? I think it's more enlightening than "bad debug info". -- Daniel Jacobowitz CodeSourcery