]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
Add new register access interface to expr.c
authorZoran Zaric <Zoran.Zaric@amd.com>
Mon, 7 Dec 2020 19:00:17 +0000 (19:00 +0000)
committerSimon Marchi <simon.marchi@polymtl.ca>
Tue, 8 Dec 2020 16:16:19 +0000 (11:16 -0500)
commitb9b1a8273b1641c585510b7584d3a0f63be6935b
tree990961efcfdf12d3254164bc62cb6afb1a832599
parent0dc32c82c33bae82df269ff26b6f2fa550b9d18f
Add new register access interface to expr.c

DWARF expression evaluator is currently using get_frame_register_bytes
and put_frame_register_bytes interface for register access.

The problem with evaluator using this interface is that it allows a
bleed out register access. This means that if the caller specifies a
larger amount of data then the size of a specified register, the
operation will continue accessing the neighboring registers until a
full amount of data has been reached.

DWARF specification does not define this behavior, so a new simplified
register access interface is needed instead.

* dwarf2/expr.c (read_from_register): New function.
(write_to_register): New function.
(rw_pieced_value): Now calls the read_from_register and
write_to_register functions.

Change-Id: I885b6a02353bc3fcf0dd5c600b5f1a73a7f9e340
gdb/dwarf2/expr.c