[gvd-users] Saving and restoring displayed variables

David Brown gvd-users@lists.act-europe.fr
Tue, 24 Sep 2002 14:58:06 +0200


That doesn't work - the debugger name was being properly saved in the
session file already.  I did manage to get the session restored by renaming
my cross-debugger to gdb.exe.  However, there were a number of problems:

1) Restoring the session opens a new debugger session, which doesn't work
for embedded debuggers.  Even if I haven't done anything with the original
debugger, the file list for the new debugger is missing all the files,
making finding the source files awkward.

2) The session stores all commands, not just the breakpoint/watch setup.
This means that it will attempt to do every "continue" or "next" command
ever entered.  I don't want a repeat of all such commands, nor can I imagine
that that is what most other people will want.  Replaying an exact copy of
all debugging commands is generally going to be impossible.  For testing, I
edited these out from the session file (it is extremly helpful that the
session file is a plain text file).

3) All the displayed variables get placed one after the other horizontally
in the data window (which I have as a seperate window).  I have always
thought this placement strategy was odd - for simple variables, there might
be space for 4 horizontally in the window, whereas vertically there would be
space for 20 - but when adding watches manually, I simply move them away
from the top of the window as soon as they are created.  However, the
session file doesn't store their positions, so they are created in a huge
line - it takes almost as much effort messing around with the horizontal
scroll bar and moving the watches as it does to simply re-type them all
manually.


So it seems that sessions don't work well for me.  I guess they work well
for others (perhaps my comments will give you hints for improvements for
everyone).  I'll go back to manually specifying watch variables - it works
well enough, and is certainly a lot easier than command-line gdb...


David





> If you specify the name of the cross debugger in the File->New Debugger
> dialog, the session will save it.
>
> You can also edit the session file directly (this is a text file), and
> modify the last line before the history, which is the name of the debugger
> program, e.g:
>
> ---------------------
>
> GDB_TYPE
>
>
>
> cross-gdb
> ---------------------
> [History]
>  1 U run
>  1 U graph display foo
> ---------------------
>
> Arno
>
> _______________________________________________
> gvd-users mailing list
> gvd-users@lists.act-europe.fr
> http://lists.act-europe.fr/mailman/listinfo/gvd-users
>
>