old-cross-binutils/gdb/testsuite/gdb.trace
Marcin Kościelnicki ae91f62539 [PR gdb/13808] gdb.trace: Pass tdesc selected in gdbserver to IPA.
If gdbserver and IPA are using different tdesc, they will disagree
about 'R' trace packet size.  This results in mangled traces.

To make sure they pick the same tdesc, gdbserver pokes the tdesc
(specified as an index in a target-specific list) into a global
variable in IPA.  In theory, IPA could find out the tdesc on its
own, but that may be complex (in particular, I don't know how to
tell whether we have LAST_BREAK on s390 without messing with ptrace),
and we'd have to duplicate the logic.

Tested on i386 and x86_64.  On i386, it fixes two FAILs in ftrace.exp.
On x86_64, these failures have been KFAILed - one of them works now,
but the other now fails due to an unrelated reason (ugh).

gdb/gdbserver/ChangeLog:

	PR gdb/13808
	* Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
	* configure.srv: Ditto.
	* linux-aarch64-ipa.c (get_ipa_tdesc): New function.
	(initialize_low_tracepoint): Remove ipa_tdesc assignment.
	* linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
	(init_registers_amd64_linux): Remove prototype.
	(tdesc_amd64_linux): Remove declaration.
	(get_ipa_tdesc): New function.
	(initialize_low_tracepoint): Remove ipa_tdesc assignment,
	initialize remaining tdescs.
	* linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
	(init_registers_i386_linux): Remove prototype.
	(tdesc_i386_linux): Remove declaration.
	(get_ipa_tdesc): New function.
	(initialize_low_tracepoint): Remove ipa_tdesc assignment,
	initialize remaining tdescs.
	* linux-low.c (linux_get_ipa_tdesc_idx): New function.
	(linux_target_ops): wire in linux_get_ipa_tdesc_idx.
	* linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
	* linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
	(x86_get_ipa_tdesc_idx): New function.
	(the_low_target): Wire in x86_get_ipa_tdesc_idx.
	* linux-x86-tdesc.h: New file.
	* target.h (struct target_ops): Add get_ipa_tdesc_idx.
	(target_get_ipa_tdesc_idx): New macro.
	* tracepoint.c (ipa_tdesc_idx): New macro.
	(struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
	(symbol_list): Add ipa_tdesc_idx.
	(cmd_qtstart): Write ipa_tdesc_idx in the target.
	(ipa_tdesc): Remove.
	(ipa_tdesc_idx): New variable.
	(get_context_regcache): Use get_ipa_tdesc.
	(gdb_collect): Ditto.
	(gdb_probe): Ditto.
	* tracepoint.h (get_ipa_tdesc): New prototype.
	(ipa_tdesc): Remove.

gdb/testsuite/ChangeLog:

	PR gdb/13808
	* gdb.trace/ftrace.exp (test_fast_tracepoints): Remove kfail.
2016-02-25 17:57:28 +01:00
..
actions-changed.c GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
actions-changed.exp GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
actions.c GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
actions.exp GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
ax.exp GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
backtrace.exp gdb.trace/testsuite: Bump stack collection fudge factor. 2016-01-25 13:19:22 +01:00
change-loc-1.c GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
change-loc-2.c GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
change-loc.c GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
change-loc.exp GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
change-loc.h GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
circ.c GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
circ.exp GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
collection.c GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
collection.exp GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
deltrace.exp GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
disconnected-tracing.c GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
disconnected-tracing.exp GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
entry-values.c GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
entry-values.exp gdb.trace: Surround $call_insn with \y in entry-values.exp 2016-02-25 16:11:29 +01:00
ftrace-lock.c GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
ftrace-lock.exp GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
ftrace.c GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
ftrace.exp [PR gdb/13808] gdb.trace: Pass tdesc selected in gdbserver to IPA. 2016-02-25 17:57:28 +01:00
infotrace.exp GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
mi-trace-frame-collected.exp GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
mi-trace-unavailable.exp GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
mi-traceframe-changed.exp GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
mi-tracepoint-changed.exp GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
mi-tsv-changed.exp GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
no-attach-trace.c GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
no-attach-trace.exp GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
packetlen.exp GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
passc-dyn.exp GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
passcount.exp GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
pending.c GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
pending.exp gdb.trace: Fix another expected message on continue. 2016-01-23 12:16:19 +01:00
pendshr1.c GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
pendshr2.c GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
pr16508.exp GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
qtro.c GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
qtro.exp GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
range-stepping.c GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
range-stepping.exp GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
read-memory.c GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
read-memory.exp GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
report.exp GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
save-trace.exp testsuite: Fix save-trace.exp writing outside standard output directory 2016-02-16 09:01:38 -05:00
stap-trace.c GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
stap-trace.exp GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
status-stop.c GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
status-stop.exp GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
strace.c GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
strace.exp GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
tfile.c GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
tfile.exp GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
tfind.exp GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
trace-break.c GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
trace-break.exp testsuite/gdb.trace: Fix expected message on continue. 2016-01-19 13:04:58 +01:00
trace-buffer-size.c GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
trace-buffer-size.exp GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
trace-common.h GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
trace-condition.c GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
trace-condition.exp GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
trace-mt.c GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
trace-mt.exp GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
trace-unavailable.c GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
tracecmd.exp GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
tracefile-pseudo-reg.c Move tfile-avx.exp to tracefile-pseudo-reg.exp 2016-02-24 14:23:47 -05:00
tracefile-pseudo-reg.exp Move tfile-avx.exp to tracefile-pseudo-reg.exp 2016-02-24 14:23:47 -05:00
tspeed.c Determine the iteration count based on wallclock instead of user+system time. 2016-02-18 20:23:00 +01:00
tspeed.exp Fix missing IPA lib in tspeed.exp in some configurations. 2016-01-20 12:30:53 -05:00
tstatus.exp GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
tsv.exp GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
unavailable-dwarf-piece.c GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
unavailable-dwarf-piece.exp gdb.trace: Fix unavailable-dwarf-piece.exp on big endian targets 2016-01-23 14:54:59 +01:00
unavailable.cc GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
unavailable.exp gdb.trace: Fix unavailable.exp if last register happens to be PC. 2016-02-22 18:56:51 +01:00
while-dyn.exp GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
while-stepping.exp GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00