diff options
author | Luis Machado <lgustavo@codesourcery.com> | 2017-01-26 10:34:42 -0600 |
---|---|---|
committer | Luis Machado <lgustavo@codesourcery.com> | 2017-01-26 10:34:42 -0600 |
commit | 8b00c176168dc7b0d78d0dc1f7d42f915375dc4a (patch) | |
tree | 11aa1b6e0ecdd276a75281f5a347df570ed9c5d9 /gdb/dicos-tdep.c | |
parent | 874a1c8c32036f790fa527acfab3f6f18740f089 (diff) | |
download | gdb-8b00c176168dc7b0d78d0dc1f7d42f915375dc4a.zip gdb-8b00c176168dc7b0d78d0dc1f7d42f915375dc4a.tar.gz gdb-8b00c176168dc7b0d78d0dc1f7d42f915375dc4a.tar.bz2 |
Refactor gdb.reverse/insn-reverse.c
Changes in v2:
- Renamed arch-specific files to insn-reverse-<arch>.c.
- Adjusted according to reviews.
This patch prepares things for an upcoming testcase for record/replay support
on x86. As is, gdb.reverse/insn-reverse.c is divided into sections guarded by
a few #if blocks, and right now it only handles arm/aarch64.
If we move forward with requiring more tests for record/replay on different
architectures, i think this has the potential to become cluttered with a lot
of differing arch-specific code in the same file.
I've broken up the main file into other files with arch-specific bits
(insn-reverse-<arch>.c). The main file will hold the generic pieces that will
take care of calling the tests.
The arch-specific c files are then included at the top of the generic c file.
I've also added a generic initialize function since we need to run pre-test
checks on x86 to make sure the rdrand/rdseed instructions are supported,
otherwise we will run into a SIGILL.
The arch-specific files will implement their own initialize function with
whatever makes sense. Right now the aarch64 and arm files have an empty
initialization function.
Does this look reasonable?
gdb/testsuite/ChangeLog:
2017-01-26 Luis Machado <lgustavo@codesourcery.com>
* gdb.reverse/insn-reverse.c: Move arm and aarch64 code to their own
files.
(initialize): New function conditionally defined.
(testcases): Move within conditional block.
(main): Call initialize.
* gdb.reverse/insn-reverse-aarch64.c: New file, based on aarch64 bits
of gdb.reverse/insn-reverse.c.
* gdb.reverse/insn-reverse-arm.c: New file, based on arm bits of
gdb.reverse/insn-reverse.c.
Diffstat (limited to 'gdb/dicos-tdep.c')
0 files changed, 0 insertions, 0 deletions