Lines Matching +full:- +full:- +full:name +full:- +full:pretty
2 Copyright (C) 2005-2010, 2012, 2013, 2015 Red Hat, Inc.
43 /* Name and version of program. */
59 { "section", 'j', "NAME", 0,
60 N_("Treat addresses as offsets relative to NAME section."), 0 },
69 { "symbols-sections", 'x', NULL, 0, N_("Also show symbol and the section names"), 0 },
77 { "pretty-print", OPT_PRETTY, NULL, 0,
132 /* If non-null, take address parameters as relative to named section. */
142 static bool pretty; variable
189 if (buf[chars - 1] == '\n') in main()
190 buf[chars - 1] = '\0'; in main()
222 state->child_inputs[0] = state->input; in parse_opt()
229 /* Ignore --target=bfdname. */ in parse_opt()
276 pretty = true; in parse_opt()
286 symname (const char *name) in symname() argument
290 if (demangle && name[0] == '_' && name[1] == 'Z') in symname()
292 int status = -1; in symname()
293 char *dsymname = __cxa_demangle (name, demangle_buffer, in symname()
296 name = demangle_buffer = dsymname; in symname()
299 return name; in symname()
306 const char *name; in get_diename() local
308 name = dwarf_formstring (dwarf_attr_integrate (die, DW_AT_MIPS_linkage_name, in get_diename()
313 if (name == NULL) in get_diename()
314 name = dwarf_diename (die) ?: "??"; in get_diename()
316 return name; in get_diename()
326 int nscopes = dwarf_getscopes (cudie, addr - bias, &scopes); in print_dwarf_function()
336 const char *name = get_diename (&scopes[i]); in print_dwarf_function() local
337 if (name == NULL) in print_dwarf_function()
339 printf ("%s%c", symname (name), pretty ? ' ' : '\n'); in print_dwarf_function()
346 const char *name = get_diename (&scopes[i]); in print_dwarf_function() local
347 if (name == NULL) in print_dwarf_function()
350 /* When using --pretty-print we only show inlines on their in print_dwarf_function()
351 own line. Just print the first subroutine name. */ in print_dwarf_function()
352 if (pretty) in print_dwarf_function()
354 printf ("%s ", symname (name)); in print_dwarf_function()
359 printf ("%s inlined", symname (name)); in print_dwarf_function()
427 const char *name = dwfl_module_addrinfo (mod, addr, &off, &s, in print_addrsym() local
429 if (name == NULL) in print_addrsym()
431 /* No symbol name. Get a section name instead. */ in print_addrsym()
434 name = dwfl_module_relocation_info (mod, i, NULL); in print_addrsym()
435 if (name == NULL) in print_addrsym()
436 printf ("??%c", pretty ? ' ': '\n'); in print_addrsym()
438 printf ("(%s)+%#" PRIx64 "%c", name, addr, pretty ? ' ' : '\n'); in print_addrsym()
442 name = symname (name); in print_addrsym()
444 printf ("%s", name); in print_addrsym()
446 printf ("%s+%#" PRIx64 "", name, off); in print_addrsym()
448 // Also show section name for address. in print_addrsym()
463 shdr->sh_name)); in print_addrsym()
467 printf ("%c", pretty ? ' ' : '\n'); in print_addrsym()
474 const char *name __attribute__ ((unused)), in see_one_module() argument
488 const char *name __attribute__ ((unused)), in find_symbol() argument
504 switch (GELF_ST_TYPE (symbol->st_info)) in find_symbol()
523 adjust_to_section (const char *name, uintmax_t *addr, Dwfl *dwfl) in adjust_to_section() argument
539 if (!strcmp (scn, name)) in adjust_to_section()
550 if (*addr >= shdr->sh_size) in adjust_to_section()
556 *addr += shdr->sh_addr + shdr_bias; in adjust_to_section()
602 width = ehdr->e_ident[EI_CLASS] == ELFCLASS32 ? 8 : 16; in get_addr_width()
624 const char *name) in show_int() argument
628 printf (" (%s %u)", name, val); in show_int()
640 char *name = NULL; in handle_address() local
641 if (sscanf (string, "(%m[^)])%" PRIiMAX "%n", &name, &addr, &i) == 2 in handle_address()
643 parsed = adjust_to_section (name, &addr, dwfl); in handle_address()
644 switch (sscanf (string, "%m[^-+]%n%" PRIiMAX "%n", &name, &i, &addr, &j)) in handle_address()
659 void *arg[3] = { name, &sym, &value }; in handle_address()
662 error (0, 0, _("cannot find symbol '%s'"), name); in handle_address()
669 addr, name); in handle_address()
676 free (name); in handle_address()
689 printf ("0x%.*" PRIx64 "%s", width, addr, pretty ? ": " : "\n"); in handle_address()
694 /* First determine the function name. Use the DWARF information if in handle_address()
698 const char *name = dwfl_module_addrname (mod, addr); in handle_address() local
699 name = name != NULL ? symname (name) : "??"; in handle_address()
700 printf ("%s%c", name, pretty ? ' ' : '\n'); in handle_address()
707 if ((show_functions || show_symbols) && pretty) in handle_address()
743 int nscopes = dwarf_getscopes (cudie, addr - bias, &scopes); in handle_address()
764 for (int i = 0; i < nscopes - 1; i++) in handle_address()
772 if (pretty) in handle_address()
778 might not be directly above this inline -- e.g. in handle_address()
790 pretty ? " at " : "\n"); in handle_address()