From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19709 invoked by alias); 4 Dec 2009 09:09:28 -0000 Received: (qmail 19698 invoked by uid 22791); 4 Dec 2009 09:09:27 -0000 X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from dns.vtab.com (HELO oden.vtab.com) (62.20.90.195) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 04 Dec 2009 09:09:18 +0000 Received: from oden.vtab.com (oden.vtab.com [127.0.0.1]) by oden.vtab.com (Postfix) with ESMTP id D370226EF8C for ; Fri, 4 Dec 2009 10:09:13 +0100 (CET) Received: from polhem (unknown [62.20.90.206]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by oden.vtab.com (Postfix) with ESMTP id ABD4826EF3E for ; Fri, 4 Dec 2009 10:09:13 +0100 (CET) From: "Jakob Engblom" To: References: <4AEDF9F4.9040207@vmware.com> <834opec530.fsf@gnu.org> <4AEE27E9.1070005@vmware.com> <4AF9E44B.90003@vmware.com> <83tyx1og0c.fsf@gnu.org> <4AFB0307.7000302@vmware.com> <83ocn8oqf2.fsf@gnu.org> <4B06D040.3080402@vmware.com> In-Reply-To: Subject: RE: [RFA] replay bookmarks Date: Fri, 04 Dec 2009 09:09:00 -0000 Message-ID: <004801ca74c1$73188f60$5949ae20$@com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes 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: 2009-12/txt/msg00046.txt.bz2 I have now tried this functionality myself, which required some patches to = make sure that, for example, memory was allocated for the strings used as argume= nts. Here is a sample session. On the remote end, we have a Simics ppc-simple ma= chine that just contains a PowerPC 603e processor, NS16550 serial port, memory, a= nd a home-made DMA controller that we are controlling. It runs no OS, just a bare-board software that accesses hardware directly.=20 I managed to set bookmarks both in Simics and gdb, and goto-bookmark arbitrarily. Reverse and forward step commands worked (as expected). To s= how how it looked on the Simics side, here is a typical output from "list-bookmarks", after reversing from the leading bookmark: simics> list-bookmarks=20 name cycles ------------------------------------------------------ start 0 gdb_bookmark1 32 86040 gdb_bookmark2 86043 ------------------------------------------------------ Notes on possible improvements: * The "bookmark" command accepts a string as an argument but does nothing w= ith it. (gdb) bookmark "first_uart_access" Saved bookmark 1 at 0x10000 It would be nice with a complaint, or that hte given string was sent to the backend. The Simics side here only sees a bookmark with ID=3D1 being create= d, and uses the internal name "gdb_bookmark1" for it.=20=20 * A "list-bookmarks" command would also be helpful to know what bookmarks t= here are. Also, tab-completion for the goto-bookmark command could list the avai= lable bookmark numbers or names (asking it to query the remote backend for all its named bookmarks might be a bit too much). * We definitely need the ability for the remote target to tell gdb to updat= e its internal state. Now I quickly got into situations where gdb and Simics were= out of sync, and getting them in sync essentially involved restarting gdb. Sett= ing a time breakpoint or device access breakpoint or other funky breakpoint Simics right now requires you to do ctrl-C in gdb to get back to prompt, and somet= imes the state is not quite right then.=20 * goto-bookmark did not always reset the state of gdb, with the execution e= ngine in Simics thinking that the program was at one point, but gdb still left wi= th a different idea for where things were.=20=20 * when single-stepping using "si" on an instruction with a gdb execution breakpoint set on it, gdb just gets stuck repeatedly stepping the same instruction. Simics did not progress either, so I am still investigating w= here the real problem is.=20 Best regards, /jakob _______________________________________________________ Jakob Engblom, PhD, Technical Marketing Manager Virtutech=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 Direct: +46= 8 690 07 47=A0=A0=A0 Drottningholmsv=E4gen 22=A0=A0=A0=A0=A0 Mobile: +46 709 242 646=A0=A0 11243 Stockholm=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 Web:=A0=A0=A0 www.virtu= tech.com=A0 Sweden ________________________________________________________ =A0=20