old-cross-binutils/gdb/testsuite/lib
Markus Metzger 46a3515b49 btrace: diagnose "record btrace pt" without libipt
If GDB has been configured without libipt support, i.e. HAVE_LIBIPT is
undefined, and is running on a system that supports Intel(R) Processor Trace,
GDB will run into an internal error when trying to decode the trace.

    (gdb) record btrace
    (gdb) s
    usage (name=0x7fffffffe954 "fib-64")
        at src/fib.c:12
    12          fprintf(stderr, "usage: %s <num>\n", name);
    (gdb) info record
    Active record target: record-btrace
    Recording format: Intel(R) Processor Trace.
    Buffer size: 16kB.
    gdb/btrace.c:971: internal-error: Unexpected branch trace format.
    A problem internal to GDB has been detected,
    further debugging may prove unreliable.
    Quit this debugging session? (y or n)

This requires a system with Linux kernel 4.1 or later running on a 5th
Generation Intel Core processor or later.

The issue is documented as PR 19297.

When trying to enable branch tracing, in addition to checking the target
support for the requested branch tracing format, also check whether GDB
supports. it.

gdb/
	* btrace.c (btrace_enable): Check whether HAVE_LIBIPT is defined.

testsuite/
	* lib/gdb.exp (skip_btrace_pt_tests): Check for a "GDB does not
	support" error.
2015-11-26 11:24:28 +01:00
..
ada.exp
append_gdb_boards_dir.exp
build-piece.exp
cache.exp
cell.exp
cl_util.c
cl_util.h
compiler.c
compiler.cc
cp-support.exp
d-support.exp
dtrace.exp
dwarf.exp gdb/testsuite: Fix left shift of negative value. 2015-11-17 10:56:32 +01:00
fortran.exp
future.exp
gdb-guile.exp
gdb-python.exp
gdb-utils.exp
gdb.exp btrace: diagnose "record btrace pt" without libipt 2015-11-26 11:24:28 +01:00
gdbserver-support.exp
gen-perf-test.exp
go.exp
java.exp
mi-support.exp List inferiors/threads/pspaces in ascending order 2015-11-24 18:36:31 +00:00
objc.exp
opencl.exp
opencl_hostapp.c
opencl_kernel.cl
pascal.exp
pdtrace.in
perftest.exp
prelink-support.exp
prompt.exp
range-stepping-support.exp
read1.c
selftest-support.exp
set_unbuffered_mode.c
trace-support.exp gdb/testsuite/gdb.trace: Deduplicate pcreg/spreg/fpreg. 2015-11-10 20:05:49 +01:00
unbuffer_output.c