static int line_vector_length;
-static int
-init_dst_sections PARAMS ((int));
+static int init_dst_sections (int);
-static void
-read_dst_symtab PARAMS ((struct objfile *));
+static void read_dst_symtab (struct objfile *);
-static void
-find_dst_sections PARAMS ((bfd *, sec_ptr, PTR));
+static void find_dst_sections (bfd *, sec_ptr, PTR);
-static void
-dst_symfile_init PARAMS ((struct objfile *));
+static void dst_symfile_init (struct objfile *);
-static void
-dst_new_init PARAMS ((struct objfile *));
+static void dst_new_init (struct objfile *);
-static void
-dst_symfile_read PARAMS ((struct objfile *, int));
+static void dst_symfile_read (struct objfile *, int);
-static void
-dst_symfile_finish PARAMS ((struct objfile *));
+static void dst_symfile_finish (struct objfile *);
-static void
-dst_end_symtab PARAMS ((struct objfile *));
+static void dst_end_symtab (struct objfile *);
-static void
-complete_symtab PARAMS ((char *, CORE_ADDR, unsigned int));
+static void complete_symtab (char *, CORE_ADDR, unsigned int);
-static void
-dst_start_symtab PARAMS ((void));
+static void dst_start_symtab (void);
-static void
-dst_record_line PARAMS ((int, CORE_ADDR));
+static void dst_record_line (int, CORE_ADDR);
/* Manage the vector of line numbers. */
/* FIXME: Use record_line instead. */
static void
-dst_record_line (line, pc)
- int line;
- CORE_ADDR pc;
+dst_record_line (int line, CORE_ADDR pc)
{
struct linetable_entry *e;
/* Make sure line vector is big enough. */
/* FIXME: use start_symtab, like coffread.c now does. */
static void
-dst_start_symtab ()
+dst_start_symtab (void)
{
/* Initialize the source file line number information for this file. */
if (line_vector) /* Unlikely, but maybe possible? */
- free ((PTR) line_vector);
+ xfree (line_vector);
line_vector_index = 0;
line_vector_length = 1000;
prev_line_number = -2; /* Force first line number to be explicit */
text address for the file, and SIZE is the number of bytes of text. */
static void
-complete_symtab (name, start_addr, size)
- char *name;
- CORE_ADDR start_addr;
- unsigned int size;
+complete_symtab (char *name, CORE_ADDR start_addr, unsigned int size)
{
last_source_file = savestring (name, strlen (name));
cur_src_start_addr = start_addr;
/* FIXME: Use end_symtab, like coffread.c now does. */
static void
-dst_end_symtab (objfile)
- struct objfile *objfile;
+dst_end_symtab (struct objfile *objfile)
{
register struct symtab *symtab;
register struct blockvector *blockvector;
The ultimate result is a new symtab (or, FIXME, eventually a psymtab). */
static void
-dst_symfile_init (objfile)
- struct objfile *objfile;
+dst_symfile_init (struct objfile *objfile)
{
asection *section;
bfd *abfd = objfile->obfd;
/* ARGSUSED */
static void
-find_dst_sections (abfd, asect, vpinfo)
- bfd *abfd;
- sec_ptr asect;
- PTR vpinfo;
+find_dst_sections (bfd *abfd, sec_ptr asect, PTR vpinfo)
{
int size, count;
long base;
/* ARGSUSED */
static void
-dst_symfile_read (objfile, mainline)
- struct objfile *objfile;
- int mainline;
+dst_symfile_read (struct objfile *objfile, int mainline)
{
bfd *abfd = objfile->obfd;
char *name = bfd_get_filename (abfd);
error ("\"%s\": error reading debugging symbol tables\n", name);
init_minimal_symbol_collection ();
- make_cleanup (discard_minimal_symbols, 0);
+ make_cleanup_discard_minimal_symbols ();
/* Now that the executable file is positioned at symbol table,
process it and define symbols accordingly. */
}
static void
-dst_new_init (ignore)
- struct objfile *ignore;
+dst_new_init (struct objfile *ignore)
{
/* Nothin' to do */
}
objfile struct from the global list of known objfiles. */
static void
-dst_symfile_finish (objfile)
- struct objfile *objfile;
+dst_symfile_finish (struct objfile *objfile)
{
/* Nothing to do */
}
* this is what was really intended.
*/
static int
-get_dst_line (buffer, pc)
- signed char **buffer;
- long *pc;
+get_dst_line (signed char **buffer, long *pc)
{
static last_pc = 0;
static long last_line = 0;
}
static void
-enter_all_lines (buffer, address)
- char *buffer;
- long address;
+enter_all_lines (char *buffer, long address)
{
if (buffer)
while (get_dst_line (&buffer, &address));
}
static int
-get_dst_entry (buffer, ret_entry)
- char *buffer;
- dst_rec_ptr_t *ret_entry;
+get_dst_entry (char *buffer, dst_rec_ptr_t *ret_entry)
{
int size;
dst_rec_ptr_t entry;
}
static int
-next_dst_entry (buffer, entry, table)
- char **buffer;
- dst_rec_ptr_t *entry;
- dst_sec *table;
+next_dst_entry (char **buffer, dst_rec_ptr_t *entry, dst_sec *table)
{
if (*buffer - table->buffer >= table->size)
{
static dst_rec_ptr_t section_table = NULL;
char *
-get_sec_ref (ref)
- dst_sect_ref_t *ref;
+get_sec_ref (dst_sect_ref_t *ref)
{
dst_sec *section = NULL;
long offset;
}
CORE_ADDR
-dst_sym_addr (ref)
- dst_sect_ref_t *ref;
+dst_sym_addr (dst_sect_ref_t *ref)
{
if (!section_table || !ref->sect_index)
return 0;
}
static struct type *
-create_new_type (objfile)
- struct objfile *objfile;
+create_new_type (struct objfile *objfile)
{
struct type *type;
}
static struct symbol *
-create_new_symbol (objfile, name)
- struct objfile *objfile;
- char *name;
+create_new_symbol (struct objfile *objfile, char *name)
{
struct symbol *sym = (struct symbol *)
obstack_alloc (&objfile->symbol_obstack, sizeof (struct symbol));
return sym;
};
-static struct type *
- decode_dst_type PARAMS ((struct objfile *, dst_rec_ptr_t));
+static struct type *decode_dst_type (struct objfile *, dst_rec_ptr_t);
static struct type *
-decode_type_desc (objfile, type_desc, base)
- struct objfile *objfile;
- dst_type_t *type_desc;
- dst_rec_ptr_t base;
+decode_type_desc (struct objfile *objfile, dst_type_t *type_desc,
+ dst_rec_ptr_t base)
{
struct type *type;
dst_rec_ptr_t entry;
static struct structure_list *struct_list = NULL;
static struct type *
-find_dst_structure (name)
- char *name;
+find_dst_structure (char *name)
{
struct structure_list *element;
static struct type *
-decode_dst_structure (objfile, entry, code, version)
- struct objfile *objfile;
- dst_rec_ptr_t entry;
- int code;
- int version;
+decode_dst_structure (struct objfile *objfile, dst_rec_ptr_t entry, int code,
+ int version)
{
struct type *type, *child_type;
char *struct_name;
type = find_dst_structure (name);
if (type)
{
- free ((PTR) name);
+ xfree (name);
return type;
}
type = create_new_type (objfile);
TYPE_NAME (type) = obstack_copy0 (&objfile->symbol_obstack,
name, strlen (name));
- free ((PTR) name);
+ xfree (name);
TYPE_CODE (type) = code;
TYPE_LENGTH (type) = DST_record (entry).size;
TYPE_NFIELDS (type) = DST_record (entry).nfields;
}
static struct type *
-decode_dst_type (objfile, entry)
- struct objfile *objfile;
- dst_rec_ptr_t entry;
+decode_dst_type (struct objfile *objfile, dst_rec_ptr_t entry)
{
struct type *child_type, *type, *range_type, *index_type;
static int total_globals = 0;
static void
-decode_dst_locstring (locstr, sym)
- char *locstr;
- struct symbol *sym;
+decode_dst_locstring (char *locstr, struct symbol *sym)
{
dst_loc_entry_t *entry, *next_entry;
CORE_ADDR temp;
}
static struct symbol_list *
-process_dst_symbols (objfile, entry, name, nsyms_ret)
- struct objfile *objfile;
- dst_rec_ptr_t entry;
- char *name;
- int *nsyms_ret;
+process_dst_symbols (struct objfile *objfile, dst_rec_ptr_t entry, char *name,
+ int *nsyms_ret)
{
struct symbol_list *list = NULL, *element;
struct symbol *sym;
static struct symbol *
-process_dst_function (objfile, entry, name, address)
- struct objfile *objfile;
- dst_rec_ptr_t entry;
- char *name;
- CORE_ADDR address;
+process_dst_function (struct objfile *objfile, dst_rec_ptr_t entry, char *name,
+ CORE_ADDR address)
{
struct symbol *sym;
struct type *type, *ftype;
}
static struct block *
-process_dst_block (objfile, entry)
- struct objfile *objfile;
- dst_rec_ptr_t entry;
+process_dst_block (struct objfile *objfile, dst_rec_ptr_t entry)
{
struct block *block;
struct symbol *function = NULL;
block->sym[symnum] = symlist->symbol;
- free ((PTR) symlist);
+ xfree (symlist);
symlist = nextsym;
symnum++;
}
static void
-read_dst_symtab (objfile)
- struct objfile *objfile;
+read_dst_symtab (struct objfile *objfile)
{
char *buffer;
dst_rec_ptr_t entry, file_table, root_block;
global_block->sym[symnum] =
dst_global_symbols->symbol;
- free ((PTR) dst_global_symbols);
+ xfree (dst_global_symbols);
dst_global_symbols = nextsym;
}
dst_global_symbols = NULL;
{
element = struct_list;
struct_list = element->next;
- free ((PTR) element);
+ xfree (element);
}
}
\f
external (unswapped) format in memory; we'll swap them as we enter
them into GDB's data structures. */
static int
-init_one_section (chan, secinfo)
- int chan;
- dst_sec *secinfo;
+init_one_section (int chan, dst_sec *secinfo)
{
if (secinfo->size == 0
|| lseek (chan, secinfo->position, 0) == -1
}
static int
-init_dst_sections (chan)
- int chan;
+init_dst_sections (int chan)
{
if (!init_one_section (chan, &blocks_info) ||
struct section_offsets dst_symfile_faker =
{0};
-struct section_offsets *
-dst_symfile_offsets (objfile, addr)
- struct objfile *objfile;
- CORE_ADDR addr;
+void
+dst_symfile_offsets (struct objfile *objfile, struct section_addr_info *addrs)
{
objfile->num_sections = 1;
- return &dst_symfile_faker;
+ objfile->section_offsets = &dst_symfile_faker;
}
/* Register our ability to parse symbols for DST BFD files */
};
void
-_initialize_dstread ()
+_initialize_dstread (void)
{
add_symtab_fns (&dst_sym_fns);
}