This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]