Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: "Jakob Engblom" <jakob@virtutech.com>
To: <gdb-patches@sourceware.org>
Subject: RE: [RFA] replay bookmarks
Date: Fri, 04 Dec 2009 09:09:00 -0000	[thread overview]
Message-ID: <004801ca74c1$73188f60$5949ae20$@com> (raw)
In-Reply-To: <daef60380911221919p5f88bc4bm775f32a22fb8aed9@mail.gmail.com>

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 arguments.


Here is a sample session. On the remote end, we have a Simics ppc-simple machine
that just contains a PowerPC 603e processor, NS16550 serial port, memory, and a
home-made DMA controller that we are controlling.  It runs no OS, just a
bare-board software that accesses hardware directly. 

I managed to set bookmarks both in Simics and gdb, and goto-bookmark
arbitrarily.  Reverse and forward step commands worked (as expected).  To show
how it looked on the Simics side, here is a typical output from
"list-bookmarks", after reversing from the leading bookmark:

simics> list-bookmarks 
 name                                     cycles
------------------------------------------------------
 start                                        0
 gdb_bookmark1                               32
 <current execution point>                86040
 gdb_bookmark2                            86043
------------------------------------------------------

Notes on possible improvements:

* The "bookmark" command accepts a string as an argument but does nothing with
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=1 being created, and
uses the internal name "gdb_bookmark1" for it.  


* A "list-bookmarks" command would also be helpful to know what bookmarks there
are. Also, tab-completion for the goto-bookmark command could list the available
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 update 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. Setting 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 sometimes
the state is not quite right then. 


* goto-bookmark did not always reset the state of gdb, with the execution engine
in Simics thinking that the program was at one point, but gdb still left with a
different idea for where things were.  


* 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 where
the real problem is. 



Best regards,

/jakob

_______________________________________________________

Jakob Engblom, PhD, Technical Marketing Manager

Virtutech                   Direct: +46 8 690 07 47   
Drottningholmsvägen 22      Mobile: +46 709 242 646  
11243 Stockholm             Web:    www.virtutech.com 
Sweden
________________________________________________________
  




      reply	other threads:[~2009-12-04  9:09 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-01 21:13 Michael Snyder
2009-11-01 21:23 ` Eli Zaretskii
2009-11-02  0:29   ` Michael Snyder
2009-11-02  4:01     ` Eli Zaretskii
2009-11-03  8:34       ` Jakob Engblom
2009-11-03  8:36         ` Hui Zhu
2009-11-03 18:42         ` Michael Snyder
2009-11-05 11:05           ` Jakob Engblom
2009-11-03  8:35     ` Hui Zhu
2009-11-05 18:13       ` Michael Snyder
2009-11-05 18:44         ` Pedro Alves
2009-11-05 19:17         ` Eli Zaretskii
2009-11-05 23:40           ` Michael Snyder
2009-11-06  8:34             ` Eli Zaretskii
2009-11-09 17:55     ` Tom Tromey
2009-11-10 22:09       ` Michael Snyder
2009-11-10 22:27         ` Tom Tromey
2009-11-11  4:15         ` Eli Zaretskii
2009-11-11 18:33           ` Michael Snyder
2009-11-11 18:44             ` Eli Zaretskii
2009-11-20 17:26               ` Michael Snyder
2009-11-23  3:20                 ` Hui Zhu
2009-12-04  9:09                   ` Jakob Engblom [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='004801ca74c1$73188f60$5949ae20$@com' \
    --to=jakob@virtutech.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox