teawater / kgtp

KGTP is a comprehensive dynamic tracer for analysing Linux kernel and application (including Android) problems on production systems in real time.
http://teawater.github.io/kgtp/
85 stars 36 forks source link

Let watch tracepoint can support enable disable and $enable and $disable #5

Open teawater opened 11 years ago

teawater commented 11 years ago
gtp_gdbrsp_qtenable_qtdisable

static int
gtp_enable_disable_hooks_set_val(struct gtp_trace_s *gts,
                 struct gtp_var *gtv, int64_t val)
{
    gtp_handler_enable_disable(gts, val,
                   (gtv->num == GTP_VAR_ENABLE_ID));

    return 0;
}

static struct gtp_var_hooks gtp_enable_disable_hooks = {
    .agent_set_val = gtp_enable_disable_hooks_set_val,
};

gtp_tracepoint_enable
gtp_tracepoint_disable