diff options
author | Kevin Buettner <kevinb@redhat.com> | 2000-07-30 01:48:28 +0000 |
---|---|---|
committer | Kevin Buettner <kevinb@redhat.com> | 2000-07-30 01:48:28 +0000 |
commit | fba45db2faf619e71856ee38ec63949c0ef6903e (patch) | |
tree | 107efc21d2b12f54d84b59e75251449e3d5fd096 /gdb/dstread.c | |
parent | 29e6d33b03a5e39540d17bc8235573b1dac13341 (diff) | |
download | gdb-fba45db2faf619e71856ee38ec63949c0ef6903e.zip gdb-fba45db2faf619e71856ee38ec63949c0ef6903e.tar.gz gdb-fba45db2faf619e71856ee38ec63949c0ef6903e.tar.bz2 |
Protoization.
Diffstat (limited to 'gdb/dstread.c')
-rw-r--r-- | gdb/dstread.c | 116 |
1 files changed, 33 insertions, 83 deletions
diff --git a/gdb/dstread.c b/gdb/dstread.c index a5f7f35..b6f31ac 100644 --- a/gdb/dstread.c +++ b/gdb/dstread.c @@ -78,9 +78,7 @@ static void dst_record_line (int, CORE_ADDR); /* 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. */ @@ -104,7 +102,7 @@ dst_record_line (line, pc) /* 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. */ @@ -124,10 +122,7 @@ dst_start_symtab () 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; @@ -148,8 +143,7 @@ complete_symtab (name, start_addr, size) /* 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; @@ -194,8 +188,7 @@ dst_end_symtab (objfile) 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; @@ -210,10 +203,7 @@ dst_symfile_init (objfile) /* 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; @@ -252,9 +242,7 @@ static bfd *symfile_bfd; /* 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); @@ -301,8 +289,7 @@ dst_symfile_read (objfile, mainline) } static void -dst_new_init (ignore) - struct objfile *ignore; +dst_new_init (struct objfile *ignore) { /* Nothin' to do */ } @@ -313,8 +300,7 @@ dst_new_init (ignore) 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 */ } @@ -327,9 +313,7 @@ dst_symfile_finish (objfile) * 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; @@ -433,18 +417,14 @@ get_dst_line (buffer, pc) } 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; @@ -666,10 +646,7 @@ get_dst_entry (buffer, ret_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) { @@ -687,8 +664,7 @@ next_dst_entry (buffer, entry, table) 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; @@ -720,8 +696,7 @@ dst_get_addr (int section, 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; @@ -730,8 +705,7 @@ dst_sym_addr (ref) } static struct type * -create_new_type (objfile) - struct objfile *objfile; +create_new_type (struct objfile *objfile) { struct type *type; @@ -742,9 +716,7 @@ create_new_type (objfile) } 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)); @@ -761,10 +733,8 @@ create_new_symbol (objfile, name) 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; @@ -862,8 +832,7 @@ struct structure_list 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; @@ -875,11 +844,8 @@ find_dst_structure (name) 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; @@ -981,9 +947,7 @@ decode_dst_structure (objfile, entry, code, version) } 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; @@ -1047,9 +1011,7 @@ static struct symbol_list *dst_global_symbols = NULL; 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; @@ -1166,11 +1128,8 @@ decode_dst_locstring (locstr, sym) } 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; @@ -1308,11 +1267,8 @@ process_dst_symbols (objfile, entry, name, nsyms_ret) 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; @@ -1369,9 +1325,7 @@ process_dst_function (objfile, entry, name, address) } 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; @@ -1498,8 +1452,7 @@ process_dst_block (objfile, entry) 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; @@ -1595,9 +1548,7 @@ static unsigned long linetab_size; 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 @@ -1609,8 +1560,7 @@ init_one_section (chan, secinfo) } static int -init_dst_sections (chan) - int chan; +init_dst_sections (int chan) { if (!init_one_section (chan, &blocks_info) || @@ -1652,7 +1602,7 @@ static struct sym_fns dst_sym_fns = }; void -_initialize_dstread () +_initialize_dstread (void) { add_symtab_fns (&dst_sym_fns); } |