[RFA] replay bookmarks

Jakob Engblom jakob@virtutech.com
Fri Dec 4 09:09:00 GMT 2009


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
________________________________________________________
  





More information about the Gdb-patches mailing list