unwind: rename public functions in an object-oriented fashion
This change renames functions exported to strace core part from unwind subsystem. The new names imply that unwind subsystem exports two types of functions. One is for manipulating back-end itself, "unwind_" prefix is used for this type. Another is for manipulating back-end private data structure (unwind_ctx) attached to tcb, "unwind_tcb_" is used for this type. This naming should help people to understand unwind subsystem and the relation between unwind subsystem and back-ends. * defs.h (unwind_print_stacktrace): Rename to unwind_tcb_print. (unwind_capture_stacktrace): Rename to unwind_tcb_capture. * unwind.c: Ditto. * syscall.c (syscall_entering_trace, syscall_exiting_trace): Use new names. Signed-off-by: Masatake YAMATO <yamato@redhat.com> Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
This commit is contained in:
parent
9f5e1d113e
commit
6b94271548
4
defs.h
4
defs.h
@ -736,8 +736,8 @@ extern void ts_div(struct timespec *, const struct timespec *, int);
|
||||
extern void unwind_init(void);
|
||||
extern void unwind_tcb_init(struct tcb *);
|
||||
extern void unwind_tcb_fin(struct tcb *);
|
||||
extern void unwind_print_stacktrace(struct tcb *);
|
||||
extern void unwind_capture_stacktrace(struct tcb *);
|
||||
extern void unwind_tcb_print(struct tcb *);
|
||||
extern void unwind_tcb_capture(struct tcb *);
|
||||
#endif
|
||||
|
||||
static inline int
|
||||
|
@ -708,7 +708,7 @@ syscall_entering_trace(struct tcb *tcp, unsigned int *sig)
|
||||
#ifdef USE_LIBUNWIND
|
||||
if (stack_trace_enabled) {
|
||||
if (tcp->s_ent->sys_flags & STACKTRACE_CAPTURE_ON_ENTER)
|
||||
unwind_capture_stacktrace(tcp);
|
||||
unwind_tcb_capture(tcp);
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -961,7 +961,7 @@ syscall_exiting_trace(struct tcb *tcp, struct timespec *ts, int res)
|
||||
|
||||
#ifdef USE_LIBUNWIND
|
||||
if (stack_trace_enabled)
|
||||
unwind_print_stacktrace(tcp);
|
||||
unwind_tcb_print(tcp);
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
4
unwind.c
4
unwind.c
@ -384,7 +384,7 @@ queue_print(struct unwind_queue_t *queue)
|
||||
* printing stack
|
||||
*/
|
||||
void
|
||||
unwind_print_stacktrace(struct tcb *tcp)
|
||||
unwind_tcb_print(struct tcb *tcp)
|
||||
{
|
||||
#if SUPPORTED_PERSONALITIES > 1
|
||||
if (tcp->currpers != DEFAULT_PERSONALITY) {
|
||||
@ -415,7 +415,7 @@ unwind_print_stacktrace(struct tcb *tcp)
|
||||
* capturing stack
|
||||
*/
|
||||
void
|
||||
unwind_capture_stacktrace(struct tcb *tcp)
|
||||
unwind_tcb_capture(struct tcb *tcp)
|
||||
{
|
||||
#if SUPPORTED_PERSONALITIES > 1
|
||||
if (tcp->currpers != DEFAULT_PERSONALITY) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user