This is the mail archive of the mailing list for the GDB project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: gdb reverse execution: how to actually run tests for it?

Hello Jakob -- welcome back!

Pedro's reply below includes answers to most of your questions.
This is some background.

It is normal for those of us doing development on new or
unusual platforms to need to define a "board description file",
to let Dejagnu know how to do certain things with our target.
See "site.exp" in Pedro's email.

For the reverse debugging tests, I used this guard variable
to make sure the tests would only run on targets that were
explicitly tagged as being reverse-capable:

    if ![target_info exists gdb,can_reverse] {

So you will want to have this in your board description file:

set_board_info gdb,can_reverse 1

Secondly, there are a few commands that are specific to
"process record", so I guarded them with this variable:

if [target_info exists gdb,use_precord] { # Activate process record/replay gdb_test "record" "" "Turn on process record" }

You won't want to use those commands, so you will
not define that variable in your board description.

If there are any commands that are unique to your
implementation, you can define your own guard variable
and add them to the tests.


Pedro Alves wrote:
On Monday 17 August 2009 12:32:50, Jakob Engblom wrote:
make check RUNTESTFLAGS="break-reverse.exp --target_board=precord" &&
I had to do

make check RUNTESTFLAGS="gdb.reverse/break-reverse.exp --target_board=precord"

To make this work, after creating the precord.exp file in /usr/share/dejagnu/baseboards/

You don't really need to clobber that directory.


# Create an empty file named site.exp.
# Create a directory named boards in the same location as site.exp.
# Create a file named native-gdbserver.exp in the boards directory (see below).
# Set the DEJAGNU environment variable to point to the empty site.exp.
# Run the testsuite with make check-gdb RUNTESTFLAGS="--target_board native-gdbserver".

Adjust as needed, of course.

Although, needing to set "gdb,use_precord" seems weird
though.  Can't we make it so that if we're testing a native
gdb, and, if the target matches a list of targets that support
precord, then, well, claim support for reverse, and test with precord?
That is, get rid of the  need for a board file at all unless testing
against a remote target that supports reverse.

In any case, for the cases a board file is needed for testing
reverse, it would be nice to have that explained in the
wiki (or somewhere else).

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]