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: [PATCH 7/8] [testsuite] Add a gdb.trace test for instruction relocation

Pierre Langlois <> 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 (éå)

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