Re: [PATCH 4/4] Variable size for regs mask in collection list

Ulrich Weigand
2018-06-25T10:38:35Z

Pedro Franco de Carvalho wrote:

> * tracepoint.h (collection_list) <m_regs_mask>: Change type to
> std::vector<unsigned char>.
> * tracepoint.c (collection_list::collection_list): Remove
> m_regs_mask initializer from initializer list. Resize m_regs_mask
> in using the number of registers from the arch.
> (collection_list::add_register): Resize m_regs_mask instead of
> throwing error when regno is too large.
> (collection_list::stringify): Use size () instead of sizeof. Use
> xsnprintf instead of sprintf.

This is OK, but:

> private:
> /* room for up to 256 regs */
> - unsigned char m_regs_mask[32];
> + std::vector<unsigned char> m_regs_mask;

The comment is now wrong, so please remove it as well.

Bye,
Ulrich

--
Dr. Ulrich Weigand
GNU/Linux compilers and toolchain
Ulrich.Weigand@de.ibm.com