summaryrefslogtreecommitdiff
path: root/gdb/coffread.c
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2023-03-13 13:20:22 -0600
committerTom Tromey <tom@tromey.com>2023-03-18 11:12:38 -0600
commit9e76b17aa5a62d866d9446bcc397e35748596193 (patch)
tree297925e36b11f64e126906d08e528e643544ea33 /gdb/coffread.c
parente727c536c6e7334484b8dcbf369fe425bd5b892a (diff)
downloadbinutils-gdb-9e76b17aa5a62d866d9446bcc397e35748596193.tar.gz
Use type allocator for array types
This changes the array type creation functions to accept a type allocator, and updates all the callers. Note that symbol readers should generally allocate on the relevant objfile, regardless of the placement of the index type of the array, which is what this patch implements. Reviewed-By: Simon Marchi <simon.marchi@efficios.com>
Diffstat (limited to 'gdb/coffread.c')
-rw-r--r--gdb/coffread.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/gdb/coffread.c b/gdb/coffread.c
index ef92ffdc571..be31144639d 100644
--- a/gdb/coffread.c
+++ b/gdb/coffread.c
@@ -1783,8 +1783,7 @@ decode_type (struct coff_symbol *cs, unsigned int c_type,
type_allocator alloc (objfile);
range_type
= create_static_range_type (alloc, index_type, 0, n - 1);
- type =
- create_array_type (NULL, base_type, range_type);
+ type = create_array_type (alloc, base_type, range_type);
}
return type;
}