aboutsummaryrefslogtreecommitdiff
path: root/gdb/python/py-corefile.c
diff options
context:
space:
mode:
authorJan Vrany <jan.vrany@labware.com>2025-10-10 21:38:44 +0100
committerJan Vrany <jan.vrany@labware.com>2025-10-10 21:38:44 +0100
commit5aff8911350d265c33bb98be1f69095ba16fa76d (patch)
tree602ecfbfc20aeb66a50fccddffebc1982bdd6ed5 /gdb/python/py-corefile.c
parent1ff5a447620050135b6431c761a5f2d8b01519fe (diff)
downloadbinutils-5aff8911350d265c33bb98be1f69095ba16fa76d.zip
binutils-5aff8911350d265c33bb98be1f69095ba16fa76d.tar.gz
binutils-5aff8911350d265c33bb98be1f69095ba16fa76d.tar.bz2
gdb: introduce new function create_function_type
While working on new Python API to create new function types I realized that there's no easy way to create a new function type and control where it is going to be allocated (whether in gdbarch's obstack or objfile's). Functions lookup_function_type and lookup_function_type_with_arguments always allocate at the same obstack as its return type. This is not sufficient for the new Python API - the user may use any type it can get hold of. For example, one may want to create a function returning arch-owned type and taking one argument of objfile-owned type. In that case we need to allocate the new type on that very objfile's obstack. This commit introduces new function - create_function_type - that takes type_allocator as first parameter, allowing caller to control the allocation. Existing functions (lookup_function_type and lookup_function_type_with_arguments) are reimplemented by means of new create_function_type. Approved-By: Tom Tromey <tom@tromey.com>
Diffstat (limited to 'gdb/python/py-corefile.c')
0 files changed, 0 insertions, 0 deletions