1
0
Fork 0
mirror of https://github.com/tobast/libunwind-eh_elf.git synced 2025-02-17 02:31:41 +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:
mostang.com!davidm 2002-12-19 07:16:50 +00:00
parent 93daa3b08d
commit 20a6c1adf1

View file

@ -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_OBJ(fn) UNW_PASTE(UNW_PREFIX, fn)
#define UNW_ARCH_OBJ(fn) UNW_PASTE(UNW_PASTE(UNW_PASTE(_U,UNW_TARGET),_), fn) #define UNW_ARCH_OBJ(fn) UNW_PASTE(UNW_PASTE(UNW_PASTE(_U,UNW_TARGET),_), fn)
#ifdef UNW_LOCAL_ONLY #ifdef UNW_LOCAL_ONLY
# define UNW_PREFIX UNW_PASTE(UNW_PASTE(_UL,UNW_TARGET),_) # define UNW_PREFIX UNW_PASTE(UNW_PASTE(_UL,UNW_TARGET),_)
#else /* !UNW_LOCAL_ONLY */ #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, extern unw_addr_space_t UNW_OBJ(create_addr_space) (unw_accessors_t *a,
int byte_order); 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 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_local) (unw_cursor_t *c, ucontext_t *u);
extern int UNW_OBJ(init_remote) (unw_cursor_t *c, unw_addr_space_t as, extern int UNW_OBJ(init_remote) (unw_cursor_t *c, unw_addr_space_t as,
void *as_arg); 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); unw_save_loc_t *loc);
extern int UNW_OBJ(is_signal_frame) (unw_cursor_t *c); 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 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) #define unw_local_addr_space UNW_OBJ(local_addr_space)
@ -239,15 +241,15 @@ extern int UNW_OBJ(set_caching_policy)(unw_addr_space_t as,
This routine is NOT signal-safe. */ This routine is NOT signal-safe. */
#define unw_create_addr_space(a,b) UNW_OBJ(create_addr_space)(a,b) #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. /* Destroy an address space.
This routine is NOT signal-safe. */ This routine is NOT signal-safe. */
#define unw_destroy_addr_space(as) UNW_OBJ(destroy_addr_space)(as) #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 /* Initialize cursor C such that unwinding starts at the point
represented by the context U. Returns zero on success, negative represented by the context U. Returns zero on success, negative
value on failure. value on failure.
@ -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 cache, which can improve performance thanks to less locking and
better locality. By default, UNW_CACHE_GLOBAL is in effect. better locality. By default, UNW_CACHE_GLOBAL is in effect.
This routine is NOT signal-safe. */ 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 /* Flush all caches (global, per-thread, or any other caches that
might exist) in address-space AS of information at least relating 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 changed (e.g., because a library might have been removed via a call
to dlclose()). to dlclose()).
This routine is signal-safe. */ 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)