]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
gdb: add type parameter to value::allocate_register and add value::allocate_register_lazy
authorSimon Marchi <simon.marchi@efficios.com>
Thu, 21 Dec 2023 16:21:52 +0000 (16:21 +0000)
committerSimon Marchi <simon.marchi@polymtl.ca>
Sun, 24 Dec 2023 14:02:08 +0000 (09:02 -0500)
commit8ada4c640ba066a0129cb8c3928f676d1f0fd917
tree14eec90cb2ab579c25fb2f53c8d4630a9b92cf25
parent9960c5d0a05007d27cc333f5cc3e746ac5087237
gdb: add type parameter to value::allocate_register and add value::allocate_register_lazy

Some places that create register struct values don't use register_type
to obtain the value type.  This prevents them from using the current
version of value::allocate_register.  One spot (value_of_register_lazy)
also creates a lazy register value.

Add a value::allocate_register_lazy method.  Add some type parameters
to value::allocate_register and value::allocate_register_lazy, to let
the caller specify the type to use for the value.  The parameters
default to nullptr, in which case we use register_type to obtain the
type.

Change-Id: I640ec0a5a0f4a55eba12d515dbfd25933229f8ec
gdb/findvar.c
gdb/rs6000-tdep.c
gdb/value.c
gdb/value.h