static const string TOK_PLT("plt");
static const string TOK_METHOD("method");
static const string TOK_CLASS("class");;
+static const string TOK_CALLEE("callee");;
+static const string TOK_CALLEES("callees");;
static int query_cu (Dwarf_Die * cudie, void * arg);
static void query_addr(Dwarf_Addr addr, dwarf_query *q);
bool has_label;
string label_val;
+ bool has_callee;
+ string callee_val;
+
+ bool has_callees_num;
+ long callees_num_val;
+
bool has_relative;
long relative_val;
has_statement_num = get_number_param(params, TOK_STATEMENT, statement_num_val);
has_label = get_string_param(params, TOK_LABEL, label_val);
+ has_callee = get_string_param(params, TOK_CALLEE, callee_val);
+ if (has_null_param(params, TOK_CALLEES))
+ { // .callees ==> .callees(1) (also equivalent to .callee("*"))
+ has_callees_num = true;
+ callees_num_val = 1;
+ }
+ else
+ {
+ has_callees_num = get_number_param(params, TOK_CALLEES, callees_num_val);
+ if (has_callees_num && callees_num_val < 1)
+ throw SEMANTIC_ERROR(_(".callees(N) only acceptable for N >= 1"),
+ base_probe->tok);
+ }
has_call = has_null_param(params, TOK_CALL);
has_exported = has_null_param(params, TOK_EXPORTED);
// kernel.statement(NUM).absolute
return dbr_none;
}
- if (has_inline || has_label)
+ if (has_inline || has_label || has_callee || has_callees_num)
{
// kernel.function("f").inline or module("m").function("f").inline
return dbr_need_dwarf;
fv_root->bind_str(TOK_LABEL)
->bind_privilege(privilege)
->bind(dw);
+ fv_root->bind_str(TOK_CALLEE)
+ ->bind_privilege(privilege)
+ ->bind(dw);
+ fv_root->bind(TOK_CALLEES)
+ ->bind_privilege(privilege)
+ ->bind(dw);
+ fv_root->bind_num(TOK_CALLEES)
+ ->bind_privilege(privilege)
+ ->bind(dw);
fv_root = root->bind_num(TOK_FUNCTION);
register_function_variants(fv_root, dw, privilege);