* sysdump.c: Add missing prototypes.
* srconv.c: Likewise.
* unwind-ia64.c: Likewise.
* coffdump.c: Likewise.
* sysinfo.y: Print prototypes, include <ansidecl.h>.
* coffgrok.c: Add missing prototypes, include libiberty.h instead
of declaring xcalloc.
+2001-08-21 Andreas Jaeger <aj@suse.de>
+
+ * coffgrok.h: Add missing parameter for prototype of coff_grok.
+
+ * sysdump.c: Add missing prototypes.
+ * srconv.c: Likewise.
+ * unwind-ia64.c: Likewise.
+ * coffdump.c: Likewise.
+
+ * sysinfo.y: Print prototypes, include <ansidecl.h>.
+
+ * coffgrok.c: Add missing prototypes, include libiberty.h instead
+ of declaring xcalloc.
+
2001-08-10 H.J. Lu <hjl@gnu.org>
* nm.c (print_value): Add one arg, bfd *.
/* Coff file dumper.
- Copyright 1994, 1995, 1998, 1999, 2000 Free Software Foundation, Inc.
+ Copyright 1994, 1995, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
This file is part of GNU Binutils.
#define PROGRAM_VERSION "1.0"
static int atnl;
-static void dump_coff_scope ();
+
+static void tab PARAMS ((int));
+static void nl PARAMS ((void));
+static void dump_coff_lines PARAMS ((struct coff_line *));
+static void dump_coff_type PARAMS ((struct coff_type *));
+static void dump_coff_where PARAMS ((struct coff_where *));
+static void dump_coff_visible PARAMS ((struct coff_visible *));
+extern void dump_coff_symbol PARAMS ((struct coff_symbol *));
+static void dump_coff_scope PARAMS ((struct coff_scope *));
+static void dump_coff_sfile PARAMS ((struct coff_sfile *));
+static void dump_coff_section PARAMS ((struct coff_section *));
+extern void coff_dump PARAMS ((struct coff_ofile *));
+static void show_usage PARAMS ((FILE *, int));
+static void show_help PARAMS ((void));
+extern int main PARAMS ((int, char **));
static void
tab (x)
/* coffgrok.c
- Copyright 1994, 1995, 1997, 1998, 2000 Free Software Foundation, Inc.
+ Copyright 1994, 1995, 1997, 1998, 2000, 2001 Free Software Foundation, Inc.
This file is part of GNU Binutils.
*/
#include <bfd.h>
+#include <libiberty.h>
#include "bucomm.h"
#include "coff/internal.h"
static struct coff_ptr_struct *rawsyms;
static int rawcount;
static bfd *abfd;
-extern char *xcalloc ();
+
#define PTR_SIZE 4
#define SHORT_SIZE 2
#define INT_SIZE 4
#define INDEXOF(p) ((struct coff_ptr_struct *)(p)-(rawsyms))
+static struct coff_scope *empty_scope PARAMS ((void));
+static struct coff_symbol *empty_symbol PARAMS ((void));
+static void push_scope PARAMS ((int));
+static void pop_scope PARAMS ((void));
+static void do_sections_p1 PARAMS ((struct coff_ofile *));
+static void do_sections_p2 PARAMS ((struct coff_ofile *));
+static struct coff_where *do_where PARAMS ((int));
+static struct coff_line *do_lines PARAMS ((int, char *));
+static struct coff_type *do_type PARAMS ((int));
+static struct coff_visible *do_visible PARAMS ((int));
+static int do_define PARAMS ((int, struct coff_scope *));
+static struct coff_ofile *doit PARAMS ((void));
+
static struct coff_scope *
empty_scope ()
{
struct coff_sfile *sfile;
};
-struct coff_ofile *coff_grok();
+struct coff_ofile *coff_grok PARAMS ((bfd *));
/* srconv.c -- Sysroff conversion program
- Copyright 1994, 1995, 1996, 1998, 1999, 2000
+ Copyright 1994, 1995, 1996, 1998, 1999, 2000, 2001
Free Software Foundation, Inc.
This file is part of GNU Binutils.
static char *toolname;
static char **rnames;
-static void wr_cs ();
-static void walk_tree_scope ();
-static void wr_globals ();
-static int find_base ();
+static int get_member_id PARAMS ((int));
+static int get_ordinary_id PARAMS ((int));
+static char *section_translate PARAMS ((char *));
+static char *strip_suffix PARAMS ((char *));
+static void checksum PARAMS ((FILE *, char *, int, int));
+static void writeINT PARAMS ((int, char *, int *, int, FILE *));
+static void writeBITS PARAMS ((int, char *, int *, int));
+static void writeBARRAY PARAMS ((barray, char *, int *, int, FILE *));
+static void writeCHARS PARAMS ((char *, char *, int *, int, FILE *));
+static void wr_tr PARAMS ((void));
+static void wr_un PARAMS ((struct coff_ofile *, struct coff_sfile *, int, int));
+static void wr_hd PARAMS ((struct coff_ofile *));
+static void wr_sh PARAMS ((struct coff_ofile *, struct coff_section *));
+static void wr_ob PARAMS ((struct coff_ofile *, struct coff_section *));
+static void wr_rl PARAMS ((struct coff_ofile *, struct coff_section *));
+static void wr_object_body PARAMS ((struct coff_ofile *));
+static void wr_dps_start
+ PARAMS ((struct coff_sfile *, struct coff_section *, struct coff_scope *,
+ int, int));
+static void wr_dps_end
+ PARAMS ((struct coff_section *, struct coff_scope *, int));
+static int *nints PARAMS ((int));
+static void walk_tree_type_1
+ PARAMS ((struct coff_sfile *, struct coff_symbol *, struct coff_type *,
+ int));
+static void walk_tree_type
+ PARAMS ((struct coff_sfile *, struct coff_symbol *, struct coff_type *,
+ int));
+static void walk_tree_symbol
+ PARAMS ((struct coff_sfile *, struct coff_section *,
+ struct coff_symbol *, int));
+static void walk_tree_scope
+ PARAMS ((struct coff_section *, struct coff_sfile *, struct coff_scope *,
+ int, int));
+static void walk_tree_sfile
+ PARAMS ((struct coff_section *, struct coff_sfile *));
+static void wr_program_structure
+ PARAMS ((struct coff_ofile *, struct coff_sfile *));
+static void wr_du PARAMS ((struct coff_ofile *, struct coff_sfile *, int));
+static void wr_dus PARAMS ((struct coff_ofile *, struct coff_sfile *));
+static int find_base PARAMS ((struct coff_sfile *, struct coff_section *));
+static void wr_dln PARAMS ((struct coff_ofile *, struct coff_sfile *, int));
+static void wr_globals
+ PARAMS ((struct coff_ofile *, struct coff_sfile *, int));
+static void wr_debug PARAMS ((struct coff_ofile *));
+static void wr_cs PARAMS ((void));
+static int wr_sc PARAMS ((struct coff_ofile *, struct coff_sfile *));
+static void wr_er PARAMS ((struct coff_ofile *, struct coff_sfile *, int));
+static void wr_ed PARAMS ((struct coff_ofile *, struct coff_sfile *, int));
+static void wr_unit_info PARAMS ((struct coff_ofile *));
+static void wr_module PARAMS ((struct coff_ofile *));
+static int align PARAMS ((int));
+static void prescan PARAMS ((struct coff_ofile *));
+static void show_usage PARAMS ((FILE *, int));
+static void show_help PARAMS ((void));
+extern int main PARAMS ((int, char **));
static FILE *file;
static bfd *abfd;
return (int *) (xcalloc (sizeof (int), x));
}
-static void walk_tree_symbol ();
static void
walk_tree_type_1 (sfile, symbol, type, nest)
struct coff_sfile *sfile;
/* Sysroff object format dumper.
- Copyright 1994, 1995, 1998, 1999, 2000 Free Software Foundation, Inc.
+ Copyright 1994, 1995, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
This file is part of GNU Binutils.
static int addrsize = 4;
static FILE *file;
+static void dh PARAMS ((unsigned char *, int));
+static void itheader PARAMS ((char *, int));
+static void p PARAMS ((void));
+static void tabout PARAMS ((void));
+static void pbarray PARAMS ((barray *));
+static int getone PARAMS ((int));
+static int opt PARAMS ((int));
+static void must PARAMS ((int));
+static void tab PARAMS ((int, char *));
+static void dump_symbol_info PARAMS ((void));
+static void derived_type PARAMS ((void));
+static void module PARAMS ((void));
+static void show_usage PARAMS ((FILE *, int));
+static void show_help PARAMS ((void));
+
+extern char *getCHARS PARAMS ((unsigned char *, int *, int, int));
+extern int fillup PARAMS ((char *));
+extern barray getBARRAY PARAMS ((unsigned char *, int *, int, int));
+extern int getINT PARAMS ((unsigned char *, int *, int, int));
+extern int getBITS PARAMS ((char *, int *, int, int));
+extern void sysroff_swap_tr_in PARAMS ((void));
+extern void sysroff_print_tr_out PARAMS ((void));
+extern int main PARAMS ((int, char **));
+
char *
getCHARS (ptr, idx, size, max)
unsigned char *ptr;
}
}
-static void derived_type ();
-
static void
dump_symbol_info ()
{
printf("#ifdef SYSROFF_PRINT\n");
printf("#include <stdio.h>\n");
printf("#include <stdlib.h>\n");
+ printf("#include <ansidecl.h>\n");
break;
}
}
{
case 'd':
printf("\n\n\n#define IT_%s_CODE 0x%x\n", it,code);
+ printf("struct IT_%s;\n", it);
+ printf("extern void sysroff_swap_%s_in PARAMS ((struct IT_%s *));\n",
+ $2, it);
+ printf("extern void sysroff_swap_%s_out PARAMS ((FILE *, struct IT_%s *));\n",
+ $2, it);
+ printf("extern void sysroff_print_%s_out PARAMS ((struct IT_%s *));\n",
+ $2, it);
printf("struct IT_%s { \n", it);
break;
case 'i':
static bfd_vma unw_rlen = 0;
+static void unw_print_brmask PARAMS ((char *, unsigned char));
+static void unw_print_grmask PARAMS ((char *, unsigned char));
+static void unw_print_frmask PARAMS ((char *, long unsigned int));
+static void unw_print_abreg PARAMS ((char *, unsigned char));
+static void unw_print_xyreg PARAMS ((char *, unsigned char, unsigned char));
+
static void
unw_print_brmask (cp, mask)
char * cp;