mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2025-01-18 12:24:38 +08:00
* corefile.c (core_create_function_syms, core_create_line_syms): Don't
set discard_underscores. * gprof.c (discard_underscores): Delete. * gprof.h (discard_underscores): Delete. * sym_ids.c (match): Use bfd_get_symbol_leading_char to check for leading underscores. * utils.c (print_name_only): Call bfd_demangle rather than cplus_demangle. * Makefile.am: Run "make dep-am". * Makefile.in: Regenerate.
This commit is contained in:
parent
73705ac309
commit
8db406db3c
@ -1,3 +1,16 @@
|
||||
2007-04-19 Alan Modra <amodra@bigpond.net.au>
|
||||
|
||||
* corefile.c (core_create_function_syms, core_create_line_syms): Don't
|
||||
set discard_underscores.
|
||||
* gprof.c (discard_underscores): Delete.
|
||||
* gprof.h (discard_underscores): Delete.
|
||||
* sym_ids.c (match): Use bfd_get_symbol_leading_char to check for
|
||||
leading underscores.
|
||||
* utils.c (print_name_only): Call bfd_demangle rather than
|
||||
cplus_demangle.
|
||||
* Makefile.am: Run "make dep-am".
|
||||
* Makefile.in: Regenerate.
|
||||
|
||||
2007-04-14 Steve Ellcey <sje@cup.hp.com>
|
||||
|
||||
* Makefile.am: Add ACLOCAL_AMFLAGS.
|
||||
|
@ -226,7 +226,7 @@ corefile.o: corefile.c $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
|
||||
gprof.h $(BFDDIR)/sysdep.h $(INCDIR)/ansidecl.h ../bfd/config.h \
|
||||
$(INCDIR)/fopen-same.h $(INCDIR)/filenames.h ../bfd/bfd.h \
|
||||
$(INCDIR)/ansidecl.h $(INCDIR)/symcat.h gconfig.h search_list.h \
|
||||
source.h symtab.h corefile.h
|
||||
source.h symtab.h hist.h corefile.h
|
||||
gmon_io.o: gmon_io.c gprof.h $(BFDDIR)/sysdep.h $(INCDIR)/ansidecl.h \
|
||||
../bfd/config.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
|
||||
../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
|
||||
@ -270,13 +270,13 @@ sym_ids.o: sym_ids.c $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
|
||||
../bfd/config.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
|
||||
../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
|
||||
gconfig.h search_list.h source.h symtab.h cg_arcs.h \
|
||||
sym_ids.h
|
||||
sym_ids.h corefile.h
|
||||
utils.o: utils.c $(INCDIR)/demangle.h $(INCDIR)/libiberty.h \
|
||||
$(INCDIR)/ansidecl.h gprof.h $(BFDDIR)/sysdep.h $(INCDIR)/ansidecl.h \
|
||||
../bfd/config.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
|
||||
../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
|
||||
gconfig.h search_list.h source.h symtab.h cg_arcs.h \
|
||||
utils.h
|
||||
utils.h corefile.h
|
||||
i386.o: i386.c gprof.h $(BFDDIR)/sysdep.h $(INCDIR)/ansidecl.h \
|
||||
../bfd/config.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
|
||||
../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
|
||||
|
@ -958,7 +958,7 @@ corefile.o: corefile.c $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
|
||||
gprof.h $(BFDDIR)/sysdep.h $(INCDIR)/ansidecl.h ../bfd/config.h \
|
||||
$(INCDIR)/fopen-same.h $(INCDIR)/filenames.h ../bfd/bfd.h \
|
||||
$(INCDIR)/ansidecl.h $(INCDIR)/symcat.h gconfig.h search_list.h \
|
||||
source.h symtab.h corefile.h
|
||||
source.h symtab.h hist.h corefile.h
|
||||
gmon_io.o: gmon_io.c gprof.h $(BFDDIR)/sysdep.h $(INCDIR)/ansidecl.h \
|
||||
../bfd/config.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
|
||||
../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
|
||||
@ -1002,13 +1002,13 @@ sym_ids.o: sym_ids.c $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
|
||||
../bfd/config.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
|
||||
../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
|
||||
gconfig.h search_list.h source.h symtab.h cg_arcs.h \
|
||||
sym_ids.h
|
||||
sym_ids.h corefile.h
|
||||
utils.o: utils.c $(INCDIR)/demangle.h $(INCDIR)/libiberty.h \
|
||||
$(INCDIR)/ansidecl.h gprof.h $(BFDDIR)/sysdep.h $(INCDIR)/ansidecl.h \
|
||||
../bfd/config.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
|
||||
../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
|
||||
gconfig.h search_list.h source.h symtab.h cg_arcs.h \
|
||||
utils.h
|
||||
utils.h corefile.h
|
||||
i386.o: i386.c gprof.h $(BFDDIR)/sysdep.h $(INCDIR)/ansidecl.h \
|
||||
../bfd/config.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
|
||||
../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
|
||||
|
@ -581,12 +581,6 @@ core_create_function_syms ()
|
||||
else
|
||||
max_vma = MAX (symtab.limit->addr, max_vma);
|
||||
|
||||
/* If we see "main" without an initial '_', we assume names
|
||||
are *not* prefixed by '_'. */
|
||||
if (symtab.limit->name[0] == 'm' && discard_underscores
|
||||
&& strcmp (symtab.limit->name, "main") == 0)
|
||||
discard_underscores = 0;
|
||||
|
||||
DBG (AOUTDEBUG, printf ("[core_create_function_syms] %ld %s 0x%lx\n",
|
||||
(long) (symtab.limit - symtab.base),
|
||||
symtab.limit->name,
|
||||
@ -746,12 +740,6 @@ core_create_line_syms ()
|
||||
|
||||
prev = ltab.limit;
|
||||
|
||||
/* If we see "main" without an initial '_', we assume names
|
||||
are *not* prefixed by '_'. */
|
||||
if (ltab.limit->name[0] == 'm' && discard_underscores
|
||||
&& strcmp (ltab.limit->name, "main") == 0)
|
||||
discard_underscores = 0;
|
||||
|
||||
DBG (AOUTDEBUG, printf ("[core_create_line_syms] %lu %s 0x%lx\n",
|
||||
(unsigned long) (ltab.limit - ltab.base),
|
||||
ltab.limit->name,
|
||||
|
@ -60,7 +60,6 @@ int output_style = 0;
|
||||
int output_width = 80;
|
||||
bfd_boolean bsd_style_output = FALSE;
|
||||
bfd_boolean demangle = TRUE;
|
||||
bfd_boolean discard_underscores = TRUE;
|
||||
bfd_boolean ignore_direct_calls = FALSE;
|
||||
bfd_boolean ignore_static_funcs = FALSE;
|
||||
bfd_boolean ignore_zeros = TRUE;
|
||||
|
@ -119,7 +119,6 @@ extern int output_style;
|
||||
extern int output_width; /* controls column width in index */
|
||||
extern bfd_boolean bsd_style_output; /* as opposed to FSF style output */
|
||||
extern bfd_boolean demangle; /* demangle symbol names? */
|
||||
extern bfd_boolean discard_underscores; /* discard leading underscores? */
|
||||
extern bfd_boolean ignore_direct_calls; /* don't count direct calls */
|
||||
extern bfd_boolean ignore_static_funcs; /* suppress static functions */
|
||||
extern bfd_boolean ignore_zeros; /* ignore unused symbols/files */
|
||||
|
@ -27,6 +27,7 @@
|
||||
#include "symtab.h"
|
||||
#include "cg_arcs.h"
|
||||
#include "sym_ids.h"
|
||||
#include "corefile.h"
|
||||
|
||||
static struct sym_id
|
||||
{
|
||||
@ -218,12 +219,19 @@ parse_id (struct sym_id *id)
|
||||
static bfd_boolean
|
||||
match (Sym *pattern, Sym *sym)
|
||||
{
|
||||
return (pattern->file ? pattern->file == sym->file : TRUE)
|
||||
&& (pattern->line_num ? pattern->line_num == sym->line_num : TRUE)
|
||||
&& (pattern->name
|
||||
? strcmp (pattern->name,
|
||||
sym->name+(discard_underscores && sym->name[0] == '_')) == 0
|
||||
: TRUE);
|
||||
if (pattern->file && pattern->file != sym->file)
|
||||
return FALSE;
|
||||
if (pattern->line_num && pattern->line_num != sym->line_num)
|
||||
return FALSE;
|
||||
if (pattern->name)
|
||||
{
|
||||
const char *sym_name = sym->name;
|
||||
if (*sym_name && bfd_get_symbol_leading_char (core_bfd) == *sym_name)
|
||||
sym_name++;
|
||||
if (strcmp (pattern->name, sym_name) != 0)
|
||||
return FALSE;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
|
@ -33,6 +33,7 @@
|
||||
#include "symtab.h"
|
||||
#include "cg_arcs.h"
|
||||
#include "utils.h"
|
||||
#include "corefile.h"
|
||||
|
||||
|
||||
/*
|
||||
@ -49,20 +50,11 @@ print_name_only (Sym *self)
|
||||
|
||||
if (name)
|
||||
{
|
||||
if (!bsd_style_output)
|
||||
if (!bsd_style_output && demangle)
|
||||
{
|
||||
if (name[0] == '_' && name[1] && discard_underscores)
|
||||
{
|
||||
name++;
|
||||
}
|
||||
if (demangle)
|
||||
{
|
||||
demangled = cplus_demangle (name, DMGL_ANSI | DMGL_PARAMS);
|
||||
if (demangled)
|
||||
{
|
||||
name = demangled;
|
||||
}
|
||||
}
|
||||
demangled = bfd_demangle (core_bfd, name, DMGL_ANSI | DMGL_PARAMS);
|
||||
if (demangled)
|
||||
name = demangled;
|
||||
}
|
||||
printf ("%s", name);
|
||||
size = strlen (name);
|
||||
|
Loading…
Reference in New Issue
Block a user