You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
\f
#include "defs.h"
#include "symtab.h"
#include "symfile.h"
#include "objfiles.h"
#include "buildsym.h"
-#include <obstack.h>
+#include "obstack.h"
-#include <string.h>
+#include "gdb_string.h"
#include "dst.h"
static int line_vector_length;
-struct pending_block *pending_blocks;
-
static struct blockvector *
make_blockvector PARAMS ((struct objfile *));
static void
dst_symfile_finish PARAMS ((struct objfile *));
-static void
-record_minimal_symbol PARAMS ((char *, CORE_ADDR, enum minimal_symbol_type));
-
static void
dst_end_symtab PARAMS ((struct objfile *));
last_source_file = NULL;
}
\f
-static void
-record_minimal_symbol (name, address, type)
- char *name;
- CORE_ADDR address;
- enum minimal_symbol_type type;
-{
- prim_record_minimal_symbol (savestring (name, strlen (name)),
- address,
- type);
-}
-\f
/* dst_symfile_init ()
is the dst-specific initialization routine for reading symbols.
/* Sort symbols alphabetically within each block. */
- sort_all_symtab_syms ();
+ {
+ struct symtab *s;
+ for (s = objfile -> symtabs; s != NULL; s = s -> next)
+ {
+ sort_symtab_syms (s);
+ }
+ }
/* Install any minimal symbols that have been collected as the current
minimal symbols for this objfile. */
struct symbol *sym = (struct symbol *)
obstack_alloc (&objfile->symbol_obstack, sizeof (struct symbol));
memset (sym, 0, sizeof (struct symbol));
- SYMBOL_NAME (sym) = obstack_copy0 (&objfile->symbol_obstack,
- name, strlen (name));
+ SYMBOL_NAME (sym) = obsavestring (name, strlen (name),
+ &objfile->symbol_obstack);
SYMBOL_VALUE (sym) = 0;
SYMBOL_NAMESPACE (sym) = VAR_NAMESPACE;
case dst_block_function:
case dst_block_subroutine:
case dst_block_program:
- record_minimal_symbol(name, address, mst_text);
+ prim_record_minimal_symbol(name, address, mst_text, objfile);
function = process_dst_function(
objfile,
symbol_entry,
}
}
if (module_num)
- record_minimal_symbol("<end_of_program>",
- BLOCK_END(block), mst_text);
+ prim_record_minimal_symbol("<end_of_program>",
+ BLOCK_END(block), mst_text, objfile);
/* One more faked symbol to make sure nothing can ever run off the
* end of the symbol table. This one represents the end of the
* text space. It used to be (CORE_ADDR) -1 (effectively the highest
* but no functions are ever mapped to an address higher than
* 40000000
*/
- record_minimal_symbol("<end_of_text>",
+ prim_record_minimal_symbol("<end_of_text>",
(CORE_ADDR) 0x40000000,
- mst_text);
+ mst_text, objfile);
while (struct_list)
{
element = struct_list;