Allow larger regblock sizes when saving tracefiles
authorPedro Franco de Carvalho <pedromfc@linux.ibm.com>
Mon, 6 Aug 2018 19:24:55 +0000 (16:24 -0300)
committerPedro Franco de Carvalho <pedromfc@linux.ibm.com>
Mon, 6 Aug 2018 19:43:28 +0000 (16:43 -0300)
commit296956befef3711ed458c7cba8041fde0dab9c50
treeebdc070830a5e7ae483d398218efb3a915216d0b
parenta04b9d62a234923826e431a209d396a628661548
Allow larger regblock sizes when saving tracefiles

The tracefile.c:trace_save function assumes trace_regblock_size won't
be larger than the MAX_TRACE_UPLOAD constant, used to size the buffer
which holds trace data.  This can cause buffer overruns when this is
not the case.  This patch changes this function so that the larger
size is used to size the buffer.

gdb/ChangeLog:
2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>

* tracefile.c: Include common/byte-vector.h.
(trace_save): Change type of buf to gdb::byte_vector.  Initialize
with trace_regblock_size if needed.  Update uses of buf.
gdb/ChangeLog
gdb/tracefile.c
This page took 0.029473 seconds and 4 git commands to generate.