Hi Omar,

On Mon, 2019-10-07 at 02:05 -0700, Omar Sandoval wrote:
> The next change will need to have the Dwarf_Frame readily available, so
> rather than finding it again every time, let's cache it for reuse. The
> CFI frame can also be useful to clients of libdwfl, so add
> dwfl_frame_dwarf_frame to get it. Similarly, the Dwfl_Module is also
> frequently needed in conjunction with the frame, so cache it and add
> dwfl_frame_module.

I can see how this is useful. But it seems the Dwarf_Frame is only
cached when __libdwfl_frame_unwind is called. Which I believe isn't
done for the initial frame. Also it isn't clear how to propagate any
errors when NULL is returned. Maybe dwfl_frame_dwarf_frame () should
check first to see if frame is NULL and then call lookup the CFI and
call dwarf_cfi_addrframe if not?

Thanks,

Mark

Reply via email to