mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-08-26 07:19:16 +08:00
Give a language to a type
This changes main_type to hold a language, and updates the debug readers to set this field. This is done by adding the language to the type-allocator object. Note that the non-DWARF readers are changed on a "best effort" basis. This patch also reimplements type::is_array_like to use the type's language, and it adds a new type::is_string_like as well. This in turn lets us change the Python implementation of these methods to simply defer to the type.
This commit is contained in:
@ -354,7 +354,7 @@ coff_alloc_type (int index)
|
||||
We will fill it in later if we find out how. */
|
||||
if (type == NULL)
|
||||
{
|
||||
type = type_allocator (coffread_objfile).new_type ();
|
||||
type = type_allocator (coffread_objfile, language_c).new_type ();
|
||||
*type_addr = type;
|
||||
}
|
||||
return type;
|
||||
@ -1763,7 +1763,7 @@ decode_type (struct coff_symbol *cs, unsigned int c_type,
|
||||
|
||||
base_type = decode_type (cs, new_c_type, aux, objfile);
|
||||
index_type = builtin_type (objfile)->builtin_int;
|
||||
type_allocator alloc (objfile);
|
||||
type_allocator alloc (objfile, language_c);
|
||||
range_type
|
||||
= create_static_range_type (alloc, index_type, 0, n - 1);
|
||||
type = create_array_type (alloc, base_type, range_type);
|
||||
|
Reference in New Issue
Block a user