Lines Matching defs:symbol

34 #include "symbol.h"
75 /* Initialize symbol maps and path of vmlinux/modules */
83 pr_debug("Failed to init symbol map.\n");
134 struct symbol *sym;
266 static bool kprobe_warn_out_range(const char *symbol, u64 address)
275 pr_warning("%s is out of .text, skip it.\n", symbol);
279 pr_warning("%s is blacklisted function, skip it.\n", symbol);
385 * Some binaries like glibc have special symbols which are on the symbol
387 * symbol from map, we can translate the address back to the probe point.
396 struct symbol *sym;
675 } else if (tp->symbol) {
677 ret = kernel_get_symbol_address_by_name(tp->symbol, &addr,
702 /* Adjust symbol name and address */
706 struct symbol *sym;
718 if (strcmp(sym->name, tp->symbol)) {
719 /* If we have no realname, use symbol for it */
721 tp->realname = tp->symbol;
723 free(tp->symbol);
724 tp->symbol = strdup(sym->name);
725 if (!tp->symbol)
783 /* point.address is the address of point.symbol + point.offset */
851 pr_warning("Relocated base symbol is not found! "
864 * If we found a wrong one, mark it by NULL symbol.
868 if (kprobe_warn_out_range(tevs[i].point.symbol,
877 /* If we have no realname, use symbol for it */
879 tevs[i].point.realname = tevs[i].point.symbol;
881 free(tevs[i].point.symbol);
882 tevs[i].point.symbol = tmp;
1202 fprintf(stdout, "\t@<%s+%lu>\n", vl->point.symbol,
1204 zfree(&vl->point.symbol);
1449 "follow C symbol-naming rule.\n", *arg);
1595 case '+': /* Byte offset from a symbol */
1662 pr_debug("symbol:%s file:%s line:%d offset:%lu return:%d lazy:%s\n",
1707 /* A variable, register, symbol or special value */
1942 /* Only the symbol-based probe has offset */
1943 tp->symbol = strdup(fmt1_str);
1944 if (tp->symbol == NULL) {
2184 * tp->symbol to "0x0".
2186 if (!tp->address && (!tp->symbol || strcmp(tp->symbol, "0x0")))
2203 if (!strncmp(tp->symbol, "0x", 2)) {
2209 tp->module ? ":" : "", tp->symbol, tp->offset);
2246 struct symbol *sym = NULL;
2257 if (tp->symbol && !addr) {
2258 if (kernel_get_symbol_address_by_name(tp->symbol,
2298 if (tp->symbol) {
2299 pp->function = strdup(tp->symbol);
2463 zfree(&tev->point.symbol);
2485 char *symbol;
2496 zfree(&node->symbol);
2540 node->symbol = strdup(p);
2541 if (!node->symbol) {
2546 node->start, node->end, node->symbol);
2823 pr_warning("%s accesses a variable by symbol name, but that is not supported for user application probe.\n",
2935 /* Skip if the symbol is out of .text or blacklisted */
2936 if (!tev->point.symbol && !pev->uprobes)
2980 struct symbol **syms)
2983 struct symbol *sym;
3002 /* We don't care about default symbol or not */
3027 struct symbol *sym __maybe_unused) { }
3032 pr_err("Please ensure you can read the /proc/kallsyms symbol addresses.\n"
3034 "kernel symbol addresses even if you are a superuser. Please change\n"
3036 "symbol addresses.\n"
3049 struct symbol *sym;
3050 struct symbol **syms = NULL;
3064 syms = malloc(sizeof(struct symbol *) * probe_conf.max_probes);
3084 pr_err("Failed to find symbol %s in %s\n", pp->function,
3100 pr_warning("Relocated base symbol is not found! "
3127 pr_debug("Found duplicated symbol %s @ %" PRIx64 "\n",
3154 tp->symbol = NULL; /* Skip it */
3157 tp->symbol = strdup_or_goto(reloc_sym->name, nomem_out);
3160 tp->symbol = strdup_or_goto(sym->name, nomem_out);
3257 * Give it a '0x' leading symbol name.
3258 * In __add_probe_trace_events, a NULL symbol is interpreted as
3261 if (asprintf(&tp->symbol, "0x%" PRIx64, tp->address) < 0)
3266 (kprobe_warn_out_range(tev->point.symbol,
3588 /* Skip if the symbol is out of .text or blacklisted */
3589 if (!tev->point.symbol && !pev->uprobes)
3651 /* Skip if the symbol is out of .text or blacklisted */
3652 if (!tev->point.symbol && !pev->uprobes)
3772 /* Get a symbol map */
3798 struct symbol *pos = dso__symbol_names(dso)[i];