]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
Add support for any location description in CFI
authorZoran Zaric <Zoran.Zaric@amd.com>
Mon, 7 Dec 2020 19:00:28 +0000 (19:00 +0000)
committerSimon Marchi <simon.marchi@polymtl.ca>
Tue, 8 Dec 2020 16:16:21 +0000 (11:16 -0500)
commita6491910ec6b5a53709ef648cc219d2df451b49a
treec2fe4dba623b27ec43a5c514d4ef1ba639800299
parent07089eff99f08d87a87deab6e2e3adc8758ebd6b
Add support for any location description in CFI

One of the main benefits of allowing location description to be on the
DWARF stack is that now CFI expression based register rules can be
defined using a location description operations. This allows a register
of one frame to be saved in any location, including any composite
location.

To fully support this feature, the execute_stack_op function in
dwarf2/frame.c needs to return a single struct value object instead of
just an address.

Function put_frame_register_bytes also needs to change to support any
location description.

This support is a one of the key features to truly support optimized
code.

gdb/ChangeLog:

* dwarf2/frame.c (execute_stack_op): Change to return a struct
value object.
(dwarf2_frame_cache): Change to call new execute_stack_op
definition.
(dwarf2_frame_prev_register): Change to call new execute_stack_op
definition.
* frame.c (put_frame_register_bytes): Add support for writing to
composite location description.

Change-Id: I0c23ba56310174a2f8e539be72a11ac554efcaca
gdb/dwarf2/frame.c
gdb/frame.c