This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 7/8] [testsuite] Add a gdb.trace test for instruction relocation
- From: Yao Qi <qiyaoltc at gmail dot com>
- To: Pierre Langlois <pierre dot langlois at arm dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Tue, 15 Sep 2015 12:27:18 +0100
- Subject: Re: [PATCH 7/8] [testsuite] Add a gdb.trace test for instruction relocation
- Authentication-results: sourceware.org; auth=none
- References: <1442230282-20751-1-git-send-email-pierre dot langlois at arm dot com> <1442230282-20751-8-git-send-email-pierre dot langlois at arm dot com>
Pierre Langlois <pierre.langlois@arm.com> writes:
> This test case makes sure that relocating PC relative instructions does
> not change their behaviors. All PC relative AArch64 instructions are
> covered. While call and jump (32 bit relative) instructions are covered
> on x86.
>
> The test case creates a static array of function pointers for each
> supported architecture. Each function in this array tests a specific
> instruction using inline assembly. They all need to contain a symbol in
> the form of 'set_point\[0-9\]+' and finish by either calling pass or
> fail. The number of 'set_pointN' needs to go from 0 to
> (ARRAY_SIZE - 1).
>
> The test will:
> - look up the number of function pointers in the static array.
> - set fast tracepoints on each 'set_point\[0-9\]+' symbol, one in each
> functions from 0 to (ARRAY_SIZE - 1).
> - run the trace experiment and make sure the pass function is called for
> every function.
>
> gdb/testsuite/ChangeLog:
>
> * gdb.trace/ftrace-insn-reloc.c: New file.
> * gdb.trace/ftrace-insn-reloc.exp: New file.
The patch looks good to me.
I am wondering we could move gdb.trace/ftrace-insn-reloc.c to
gdb.arch/insn-reloc.c, because it is can be used for testing displaced
stepping as well. We can move gdb.trace/ftrace-insn-reloc.exp
to gdb.arch too. Any objections?
You can push it in in a few days if there are no objections on moving
them to gdb.arch directory.
--
Yao (éå)