aboutsummaryrefslogtreecommitdiff
path: root/gdb/valops.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@adacore.com>2023-03-01 10:33:20 -0700
committerTom Tromey <tromey@adacore.com>2023-03-29 10:16:23 -0600
commit168f9f95995d7958d8ae35a54c0691f46961c209 (patch)
treebe01de3e459aa9b086fc30d074316c8d181d50e5 /gdb/valops.c
parentaeabe83d0a8612db7b038d1d21fa2447fe7d182f (diff)
downloadbinutils-168f9f95995d7958d8ae35a54c0691f46961c209.zip
binutils-168f9f95995d7958d8ae35a54c0691f46961c209.tar.gz
binutils-168f9f95995d7958d8ae35a54c0691f46961c209.tar.bz2
Pass a frame to value_at_lazy and value_from_contents_and_address
This patch adds a 'frame' parameter to value_at_lazy and ensures that it is passed down to the call to resolve_dynamic_type. This required also adding a frame parameter to value_from_contents_and_address. Nothing passes this parameter to value_at_lazy yet, so this patch should have no visible effect.
Diffstat (limited to 'gdb/valops.c')
-rw-r--r--gdb/valops.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/gdb/valops.c b/gdb/valops.c
index 0274754..d002c9d 100644
--- a/gdb/valops.c
+++ b/gdb/valops.c
@@ -980,14 +980,15 @@ value_one (struct type *type)
e.g. in case the type is a variable length array. */
static struct value *
-get_value_at (struct type *type, CORE_ADDR addr, int lazy)
+get_value_at (struct type *type, CORE_ADDR addr, frame_info_ptr frame,
+ int lazy)
{
struct value *val;
if (check_typedef (type)->code () == TYPE_CODE_VOID)
error (_("Attempt to dereference a generic pointer."));
- val = value_from_contents_and_address (type, NULL, addr);
+ val = value_from_contents_and_address (type, NULL, addr, frame);
if (!lazy)
val->fetch_lazy ();
@@ -1013,7 +1014,7 @@ get_value_at (struct type *type, CORE_ADDR addr, int lazy)
struct value *
value_at (struct type *type, CORE_ADDR addr)
{
- return get_value_at (type, addr, 0);
+ return get_value_at (type, addr, nullptr, 0);
}
/* See value.h. */
@@ -1032,9 +1033,9 @@ value_at_non_lval (struct type *type, CORE_ADDR addr)
e.g. in case the type is a variable length array. */
struct value *
-value_at_lazy (struct type *type, CORE_ADDR addr)
+value_at_lazy (struct type *type, CORE_ADDR addr, frame_info_ptr frame)
{
- return get_value_at (type, addr, 1);
+ return get_value_at (type, addr, frame, 1);
}
void