diff options
author | Alan Modra <amodra@bigpond.net.au> | 2005-04-14 10:33:55 +0000 |
---|---|---|
committer | Alan Modra <amodra@bigpond.net.au> | 2005-04-14 10:33:55 +0000 |
commit | 0eeffc7f3d1f842abc42c598c9fd694daf1c63c7 (patch) | |
tree | 4c93ccdec5cd2959c049f0df014e2d246ac85dd9 /gprof | |
parent | 6235759bbcc1e132a276a1fd0347d8f44cce6599 (diff) | |
download | binutils-redhat-0eeffc7f3d1f842abc42c598c9fd694daf1c63c7.tar.gz |
* corefile.c (core_init): Call bfd_get_synthetic_symtab.
Diffstat (limited to 'gprof')
-rw-r--r-- | gprof/ChangeLog | 4 | ||||
-rw-r--r-- | gprof/corefile.c | 22 |
2 files changed, 25 insertions, 1 deletions
diff --git a/gprof/ChangeLog b/gprof/ChangeLog index 532f915d3f..a3c5dbc39b 100644 --- a/gprof/ChangeLog +++ b/gprof/ChangeLog @@ -1,5 +1,9 @@ 2005-04-14 Alan Modra <amodra@bigpond.net.au> + * corefile.c (core_init): Call bfd_get_synthetic_symtab. + +2005-04-14 Alan Modra <amodra@bigpond.net.au> + * Makefile.am (NO_WERROR): Define. * acinclude.m4: Include ../bfd/warning.m4. * configure.in: Invoke AM_BINUTILS_WARNINGS. diff --git a/gprof/corefile.c b/gprof/corefile.c index bd594f5a23..c06f7d4c75 100644 --- a/gprof/corefile.c +++ b/gprof/corefile.c @@ -1,6 +1,6 @@ /* corefile.c - Copyright 1999, 2000, 2001, 2002, 2003, 2004 + Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. This file is part of GNU Binutils. @@ -142,6 +142,9 @@ void core_init (const char *aout_name) { int core_sym_bytes; + asymbol *synthsyms; + long synth_count; + core_bfd = bfd_openr (aout_name, 0); if (!core_bfd) @@ -190,6 +193,23 @@ core_init (const char *aout_name) done (1); } + synth_count = bfd_get_synthetic_symtab (core_bfd, core_num_syms, core_syms, + 0, NULL, &synthsyms); + if (synth_count > 0) + { + asymbol **symp; + long new_size; + long i; + + new_size = (core_num_syms + synth_count + 1) * sizeof (*core_syms); + core_syms = xrealloc (core_syms, new_size); + symp = core_syms + core_num_syms; + core_num_syms += synth_count; + for (i = 0; i < synth_count; i++) + *symp++ = synthsyms + i; + *symp = 0; + } + min_insn_size = 1; offset_to_code = 0; |