probe-finder.c (af5666e0f76023d9c296016024297903a4c83108) probe-finder.c (0c188a07b6a399e3df66534c29fef0a2082aaf57)
1/*
2 * probe-finder.c : C expression to kprobe event converter
3 *
4 * Written by Masami Hiramatsu <mhiramat@redhat.com>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or

--- 497 unchanged lines hidden (view full) ---

506 Dwarf_Die die_mem;
507 int ret;
508
509 pr_debug("Converting variable %s into trace event.\n",
510 dwarf_diename(vr_die));
511
512 ret = convert_variable_location(vr_die, pf->addr, pf->fb_ops,
513 &pf->sp_die, pf->tvar);
1/*
2 * probe-finder.c : C expression to kprobe event converter
3 *
4 * Written by Masami Hiramatsu <mhiramat@redhat.com>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or

--- 497 unchanged lines hidden (view full) ---

506 Dwarf_Die die_mem;
507 int ret;
508
509 pr_debug("Converting variable %s into trace event.\n",
510 dwarf_diename(vr_die));
511
512 ret = convert_variable_location(vr_die, pf->addr, pf->fb_ops,
513 &pf->sp_die, pf->tvar);
514 if (ret == -ENOENT)
514 if (ret == -ENOENT || ret == -EINVAL)
515 pr_err("Failed to find the location of %s at this address.\n"
516 " Perhaps, it has been optimized out.\n", pf->pvar->var);
517 else if (ret == -ENOTSUP)
518 pr_err("Sorry, we don't support this variable location yet.\n");
515 pr_err("Failed to find the location of %s at this address.\n"
516 " Perhaps, it has been optimized out.\n", pf->pvar->var);
517 else if (ret == -ENOTSUP)
518 pr_err("Sorry, we don't support this variable location yet.\n");
519 else if (pf->pvar->field) {
519 else if (ret == 0 && pf->pvar->field) {
520 ret = convert_variable_fields(vr_die, pf->pvar->var,
521 pf->pvar->field, &pf->tvar->ref,
522 &die_mem);
523 vr_die = &die_mem;
524 }
525 if (ret == 0)
526 ret = convert_variable_type(vr_die, pf->tvar, pf->pvar->type);
527 /* *expr will be cached in libdw. Don't free it. */

--- 1073 unchanged lines hidden ---
520 ret = convert_variable_fields(vr_die, pf->pvar->var,
521 pf->pvar->field, &pf->tvar->ref,
522 &die_mem);
523 vr_die = &die_mem;
524 }
525 if (ret == 0)
526 ret = convert_variable_type(vr_die, pf->tvar, pf->pvar->type);
527 /* *expr will be cached in libdw. Don't free it. */

--- 1073 unchanged lines hidden ---