This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 4/4] Variable size for regs mask in collection list
- From: "Ulrich Weigand" <uweigand at de dot ibm dot com>
- To: pedromfc at linux dot vnet dot ibm dot com (Pedro Franco de Carvalho)
- Cc: gdb-patches at sourceware dot org
- Date: Mon, 25 Jun 2018 12:38:27 +0200 (CEST)
- Subject: Re: [PATCH 4/4] Variable size for regs mask in collection list
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