diff options
author | Markus Metzger <markus.t.metzger@intel.com> | 2013-03-18 16:43:05 +0100 |
---|---|---|
committer | Markus Metzger <markus.t.metzger@intel.com> | 2014-01-16 13:06:11 +0100 |
commit | ea001bdce2a4442eb556c64514c8ec2473f4c4d1 (patch) | |
tree | a6ce37546ce38cd0351143becd63b74fdf543a63 /gdb/target.h | |
parent | 1f3ef5810cab04310a11d4d561a4f32329dfb002 (diff) | |
download | gdb-ea001bdce2a4442eb556c64514c8ec2473f4c4d1.zip gdb-ea001bdce2a4442eb556c64514c8ec2473f4c4d1.tar.gz gdb-ea001bdce2a4442eb556c64514c8ec2473f4c4d1.tar.bz2 |
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.
Diffstat (limited to 'gdb/target.h')
-rw-r--r-- | gdb/target.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/gdb/target.h b/gdb/target.h index 18ae6e3..9752259 100644 --- a/gdb/target.h +++ b/gdb/target.h @@ -900,6 +900,11 @@ struct target_ops non-empty annex. */ int (*to_augmented_libraries_svr4_read) (void); + /* Those unwinders are tried before any other arch unwinders. Use NULL if + it is not used. */ + const struct frame_unwind *to_get_unwinder; + const struct frame_unwind *to_get_tailcall_unwinder; + int to_magic; /* Need sub-structure for target machine related rather than comm related? */ @@ -1791,6 +1796,12 @@ extern char *target_fileio_read_stralloc (const char *filename); extern int target_core_of_thread (ptid_t ptid); +/* See to_get_unwinder in struct target_ops. */ +extern const struct frame_unwind *target_get_unwinder (void); + +/* See to_get_tailcall_unwinder in struct target_ops. */ +extern const struct frame_unwind *target_get_tailcall_unwinder (void); + /* Verify that the memory in the [MEMADDR, MEMADDR+SIZE) range matches the contents of [DATA,DATA+SIZE). Returns 1 if there's a match, 0 if there's a mismatch, and -1 if an error is encountered while |