aboutsummaryrefslogtreecommitdiff
path: root/gdb/value.h
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@efficios.com>2023-12-01 11:27:26 -0500
committerSimon Marchi <simon.marchi@efficios.com>2023-12-14 16:04:49 +0000
commit6831f2cd547e6e18b2245a4f325f9960b1e732ec (patch)
tree1f09e017c5205ab833394b7ebe73dd40f31b443d /gdb/value.h
parent9fc79b423697825f7afcb4f1143edd3827711c4c (diff)
downloadbinutils-6831f2cd547e6e18b2245a4f325f9960b1e732ec.zip
binutils-6831f2cd547e6e18b2245a4f325f9960b1e732ec.tar.gz
binutils-6831f2cd547e6e18b2245a4f325f9960b1e732ec.tar.bz2
gdb: add value::allocate_register
Add value::allocate_register, to facilitate allocating a value representing a register in a given frame (or rather, in the given frame's previous frame). It will be used in a subsequent patch. I changed one relatively obvious spot that could use it, to at least exercise the code path. Change-Id: Icd4960f5e471a74b657bb3596c88d89679ef3772 Reviewed-By: John Baldwin <jhb@FreeBSD.org>
Diffstat (limited to 'gdb/value.h')
-rw-r--r--gdb/value.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/gdb/value.h b/gdb/value.h
index 3f9b35b..2f3b41e 100644
--- a/gdb/value.h
+++ b/gdb/value.h
@@ -159,6 +159,13 @@ public:
/* Allocate a value and its contents for type TYPE. */
static struct value *allocate (struct type *type);
+ /* Allocate a non-lazy value representing register RENUM in the frame previous
+ to NEXT_FRAME. The type of the value is found using `register_type`.
+
+ The caller is responsible for filling the value's contents. */
+ static struct value *allocate_register (frame_info_ptr next_frame,
+ int regnum);
+
/* Create a computed lvalue, with type TYPE, function pointers
FUNCS, and closure CLOSURE. */
static struct value *allocate_computed (struct type *type,