]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
GDB: Allow passing regcache to resolve_dynamic_type ()
authorThiago Jung Bauermann <thiago.bauermann@linaro.org>
Mon, 28 Apr 2025 01:57:17 +0000 (22:57 -0300)
committerThiago Jung Bauermann <thiago.bauermann@linaro.org>
Thu, 23 Oct 2025 04:17:04 +0000 (01:17 -0300)
commitc6765f9454f174960beb7fa86d1d787553a23b08
tree4695ddba2335ef25e4ae4bbc75b1f1f0a7167126
parent0ea6cba479a1062b7afb1c5c00f7d1c60f089ab3
GDB: Allow passing regcache to resolve_dynamic_type ()

When reg_buffer::initialize_variable_size_registers () is called, there
may not be any frame available yet.  On the other hand, the reg_buffer
should already have any register values needed to calculate target
description parameter values and therefore resolve dynamic types.

So allow passing a regcache to resolve_dynamic_type (), and use it in
dwarf2_evaluate_property () when processing a target description
parameter property.

Because initialize_variable_size_registers () is a reg_buffer method,
dwarf2_evaluate_property () can't call tdesc_parameter_value () which is
a readable_regcache method.  So we need to add a
collect_tdesc_parameter () method to reg_buffer and check that the
collected parameter is valid.
gdb/dwarf2/loc.c
gdb/dwarf2/loc.h
gdb/frame.c
gdb/gdbtypes.c
gdb/gdbtypes.h
gdb/gnu-v3-abi.c
gdb/regcache.c
gdb/regcache.h