This is the mail archive of the gdb-testers@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]

[binutils-gdb] Make tdesc_arch_data::arch_regs an std::vector


*** TEST RESULTS FOR COMMIT f0cddbef410cb626ea87b3a954bd4e3d7526115e ***

Author: Simon Marchi <simon.marchi@polymtl.ca>
Branch: master
Commit: f0cddbef410cb626ea87b3a954bd4e3d7526115e

Make tdesc_arch_data::arch_regs an std::vector

Make tdesc_arch_data::arch_regs be an std::vector of tdesc_arch_reg
objects.

On particularity is that the tdesc_arch_data linked to a gdbarch is
allocated on the gdbarch's obstack.  To be safe, I did not change it and
called placement-new on the area returned by OBSTACK_ZALLOC.

gdb/ChangeLog:

	* target-descriptions.c (tdesc_arch_reg): Remove typedef.
	(struct tdesc_arch_reg): Add constructor.
	(DEF_VEC_O (tdesc_arch_reg)): Remove.
	(struct tdesc_arch_data): Initialize fields.
	<arch_regs>: Change type to std::vector.
	(target_find_description): Adjust.
	(tdesc_find_type): Adjust.
	(tdesc_data_init): Call tdesc_arch_data constructor.
	(tdesc_data_alloc): Allocate tdesc_arch_data with new.
	(tdesc_data_cleanup): Free data with delete.
	(tdesc_numbered_register): Adjust.
	(tdesc_find_arch_register): Adjust.
	(tdesc_use_registers): Adjust.


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