From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cagney To: "Insight (GDB GUI)" Subject: Missing decl and Wformat cleanups Date: Fri, 17 Sep 1999 02:59:00 -0000 Message-id: <37E210CD.20E029B2@cygnus.com> X-SW-Source: 1999-q3/msg00131.html Hello, The attached patch fixes a number of minor warnings when buiding insight: o a printf fmt / arg string mis match o the lack of declarations for a number of functions. I've stripped out the non-insight changes but have included the relevant changelog. If ok, I'll check it all in in a single hit. Andrew For reference: Fri Sep 17 19:28:17 1999 Andrew Cagney * source.c: Include "source.h". (open_source_file, find_source_lines): Move declaration from here. * source.h: New file. To here. * Makefile.in (source.o): Add dependency on source.h. * breakpoints.c (delete_command): Move declaration from here. (delete_command): To here. For Insight: Fri Sep 17 19:00:39 1999 Andrew Cagney * gdbtk-cmds.c: Include "source.h". (gdb_load_disassembly): Fix printf calls. Makefile.in (gdbtk-cmds.o): Add dependency on source.h. * gdbtk.c: Include for Itk_Init. Index: ChangeLog-gdbtk =================================================================== RCS file: /cvs/cvsfiles/devo/gdb/ChangeLog-gdbtk,v retrieving revision 2.130 diff -p -r2.130 ChangeLog-gdbtk *** ChangeLog-gdbtk 1999/09/15 20:14:51 2.130 --- ChangeLog-gdbtk 1999/09/17 09:52:29 *************** *** 1,3 **** --- 1,11 ---- + Fri Sep 17 19:00:39 1999 Andrew Cagney + + * gdbtk-cmds.c: Include "source.h". + (gdb_load_disassembly): Fix printf calls. + Makefile.in (gdbtk-cmds.o): Add dependency on source.h. + + * gdbtk.c: Include for Itk_Init. + Fri Sep 3 20:16:54 1999 Andrew Cagney * gdbtk.c (gdbtk_init): Cast ``host_name'' and ``target_name'' to Index: Makefile.in =================================================================== RCS file: /cvs/cvsfiles/devo/gdb/Makefile.in,v retrieving revision 1.705 diff -p -r1.705 Makefile.in *** Makefile.in 1999/09/16 20:55:46 1.705 --- Makefile.in 1999/09/17 09:52:33 *************** gdbtk.o: gdbtk.c gdbtk.h $(defs_h) $(sym *** 1255,1261 **** gdbtk-cmds.o: gdbtk-cmds.c gdbtk.h $(defs_h) $(symtab_h) $(inferior_h) \ $(command_h) $(bfd_h) $(top_h) symfile.h objfiles.h target.h \ ! gdb_string.h $(tracepoint_h) $(frame_h) $(CC) -c $(INTERNAL_CFLAGS) $(IDE_CFLAGS) $(ITCL_CFLAGS) \ $(TIX_CFLAGS) $(TCL_CFLAGS) $(TK_CFLAGS) $(X11_CFLAGS) \ $(GDBTK_CFLAGS) $(srcdir)/gdbtk-cmds.c \ --- 1255,1261 ---- gdbtk-cmds.o: gdbtk-cmds.c gdbtk.h $(defs_h) $(symtab_h) $(inferior_h) \ $(command_h) $(bfd_h) $(top_h) symfile.h objfiles.h target.h \ ! gdb_string.h $(tracepoint_h) $(frame_h) source.h $(CC) -c $(INTERNAL_CFLAGS) $(IDE_CFLAGS) $(ITCL_CFLAGS) \ $(TIX_CFLAGS) $(TCL_CFLAGS) $(TK_CFLAGS) $(X11_CFLAGS) \ $(GDBTK_CFLAGS) $(srcdir)/gdbtk-cmds.c \ *************** solib.o: solib.c $(command_h) $(defs_h) *** 1710,1716 **** source.o: source.c $(defs_h) $(expression_h) $(frame_h) $(gdbcmd_h) \ $(gdbcore_h) language.h objfiles.h gnu-regex.h symfile.h $(symtab_h) \ ! gdb_string.h sparc-nat.o: sparc-nat.c $(bfd_h) $(defs_h) $(inferior_h) $(gdbcore_h) \ target.h --- 1710,1716 ---- source.o: source.c $(defs_h) $(expression_h) $(frame_h) $(gdbcmd_h) \ $(gdbcore_h) language.h objfiles.h gnu-regex.h symfile.h $(symtab_h) \ ! gdb_string.h source.h sparc-nat.o: sparc-nat.c $(bfd_h) $(defs_h) $(inferior_h) $(gdbcore_h) \ target.h Index: gdbtk-cmds.c =================================================================== RCS file: /cvs/cvsfiles/devo/gdb/gdbtk-cmds.c,v retrieving revision 2.57 diff -p -r2.57 gdbtk-cmds.c *** gdbtk-cmds.c 1999/09/03 10:15:31 2.57 --- gdbtk-cmds.c 1999/09/17 09:52:55 *************** *** 27,32 **** --- 27,33 ---- #include "symtab.h" #include "inferior.h" #include "command.h" + #include "source.h" #include "bfd.h" #include "symfile.h" #include "objfiles.h" *************** gdb_load_disassembly (clientData, interp *** 2549,2558 **** char buffer[256]; Tcl_Obj *limits_obj[2]; ! sprintf (buffer, "0x%x", low); limits_obj[0] = Tcl_NewStringObj (buffer, -1); ! sprintf (buffer, "0x%x", high); limits_obj[1] = Tcl_NewStringObj (buffer, -1); Tcl_DecrRefCount (result_ptr->obj_ptr); --- 2550,2559 ---- char buffer[256]; Tcl_Obj *limits_obj[2]; ! sprintf (buffer, "0x%s", paddr_nz (low)); limits_obj[0] = Tcl_NewStringObj (buffer, -1); ! sprintf (buffer, "0x%s", paddr_nz (high)); limits_obj[1] = Tcl_NewStringObj (buffer, -1); Tcl_DecrRefCount (result_ptr->obj_ptr); Index: gdbtk.c =================================================================== RCS file: /cvs/cvsfiles/devo/gdb/gdbtk.c,v retrieving revision 2.142 diff -p -r2.142 gdbtk.c *** gdbtk.c 1999/09/14 01:54:56 2.142 --- gdbtk.c 1999/09/17 09:52:58 *************** *** 44,49 **** --- 44,50 ---- #include #include #include + #include #include "guitcl.h" #include "gdbtk.h" Index: source.c =================================================================== RCS file: /cvs/cvsfiles/devo/gdb/source.c,v retrieving revision 1.101 diff -p -r1.101 source.c *** source.c 1999/09/03 08:25:53 1.101 --- source.c 1999/09/17 09:53:02 *************** *** 23,28 **** --- 23,29 ---- #include "expression.h" #include "language.h" #include "command.h" + #include "source.h" #include "gdbcmd.h" #include "frame.h" #include "value.h" *************** *** 62,73 **** #define FDOPEN_MODE FOPEN_RT #endif /* ! defined (CRLF_SOURCE_FILES) */ - - /* Forward declarations */ - - int open_source_file PARAMS ((struct symtab *)); - - void find_source_lines PARAMS ((struct symtab *, int)); /* Prototypes for exported functions. */ --- 63,68 ----