aboutsummaryrefslogtreecommitdiff
path: root/gdb/python/py-utils.c
diff options
context:
space:
mode:
authorPar Olsson <par.olsson@windriver.com>2016-04-28 12:54:07 -0400
committerSimon Marchi <simon.marchi@ericsson.com>2016-04-28 12:56:05 -0400
commit35fd2deb6916e972248d52b1bc1d584fa9059f8f (patch)
tree30a626e989c31b451a639d012a795a9f68f42b1c /gdb/python/py-utils.c
parent952ebca5831911a8ef2a79f6e1e7a2c24f71a388 (diff)
downloadgdb-35fd2deb6916e972248d52b1bc1d584fa9059f8f.zip
gdb-35fd2deb6916e972248d52b1bc1d584fa9059f8f.tar.gz
gdb-35fd2deb6916e972248d52b1bc1d584fa9059f8f.tar.bz2
Fix write endianness/size problem for fast tracepoint enabled flag
I am sending this fix on behalf of Par Olsson, as a follow-up of this one: https://www.sourceware.org/ml/gdb-patches/2015-10/msg00196.html This problem is exposed when enabling/disabling fast tracepoints on big endian machines. The flag is defined as an int8_t, but is written from gdbserver as an integer (usually 32 bits). When the agent code reads it as an int8_t, it only considers the most significant byte, which is always 0. Also, we were writing 32 bits in an 8 bits field, so the write would overflow, but since the following bytes are padding (the next field is an uint64_t), it luckily didn't cause any issue on little endian systems. The fix was originally tested on ARM big endian systems, but I don't have access to such a system. However, thanks to Marcin's PowerPC fast tracepoint patches and gcc110 (big endian Power7) on the gcc compile farm, I was able to reproduce the problem, test the fix and write a test (the following patch). gdb/gdbserver/ChangeLog: YYYY-MM-DD Par Olsson <par.olsson@windriver.com> * tracepoint.c (write_inferior_int8): New function. (cmd_qtenable_disable): Write enable flag using write_inferior_int8.
Diffstat (limited to 'gdb/python/py-utils.c')
0 files changed, 0 insertions, 0 deletions