mirror of
https://github.com/tobast/libunwind-eh_elf.git
synced 2024-11-22 15:47:37 +01:00
(get_accessors): Make it an arch-obj.
(flush_cache): Ditto. (set_caching_policy): Ditto. (regname): Ditto. (Logical change 1.32)
This commit is contained in:
parent
93daa3b08d
commit
20a6c1adf1
1 changed files with 28 additions and 26 deletions
|
@ -28,6 +28,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
|||
#define UNW_OBJ(fn) UNW_PASTE(UNW_PREFIX, fn)
|
||||
#define UNW_ARCH_OBJ(fn) UNW_PASTE(UNW_PASTE(UNW_PASTE(_U,UNW_TARGET),_), fn)
|
||||
|
||||
|
||||
#ifdef UNW_LOCAL_ONLY
|
||||
# define UNW_PREFIX UNW_PASTE(UNW_PASTE(_UL,UNW_TARGET),_)
|
||||
#else /* !UNW_LOCAL_ONLY */
|
||||
|
@ -205,8 +206,14 @@ extern unw_addr_space_t UNW_OBJ(local_addr_space);
|
|||
|
||||
extern unw_addr_space_t UNW_OBJ(create_addr_space) (unw_accessors_t *a,
|
||||
int byte_order);
|
||||
extern unw_accessors_t *UNW_OBJ(get_accessors) (unw_addr_space_t as);
|
||||
extern void UNW_OBJ(destroy_addr_space) (unw_addr_space_t as);
|
||||
extern unw_accessors_t *UNW_ARCH_OBJ(get_accessors) (unw_addr_space_t as);
|
||||
extern void UNW_ARCH_OBJ(flush_cache)(unw_addr_space_t as,
|
||||
unw_word_t lo, unw_word_t hi);
|
||||
extern int UNW_ARCH_OBJ(set_caching_policy)(unw_addr_space_t as,
|
||||
unw_caching_policy_t policy);
|
||||
extern const char *UNW_ARCH_OBJ(regname) (int regnum);
|
||||
|
||||
extern int UNW_OBJ(init_local) (unw_cursor_t *c, ucontext_t *u);
|
||||
extern int UNW_OBJ(init_remote) (unw_cursor_t *c, unw_addr_space_t as,
|
||||
void *as_arg);
|
||||
|
@ -221,11 +228,6 @@ extern int UNW_OBJ(get_save_loc) (unw_cursor_t *c, int regnum,
|
|||
unw_save_loc_t *loc);
|
||||
extern int UNW_OBJ(is_signal_frame) (unw_cursor_t *c);
|
||||
extern int UNW_OBJ(get_proc_name) (unw_cursor_t *c, char *buf, size_t buf_len);
|
||||
extern const char *UNW_ARCH_OBJ(regname) (int regnum);
|
||||
extern void UNW_OBJ(flush_cache)(unw_addr_space_t as,
|
||||
unw_word_t lo, unw_word_t hi);
|
||||
extern int UNW_OBJ(set_caching_policy)(unw_addr_space_t as,
|
||||
unw_caching_policy_t policy);
|
||||
|
||||
#define unw_local_addr_space UNW_OBJ(local_addr_space)
|
||||
|
||||
|
@ -239,65 +241,65 @@ extern int UNW_OBJ(set_caching_policy)(unw_addr_space_t as,
|
|||
This routine is NOT signal-safe. */
|
||||
#define unw_create_addr_space(a,b) UNW_OBJ(create_addr_space)(a,b)
|
||||
|
||||
/* Retrieve a pointer to the accessors structure associated with
|
||||
address space AS.
|
||||
This routine is signal-safe. */
|
||||
#define unw_get_accessors(as) UNW_OBJ(get_accessors)(as)
|
||||
|
||||
/* Destroy an address space.
|
||||
This routine is NOT signal-safe. */
|
||||
#define unw_destroy_addr_space(as) UNW_OBJ(destroy_addr_space)(as)
|
||||
|
||||
/* Retrieve a pointer to the accessors structure associated with
|
||||
address space AS.
|
||||
This routine is signal-safe. */
|
||||
#define unw_get_accessors(as) UNW_ARCH_OBJ(get_accessors)(as)
|
||||
|
||||
/* Initialize cursor C such that unwinding starts at the point
|
||||
represented by the context U. Returns zero on success, negative
|
||||
value on failure.
|
||||
This routine is signal-safe. */
|
||||
#define unw_init_local(c,u) UNW_OBJ(init_local)(c, u)
|
||||
#define unw_init_local(c,u) UNW_OBJ(init_local)(c, u)
|
||||
|
||||
/* Initialize cursor C such that it accesses the unwind target through
|
||||
accessors A.
|
||||
This routine is signal-safe. */
|
||||
#define unw_init_remote(c,a,arg) UNW_OBJ(init_remote)(c, a, arg)
|
||||
#define unw_init_remote(c,a,arg) UNW_OBJ(init_remote)(c, a, arg)
|
||||
|
||||
/* Move cursor up by one step (up meaning toward earlier, less deeply
|
||||
nested frames). Returns positive number if there are more frames
|
||||
to unwind, 0 if last frame has been reached, negative number in
|
||||
case of an error.
|
||||
This routine is signal-safe. */
|
||||
#define unw_step(c) UNW_OBJ(step)(c)
|
||||
#define unw_step(c) UNW_OBJ(step)(c)
|
||||
|
||||
/* Resume execution at the point identified by the cursor.
|
||||
This routine is signal-safe. */
|
||||
#define unw_resume(c) UNW_OBJ(resume)(c)
|
||||
#define unw_resume(c) UNW_OBJ(resume)(c)
|
||||
|
||||
/* Return the proc-info associated with the cursor.
|
||||
This routine is signal-safe. */
|
||||
#define unw_get_proc_info(c,p) UNW_OBJ(get_proc_info)(c,p)
|
||||
#define unw_get_proc_info(c,p) UNW_OBJ(get_proc_info)(c,p)
|
||||
|
||||
/* Register accessor routines. Return zero on success, negative value
|
||||
on failure.
|
||||
These routines are signal-safe. */
|
||||
#define unw_get_reg(c,r,v) UNW_OBJ(get_reg)(c,r,v)
|
||||
#define unw_set_reg(c,r,v) UNW_OBJ(set_reg)(c,r,v)
|
||||
#define unw_get_reg(c,r,v) UNW_OBJ(get_reg)(c,r,v)
|
||||
#define unw_set_reg(c,r,v) UNW_OBJ(set_reg)(c,r,v)
|
||||
|
||||
/* Floating-point accessor routines. Return zero on success, negative
|
||||
value on failure.
|
||||
These routines are signal-safe. */
|
||||
#define unw_get_fpreg(c,r,v) UNW_OBJ(get_fpreg)(c,r,v)
|
||||
#define unw_set_fpreg(c,r,v) UNW_OBJ(set_fpreg)(c,r,v)
|
||||
#define unw_get_fpreg(c,r,v) UNW_OBJ(get_fpreg)(c,r,v)
|
||||
#define unw_set_fpreg(c,r,v) UNW_OBJ(set_fpreg)(c,r,v)
|
||||
|
||||
/* Get the save-location of register R.
|
||||
This routine is signal-safe. */
|
||||
#define unw_get_save_loc(c,r,l) UNW_OBJ(get_save_loc)(c,r,l)
|
||||
#define unw_get_save_loc(c,r,l) UNW_OBJ(get_save_loc)(c,r,l)
|
||||
|
||||
/* Return 1 if register number R is a floating-point register, zero
|
||||
otherwise.
|
||||
This routine is signal-safe. */
|
||||
#define unw_is_fpreg(r) unw_tdep_is_fpreg(r)
|
||||
#define unw_is_fpreg(r) unw_tdep_is_fpreg(r)
|
||||
|
||||
/* Returns non-zero value if the cursor points to a signal frame.
|
||||
This routine is signal-safe. */
|
||||
#define unw_is_signal_frame(c) UNW_OBJ(is_signal_frame)(c)
|
||||
#define unw_is_signal_frame(c) UNW_OBJ(is_signal_frame)(c)
|
||||
|
||||
/* Return the name of the procedure that created the frame identified
|
||||
by the cursor. The returned string is ASCII NUL terminated. If the
|
||||
|
@ -312,7 +314,7 @@ extern int UNW_OBJ(set_caching_policy)(unw_addr_space_t as,
|
|||
this one is re-entrant (i.e., the returned string must be a string
|
||||
constant.
|
||||
This routine is signal-safe. */
|
||||
#define unw_regname(r) UNW_ARCH_OBJ(regname)(r)
|
||||
#define unw_regname(r) UNW_ARCH_OBJ(regname)(r)
|
||||
|
||||
/* Sets the caching policy of address space AS. Caching can be
|
||||
disabled completely by setting the policy to UNW_CACHE_NONE. With
|
||||
|
@ -321,7 +323,7 @@ extern int UNW_OBJ(set_caching_policy)(unw_addr_space_t as,
|
|||
cache, which can improve performance thanks to less locking and
|
||||
better locality. By default, UNW_CACHE_GLOBAL is in effect.
|
||||
This routine is NOT signal-safe. */
|
||||
#define unw_set_caching_policy(as, p) UNW_OBJ(set_caching_policy)(as, p)
|
||||
#define unw_set_caching_policy(as, p) UNW_ARCH_OBJ(set_caching_policy)(as, p)
|
||||
|
||||
/* Flush all caches (global, per-thread, or any other caches that
|
||||
might exist) in address-space AS of information at least relating
|
||||
|
@ -333,4 +335,4 @@ extern int UNW_OBJ(set_caching_policy)(unw_addr_space_t as,
|
|||
changed (e.g., because a library might have been removed via a call
|
||||
to dlclose()).
|
||||
This routine is signal-safe. */
|
||||
#define unw_flush_cache(as,lo,hi) UNW_OBJ(flush_cache)(as, lo, hi)
|
||||
#define unw_flush_cache(as,lo,hi) UNW_ARCH_OBJ(flush_cache)(as, lo, hi)
|
||||
|
|
Loading…
Reference in a new issue