aboutsummaryrefslogtreecommitdiff
path: root/binutils/dlltool.c
diff options
context:
space:
mode:
authorMarkus Metzger <markus.t.metzger@intel.com>2016-10-14 09:08:01 +0200
committerMarkus Metzger <markus.t.metzger@intel.com>2016-11-14 10:15:42 +0100
commitdb58b3735f45345c06cb9a14d0f83f5b26c1ebf3 (patch)
treecbcf6405feb64c5e7ba7f141d739b7f1036a9e8d /binutils/dlltool.c
parent80bb3407f6891aff5dbed5b2fd5c3dae8f227319 (diff)
downloadbinutils-db58b3735f45345c06cb9a14d0f83f5b26c1ebf3.zip
binutils-db58b3735f45345c06cb9a14d0f83f5b26c1ebf3.tar.gz
binutils-db58b3735f45345c06cb9a14d0f83f5b26c1ebf3.tar.bz2
btrace: read entire aux buffer
The data_head of a perf event data buffer grows indefinitely. Users are expected to compute data_head % data_size to find the location inside the perf event data buffer. The aux_head of a perf event aux buffer wraps around and always stays within the perf event aux buffer. Well, at least that's the behaviour for BTS and PT - where BTS uses the data buffer and PT the aux buffer. GDB does not read beyond data_head or aux_head. This is OK for BTS but wrong for PT. It causes only a portion of the trace to be considered by GDB. In the extreme case, the buffer may appear (almost) empty. Thanks to Tim Wiederhake <tim.wiederhake@intel.com> for reporting the anomaly. Change it to read the entire aux buffer for PT. The buffer is initially zero so any extra zeroes we read before aux_head wraps around the first time will be ignored when searching for the first PSB packet in order to synchronize onto the trace stream. gdb/ * nat/linux-btrace.c (perf_event_read): Allow data_head < size. * nat/linux-btrace.c (perf_event_read_all): Do not adjust size. Change-Id: If4f8049a2080a5f16f336309450b32a3eb1e3ec9
Diffstat (limited to 'binutils/dlltool.c')
0 files changed, 0 insertions, 0 deletions