This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
RE: [RFA] replay bookmarks
- From: "Jakob Engblom" <jakob at virtutech dot com>
- To: <gdb-patches at sourceware dot org>
- Date: Fri, 4 Dec 2009 10:09:13 +0100
- Subject: RE: [RFA] replay bookmarks
- References: <4AEDF9F4.9040207@vmware.com> <834opec530.fsf@gnu.org> <4AEE27E9.1070005@vmware.com> <m3skcninwe.fsf@fleche.redhat.com> <4AF9E44B.90003@vmware.com> <83tyx1og0c.fsf@gnu.org> <4AFB0307.7000302@vmware.com> <83ocn8oqf2.fsf@gnu.org> <4B06D040.3080402@vmware.com> <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
________________________________________________________
?