mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-08-06 06:45:56 +08:00
Use int instead of LONGEST in tdesc_type sizes.
gdb/ChangeLog: * target-descriptions.c (struct tdesc_type) <u.u.size>: Change type from LONGEST to int. (struct tdesc_type) <u.f.size>: Ditto. (tdesc_set_struct_size): Change type of "size" arg from LONGEST to int. Add assertion size > 0. (tdesc_create_flags): Ditto. * target-descriptions.h (tdesc_set_struct_size): Update. (tdesc_create_flags): Update. * xml-tdesc.c (MAX_FIELD_SIZE, MAX_FIELD_BITSIZE): New macros. (MAX_VECTOR_SIZE): New macro. (tdesc_start_struct): Catch conversion errors from LONGEST to int. (tdesc_start_flags, tdesc_start_field, tdesc_start_vector): Ditto.
This commit is contained in:
@ -229,12 +229,12 @@ struct tdesc_type *tdesc_create_vector (struct tdesc_feature *feature,
|
||||
int count);
|
||||
struct tdesc_type *tdesc_create_struct (struct tdesc_feature *feature,
|
||||
const char *name);
|
||||
void tdesc_set_struct_size (struct tdesc_type *type, LONGEST size);
|
||||
void tdesc_set_struct_size (struct tdesc_type *type, int size);
|
||||
struct tdesc_type *tdesc_create_union (struct tdesc_feature *feature,
|
||||
const char *name);
|
||||
struct tdesc_type *tdesc_create_flags (struct tdesc_feature *feature,
|
||||
const char *name,
|
||||
LONGEST size);
|
||||
int size);
|
||||
void tdesc_add_field (struct tdesc_type *type, const char *field_name,
|
||||
struct tdesc_type *field_type);
|
||||
void tdesc_add_bitfield (struct tdesc_type *type, const char *field_name,
|
||||
|
Reference in New Issue
Block a user