Exemplo n.º 1
0
static int kplib_print_backtrace(ktap_state *ks)
{
	int skip = 10, max_entries = 10;
	int n = kp_arg_nr(ks);

	if (n >= 1) {
		kp_arg_check(ks, 1, KTAP_TYPE_NUMBER);
		skip = nvalue(kp_arg(ks, 1));
	}
	if (n >= 2) {
		kp_arg_check(ks, 2, KTAP_TYPE_NUMBER);
		max_entries = nvalue(kp_arg(ks, 2));
		max_entries = min(max_entries, KTAP_MAX_STACK_ENTRIES);
	}

	kp_transport_print_backtrace(ks, skip, max_entries);
	return 0;
}
Exemplo n.º 2
0
static int ktap_lib_print_backtrace(ktap_state *ks)
{
	kp_transport_print_backtrace(ks);
	return 0;
}