Skip to content
Commit 2d36c940 authored by Torbjörn SVENSSON's avatar Torbjörn SVENSSON Committed by Luis Machado
Browse files

gdb: dwarf2 generic implementation for caching function data



When there is no dwarf2 data for a register, a function can be called
to provide the value of this register.  In some situations, it might
not be trivial to determine the value to return and it would cause a
performance bottleneck to do the computation each time.

This patch allows the called function to have a "cache" object that it
can use to store some metadata between calls to reduce the performance
impact of the complex logic.

The cache object is unique for each function and frame, so if there are
more than one function pointer stored in the dwarf2_frame_cache->reg
array, then the appropriate pointer will be supplied (the type is not
known by the dwarf2 implementation).

dwarf2_frame_get_fn_data can be used to retrieve the function unique
cache object.
dwarf2_frame_allocate_fn_data can be used to allocate and retrieve the
function unique cache object.

Signed-off-by: default avatarTorbjörn SVENSSON <torbjorn.svensson@foss.st.com>
Signed-off-by: default avatarYvan Roux <yvan.roux@foss.st.com>
parent ccb99ed2
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment