frame, backtrace: allow targets to supply a frame unwinder
Allow targets to supply their own target-specific frame unwinders; one for
normal frames and one for tailcall frames. If a target-specific unwinder
is supplied, it will be chosen before any other unwinder.
The original patch has been split into this and the next two patches.
gdb/
2013-02-11 Jan Kratochvil <jan.kratochvil@redhat.com>
* frame-unwind.c: Include target.h.
(frame_unwind_try_unwinder): New function with code from ...
(frame_unwind_find_by_frame): ... here. New variable
unwinder_from_target, call also target_get_unwinder)
(target_get_tailcall_unwinder, and frame_unwind_try_unwinder for it.
* target.c (target_get_unwinder, target_get_tailcall_unwinder): New.
* target.h (struct target_ops): New fields to_get_unwinder and
to_get_tailcall_unwinder.
(target_get_unwinder, target_get_tailcall_unwinder): New declarations.