From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4319 invoked by alias); 22 Sep 2006 17:55:02 -0000 Received: (qmail 4307 invoked by uid 22791); 22 Sep 2006 17:55:02 -0000 X-Spam-Check-By: sourceware.org Received: from mx2.palmsource.com (HELO mx2.palmsource.com) (12.7.175.14) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 22 Sep 2006 17:54:57 +0000 Received: from localhost (localhost [127.0.0.1]) by localhost.domain.tld (Postfix) with ESMTP id A83D926D05; Fri, 22 Sep 2006 10:54:55 -0700 (PDT) Received: from mx2.palmsource.com ([127.0.0.1]) by localhost (mx2.palmsource.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 12299-01-24; Fri, 22 Sep 2006 10:54:54 -0700 (PDT) Received: from ussunex01.palmsource.com (unknown [192.168.101.9]) by mx2.palmsource.com (Postfix) with ESMTP id 9BC2026D03; Fri, 22 Sep 2006 10:54:54 -0700 (PDT) Received: from 192.168.92.59 ([192.168.92.59]) by ussunex01.palmsource.com ([192.168.101.9]) via Exchange Front-End Server owa.palmsource.com ([10.0.20.17]) with Microsoft Exchange Server HTTP-DAV ; Fri, 22 Sep 2006 17:54:54 +0000 Received: from svmsnyderlnx by owa.palmsource.com; 22 Sep 2006 10:54:53 -0700 Subject: Re: Testing flash (Was: [rfa] NEWS additions for flash) From: Michael Snyder To: Vladimir Prus Cc: gdb-patches@sources.redhat.com In-Reply-To: References: <20060921141803.GD22556@nevyn.them.org> <1158865857.22863.1.camel@localhost.localdomain> <20060921191424.GA1283@nevyn.them.org> Content-Type: text/plain Content-Transfer-Encoding: 7bit Date: Fri, 22 Sep 2006 17:55:00 -0000 Message-Id: <1158947693.22863.61.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.4.1 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-09/txt/msg00142.txt.bz2 On Fri, 2006-09-22 at 10:23 +0400, Vladimir Prus wrote: > Daniel Jacobowitz wrote: > > > On Thu, Sep 21, 2006 at 12:10:56PM -0700, Michael Snyder wrote: > >> On Thu, 2006-09-21 at 10:18 -0400, Daniel Jacobowitz wrote: > >> > This patch adds news entries for the flash patches I've just checked > >> > in. Is this OK? > >> > > >> > The next release is shaping up to be quite an improvement. > >> > >> On a quick scan of your (today's) patch, I don't see any tests. > >> Is this testable? > > > > In theory, you could write some tests for it using 'gdbreplay'. But > > getting gdbreplay to work in the testsuite harness would be quite > > tricky, and it would be complicated by the fact that which registers > > GDB asks for at connection is target dependent; I don't know how to > > write generic remote protocol tests. > > > > I'd love to unit test this stuff. If you have any suggestions, I'm > > all ears. > > Assuming not everybody has boards with flash handy, and burning flash every > night is bad idea, we need some 'fake' setup anyway. For example, we can > take any remote test and then: > > - Fabricate memory map that has flash regions. Such memory map can > be fixed, having no relation to actual remote target. > - Log all flash packets without passing them to remote side. > > I think we can either have special 'flash debug mode' in gdb, which reads > memory map from a file you specify and writes flash packages to another > file you specify, or man-in-the-middle between gdb and real remote that > does the same. I'd suspect adding flash debug mode in gdb would be simpler. > > Ah, and I supposed that if we want to match generated flash packets to > expectation, we need to 'load' a fixed *binary* -- not binary produced from > sources, but a binary added to CVS. I'm very interested in general in this kind of "fake" debugging, essentially for testing purposes. E.g. that we could make up a hacked version of gdbserver that would give back some packet responses that immitated services that it was not actually able to provide.