aboutsummaryrefslogtreecommitdiff
path: root/gdb/Makefile.in
diff options
context:
space:
mode:
authorYao Qi <yao.qi@linaro.org>2017-01-26 14:29:19 +0000
committerYao Qi <yao.qi@linaro.org>2017-01-26 14:29:19 +0000
commit79843d45f7633f33dca8b0a9999a1b0795b6b459 (patch)
tree7ffe7c205eb6011ec2565ae0db2253523590f1fc /gdb/Makefile.in
parent8cafda321ca8588a9e42d78d8713b031696405bc (diff)
downloadgdb-79843d45f7633f33dca8b0a9999a1b0795b6b459.zip
gdb-79843d45f7633f33dca8b0a9999a1b0795b6b459.tar.gz
gdb-79843d45f7633f33dca8b0a9999a1b0795b6b459.tar.bz2
Disassembly unit test: disassemble one instruction
This patch adds one unit test, which disassemble one instruction for every gdbarch if available. The test needs one valid instruction of each gdbarch, and most of them are got from breakpoint instruction. For the rest gdbarch whose breakpoint instruction isn't a valid instruction, I copy one instruction from the gas/testsuite/gas/ directory. I get the valid instruction of most gdbarch except ia64, mep, mips, tic6x, and xtensa. People familiar with these arch should be easy to extend the test. In order to achieve "do the unit test for every gdbarch", I add selftest-arch.[c,h], so that we can register a function pointer, which has one argument gdbarch. selftest.c will iterate over all gdbarches to call the registered function pointer. gdb: 2017-01-26 Yao Qi <yao.qi@linaro.org> * Makefile.in (SFILES): Add disasm-selftests.c and selftest-arch.c. (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o. * disasm-selftests.c: New file. * selftest-arch.c: New file. * selftest-arch.h: New file.
Diffstat (limited to 'gdb/Makefile.in')
-rw-r--r--gdb/Makefile.in5
1 files changed, 5 insertions, 0 deletions
diff --git a/gdb/Makefile.in b/gdb/Makefile.in
index 3ce7d69..e0fe442 100644
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -1039,6 +1039,7 @@ SFILES = \
dfp.c \
dictionary.c \
disasm.c \
+ disasm-selftests.c \
doublest.c \
dtrace-probe.c \
dummy-frame.c \
@@ -1140,6 +1141,7 @@ SFILES = \
rust-exp.y \
rust-lang.c \
selftest.c \
+ selftest-arch.c \
sentinel-frame.c \
ser-base.c \
ser-event.c \
@@ -1396,6 +1398,7 @@ HFILES_NO_SRCDIR = \
rs6000-tdep.h \
s390-linux-tdep.h \
score-tdep.h \
+ selftest-arch.h \
sentinel-frame.h \
ser-base.h \
ser-event.h \
@@ -1643,6 +1646,7 @@ COMMON_OBS = $(DEPFILES) $(CONFIG_OBS) $(YYOBJ) \
dfp.o \
dictionary.o \
disasm.o \
+ disasm-selftests.o \
doublest.o \
dummy-frame.o \
dwarf2-frame.o \
@@ -1744,6 +1748,7 @@ COMMON_OBS = $(DEPFILES) $(CONFIG_OBS) $(YYOBJ) \
run-time-clock.o \
rust-lang.o \
selftest.o \
+ selftest-arch.o \
sentinel-frame.o \
ser-event.o \
serial.o \