Lint
authorJohn Gilmore <gnu@cygnus>
Sun, 29 Mar 1992 23:26:47 +0000 (23:26 +0000)
committerJohn Gilmore <gnu@cygnus>
Sun, 29 Mar 1992 23:26:47 +0000 (23:26 +0000)
19 files changed:
gdb/.Sanitize
gdb/ChangeLog
gdb/c-exp.y
gdb/command.c
gdb/core.c
gdb/cplus-dem.c
gdb/elfread.c
gdb/exec.c
gdb/gdbtypes.h
gdb/language.c
gdb/m2-exp.y
gdb/mips-tdep.c
gdb/parse.c
gdb/partial-stab.h
gdb/saber.suppress
gdb/solib.c
gdb/sparc-xdep.c
gdb/utils.c
gdb/values.c

index 0377eff23aa1fc907a4ac56f1a3a35e714e8a5ee..50a1dcdb11d25d464810e71f225dc804b5315411 100644 (file)
@@ -54,6 +54,7 @@ breakpoint.h
 buildsym.c
 buildsym.h
 c-exp.y
+call-cmds.h
 coffread.c
 command.c
 command.h
index 803ef3944a9bfbd1208d7d67a2e981b2c50a72cf..e9edd523af7577c4688681f8ebbb3d626b957b9a 100644 (file)
@@ -1,3 +1,84 @@
+Sat Mar 28 22:22:06 1992  John Gilmore  (gnu at cygnus.com)
+
+       Create and use macros for iterating on symtabs, psymtabs, msymbols.
+
+       * minsyms.c (iterate_over_msymbols):  Remove; clunky and slow.
+       * symfile.h, symtab.h (iterate_over_msymbols):  Remove prototype
+       * coffread.c (coff_symfile_read):  iterate_over_symtabs => ALL_SYMTABS.
+       (patch_opaque_types):  Avoid dummy args and result.
+       * objfiles.c (have_partial_symbols, have_full_symbols,
+       have_minimal_symbols):  explicit iteration => ALL_OBJFILES; simplify.
+       (iterate_over_objfiles, iterate_over_symtabs,
+       iterate_over_psymtabs):  Remove, clunky and slow.
+       * objfiles.h:  Replace iterate_over_* prototypes with ALL_SYMTABS,
+       ALL_PSYMTABS, and ALL_MSYMBOLS macros.
+       * symmisc.c (dump_symtab, dump_psymtab, dump_msymbols,
+       dump_objfile):  Remove dummy args and results.  Move filename
+       comparisons to callers.
+       (printsyms_command, printpsyms_command, printmsyms_command,
+       printobjfiles_command):  iterate_over_* => ALL_*.  Compare filenames.
+       * symtab.c (lookup_symtab_1, lookup_symtab, lookup_partial_symtab,
+       lookup_symbol, find_main_psymtab, find_pc_symtab, sources_info,
+       list_symbols, make_symbol_completion_list):  Replace explicit
+       iteration with ALL_SYMTABS, ALL_PSYMTABS, or ALL_MSYMBOLS.
+       Eliminate Dijkstra flag crap, break out of loops with gotos.
+       (lookup_symtab_1):  Protect '/' tests from short filenames.
+       (cplus_mangled_symbol):  Move inline into lookup_symbol.
+       * xcoffexec.c (relocate_objfile_msymbols):  Remove poor hack.
+       (relocate_minimal_symbol):  Move inline to vmap_symtab.
+       (vmap_symtab):  Replace iteration with ALL_OBJFILES,
+       iterate_over_msymbols with ALL_MSYMBOLS.
+
+       Misc cleanup prior to release.
+
+       * Makefile.in (VERSION):  Roll to 4.4.7.
+       (HFILES):  Add call-cmds.h.
+       * call-cmds.h:  New header for command fns called by other files.
+       * breakpoint.c (watchpoints_info):  Remove, same as breakpoints_info.
+       (breakpoint_1):  Remove unused type arg.  Change callers.
+
+       * dwarfread.c (dwarf_build_psymtabs):  Remove mainline test.
+       * mipsread.c (compare_symtabs, compare_psymtabs):  Remove, unused.
+       * mipsread.c:  Add prototypes for all static functions.
+
+       * symmisc.c (dump_symtab_lines, dump_symtabs, dump_last_symtab,
+       dump_blockvector, dump_block, dump_addrchass, dump_namespace,
+       dump_symbol, dump_type, dump_linetable, dump_strtbl):  Remove, unused.
+       * xcoffread.c (dump_symtab_lines, dump_symtabs, dump_last_symtab,
+       dump_blockvector, dump_block, dump_addrchass, dump_namespace,
+       dump_symbol, dump_type, dump_linetable, dump_strtbl):  Remove 2nd
+       unused copy!
+
+       * buildsym.c (define_symbol):  Handle global register variables
+       (from Pierre Willard).  Complain if register numbers are too large.
+       * target.c (nomemory):  Now that higher levels examine errno, give EIO.
+       * tm-sparc.h:  Don't #include <sun4/reg.h>.
+       * sparc-tdep.c (sparc_frame_chain, frame_saved_pc):  Remove
+       dependency on <sun4/reg.h>.  Start to handle cross-byte-order.
+
+       * language.h:  Avoid forward enum declaration.
+       * configure.in, tm-sun4os5.h, xm-sun4os5.h, config/sun4os5.mh,
+       config/sun4os5.mt:  New host and target.
+       * defs.h (errno): #include <errno.h> rather than assuming int.
+       From Pierre Willard.
+
+       * breakpoint.c, breakpoint.h, buildsym.c, coffread.c, cplus-dem.c,
+       dbxread.c, dwarfread.c, elfread.c, infcmd.c, infrun.c, inftarg.c,
+       language.c, main.c, mem-break.c, mips-tdep.c, mipsread.c,
+       partial-stab.h, remote.c, saber.suppress, symfile.c, symtab.c,
+       valops.c, valprint.c, xcoffread.c, c-exp.y, m2-exp.y, blockframe.c,
+       command.c, core.c, exec.c, gdbtypes.h, parse.c, printcmd.c, solib.c,
+       sparc-xdep.c, utils.c, value.h, values.c:  Lint.
+
+Sat Mar 28 02:43:26 1992  John Gilmore  (gnu at cygnus.com)
+
+       * buildsym.c (read_range_type):  Avoid int overflow by using unsigned.
+       * dbxread.c (dbx_symfile_init):  Remove bogus `lvalue cast'.
+       * language.h (enum exp_opcode):  Avoid forward enum def.
+       * main.c (define_command, user_defined_command):  Lint.
+       * mem-break.c, xcoffread.c:  Lint.
+       * solib.c:  Only #include <a.out.h> on SunOS, not SVR4.
+
 Sun Mar 29 14:16:22 1992  Per Bothner  (bothner@cygnus.com)
 
        * Merged in latest RS6000 diffs from Metin G. Ozisik.
index 7183fe7b44ca94af62ad52c9aa2ac9603024b418..865b021471637020b8c565eb607490a4fe4708b2 100644 (file)
@@ -75,10 +75,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
 #define        yyval   c_val
 #define        yylloc  c_lloc
 
-static void
-__yy_bcopy PARAMS ((char *, char *, int));
-
-int
 yyparse PARAMS ((void));
 
 int
@@ -807,7 +803,7 @@ array_mod:  '[' ']'
 func_mod:      '(' ')'
                        { $$ = 0; }
        |       '(' nonempty_typelist ')'
-                       { free ($2); $$ = 0; }
+                       { free ((PTR)$2); $$ = 0; }
        ;
 
 type   :       ptype
@@ -821,7 +817,7 @@ type        :       ptype
        |       type '(' typebase COLONCOLON '*' ')' '(' nonempty_typelist ')'
                        { $$ = lookup_member_type
                            (lookup_function_type ($1), $3);
-                         free ($8); }
+                         free ((PTR)$8); }
        ;
 
 typebase
index f39600ee0298d6ed1ea1f3334a59773b8519e03d..f5e0cec2d9a836a016727c45f5d28570012bd894 100644 (file)
@@ -262,7 +262,7 @@ delete_cmd (name, list)
   while (*list && !strcmp ((*list)->name, name))
     {
       p = (*list)->next;
-      free (*list);
+      free ((PTR)*list);
       *list = p;
     }
 
@@ -272,7 +272,7 @@ delete_cmd (name, list)
        if (!strcmp (c->next->name, name))
          {
            p = c->next->next;
-           free (c->next);
+           free ((PTR)c->next);
            c->next = p;
          }
        else
@@ -415,7 +415,7 @@ print_doc_line (stream, str)
   if (p - str > line_size - 1)
     {
       line_size = p - str + 1;
-      free (line_buffer);
+      free ((PTR)line_buffer);
       line_buffer = (char *) xmalloc (line_size);
     }
   strncpy (line_buffer, str, p - str);
@@ -921,7 +921,7 @@ complete_on_cmdlist (list, text)
 
   if (matches == 0)
     {
-      free (matchlist);
+      free ((PTR)matchlist);
       matchlist = 0;
     }
   else
index 72fb5fe87eb6d3f511a2f5436ce0778010ec5699..6adf246f56d5ace11c2d528d954cdca2d099c253 100644 (file)
@@ -83,7 +83,7 @@ core_close (quitting)
     CLEAR_SOLIB ();
 #endif
     if (core_ops.to_sections) {
-      free (core_ops.to_sections);
+      free ((PTR)core_ops.to_sections);
       core_ops.to_sections = NULL;
       core_ops.to_sections_end = NULL;
     }
index 4c5a2f68890511701a0e2411e057ff2d76c4fd4d..bc3b27c9b7fe947b6cc293a91f63e4f113c4c480 100644 (file)
@@ -443,7 +443,6 @@ cplus_demangle (type, arg_mode)
       p += 1;
       {
        int r, i;
-       int non_empty = 0;
        string tname;
        string trawname;
        
index 99cf1adce6db5eacfcde4b7817da96ad96690770..db66a2510e5c82b5a87f15a011ea6a4d9e3c662d 100644 (file)
@@ -40,6 +40,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
 #include "symtab.h"
 #include "symfile.h"
 #include "objfiles.h"
+#include "buildsym.h"
 
 #define STREQ(a,b) (strcmp((a),(b))==0)
 
@@ -63,7 +64,7 @@ static void
 elf_symfile_finish PARAMS ((struct objfile *));
 
 static void
-elf_symtab_read PARAMS ((bfd *,  CORE_ADDR, int, struct objfile *));
+elf_symtab_read PARAMS ((bfd *,  CORE_ADDR, struct objfile *));
 
 static void
 record_minimal_symbol PARAMS ((char *, CORE_ADDR, enum minimal_symbol_type,
@@ -86,8 +87,8 @@ elf_locate_sections PARAMS ((bfd *, asection *, PTR));
    FIXME:  The section names should not be hardwired strings. */
 
 static void
-elf_locate_sections (abfd, sectp, eip)
-     bfd *abfd;
+elf_locate_sections (ignore_abfd, sectp, eip)
+     bfd *ignore_abfd;
      asection *sectp;
      PTR eip;
 {
@@ -173,7 +174,7 @@ LOCAL FUNCTION
 
 SYNOPSIS
 
-       void elf_symtab_read (bfd *abfd, CORE_ADDR addr, int mainline,
+       void elf_symtab_read (bfd *abfd, CORE_ADDR addr,
                              struct objfile *objfile)
 
 DESCRIPTION
@@ -186,10 +187,9 @@ DESCRIPTION
 */
 
 static void
-elf_symtab_read (abfd, addr, mainline, objfile)
+elf_symtab_read (abfd, addr, objfile)
      bfd *abfd;
      CORE_ADDR addr;
-     int mainline;
      struct objfile *objfile;
 {
   unsigned int storage_needed;
@@ -287,7 +287,7 @@ elf_symfile_read (objfile, addr, mainline)
 
   /* Process the normal ELF symbol table first. */
 
-  elf_symtab_read (abfd, addr, mainline, objfile);
+  elf_symtab_read (abfd, addr, objfile);
 
   /* Now process the DWARF debugging information, which is contained in
      special ELF sections.  We first have to find them... */
@@ -326,8 +326,8 @@ elf_symfile_read (objfile, addr, mainline)
    just a stub. */
 
 static void
-elf_new_init (objfile)
-     struct objfile *objfile;
+elf_new_init (ignore)
+     struct objfile *ignore;
 {
   buildsym_new_init ();
 }
@@ -357,8 +357,8 @@ elf_symfile_finish (objfile)
    just a stub. */
 
 static void
-elf_symfile_init (objfile)
-     struct objfile *objfile;
+elf_symfile_init (ignore)
+     struct objfile *ignore;
 {
 }
 
index 33e5e72b1a794e45d05425603336c2ce65dd820e..eb6a85a12ce185e7c98829982c0ed443509aca4b 100644 (file)
@@ -1,5 +1,5 @@
 /* Work with executable files, for GDB. 
-   Copyright 1988, 1989, 1991 Free Software Foundation, Inc.
+   Copyright 1988, 1989, 1991, 1992 Free Software Foundation, Inc.
 
 This file is part of GDB.
 
@@ -17,7 +17,6 @@ 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.  */
 
-#include <stdio.h>
 #include "defs.h"
 #include "frame.h"
 #include "inferior.h"
@@ -37,9 +36,24 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
 #include <ctype.h>
 #include <sys/stat.h>
 
-extern char *getenv();
-extern void child_create_inferior (), child_attach ();
-extern void symbol_file_command ();
+/* Prototypes for local functions */
+
+static void
+add_to_section_table PARAMS ((bfd *, sec_ptr, PTR));
+
+static void
+exec_close PARAMS ((int));
+
+static void
+file_command PARAMS ((char *, int));
+
+static void
+set_section_command PARAMS ((char *, int));
+
+static void
+exec_files_info PARAMS ((struct target_ops *));
+
+extern int info_verbose;
 
 /* The Binary File Descriptor handle for the executable file.  */
 
@@ -61,7 +75,7 @@ CORE_ADDR text_end   = 0;
 extern struct target_ops exec_ops;
 
 /* ARGSUSED */
-void
+static void
 exec_close (quitting)
      int quitting;
 {
@@ -69,18 +83,27 @@ exec_close (quitting)
     bfd_close (exec_bfd);
     exec_bfd = NULL;
   }
-  if (exec_ops.sections) {
-    free (exec_ops.sections);
-    exec_ops.sections = NULL;
-    exec_ops.sections_end = NULL;
+  if (exec_ops.to_sections) {
+    free ((PTR)exec_ops.to_sections);
+    exec_ops.to_sections = NULL;
+    exec_ops.to_sections_end = NULL;
   }
 }
 
+/*  Process the first arg in ARGS as the new exec file.
+
+    Note that we have to explicitly ignore additional args, since we can
+    be called from file_command(), which also calls symbol_file_command()
+    which can take multiple args. */
+
 void
-exec_file_command (filename, from_tty)
-     char *filename;
+exec_file_command (args, from_tty)
+     char *args;
      int from_tty;
 {
+  char **argv;
+  char *filename;
+
   target_preopen (from_tty);
 
   /* Remove any previous exec file.  */
@@ -88,12 +111,27 @@ exec_file_command (filename, from_tty)
 
   /* Now open and digest the file the user requested, if any.  */
 
-  if (filename)
+  if (args)
     {
       char *scratch_pathname;
       int scratch_chan;
       
-      filename = tilde_expand (filename);
+      /* Scan through the args and pick up the first non option arg
+        as the filename. */
+
+      if ((argv = buildargv (args)) == NULL)
+       {
+         nomem (0);
+       }
+      make_cleanup (freeargv, (char *) argv);
+
+      for (; (*argv != NULL) && (**argv == '-'); argv++) {;}
+      if (*argv == NULL)
+       {
+         error ("no exec file name was specified");
+       }
+
+      filename = tilde_expand (*argv);
       make_cleanup (free, filename);
       
       scratch_chan = openp (getenv ("PATH"), 1, filename, 
@@ -110,8 +148,8 @@ exec_file_command (filename, from_tty)
        error ("\"%s\": not in executable format: %s.",
               scratch_pathname, bfd_errmsg (bfd_error));
 
-      if (build_section_table (exec_bfd, &exec_ops.sections,
-                               &exec_ops.sections_end))
+      if (build_section_table (exec_bfd, &exec_ops.to_sections,
+                               &exec_ops.to_sections_end))
        error ("Can't find the file sections in `%s': %s", 
                exec_bfd->filename, bfd_errmsg (bfd_error));
 
@@ -120,7 +158,7 @@ exec_file_command (filename, from_tty)
         (29K springs to mind) need this info for now.  */
       {
        struct section_table *p;
-       for (p = exec_ops.sections; p < exec_ops.sections_end; p++)
+       for (p = exec_ops.to_sections; p < exec_ops.to_sections_end; p++)
          if (!strcmp (".text", bfd_section_name (p->bfd, p->sec_ptr)))
            {
              text_start = p->addr;
@@ -146,7 +184,7 @@ exec_file_command (filename, from_tty)
    What a novelty.  Why did GDB go through four major releases before this
    command was added?  */
 
-void
+static void
 file_command (arg, from_tty)
      char *arg;
      int from_tty;
@@ -162,11 +200,11 @@ file_command (arg, from_tty)
    table_pp_char is a char * to get it through bfd_map_over_sections;
    we cast it back to its proper type.  */
 
-void
+static void
 add_to_section_table (abfd, asect, table_pp_char)
      bfd *abfd;
      sec_ptr asect;
-     char *table_pp_char;
+     PTR table_pp_char;
 {
   struct section_table **table_pp = (struct section_table **)table_pp_char;
   flagword aflag;
@@ -184,6 +222,9 @@ add_to_section_table (abfd, asect, table_pp_char)
   (*table_pp)++;
 }
 
+/* Builds a section table, given args BFD, SECTABLE_PTR, SECEND_PTR.
+   Returns 0 if OK, 1 on error.  */
+
 int
 build_section_table (some_bfd, start, end)
      bfd *some_bfd;
@@ -195,7 +236,7 @@ build_section_table (some_bfd, start, end)
   if (count == 0)
     abort();   /* return 1? */
   if (*start)
-    free (*start);
+    free ((PTR)*start);
   *start = (struct section_table *) xmalloc (count * sizeof (**start));
   *end = *start;
   bfd_map_over_sections (some_bfd, add_to_section_table, (char *)end);
@@ -234,7 +275,7 @@ xfer_memory (memaddr, myaddr, len, write, target)
   boolean res;
   struct section_table *p;
   CORE_ADDR nextsectaddr, memend;
-  boolean (*xfer_fn) ();
+  boolean (*xfer_fn) PARAMS ((bfd *, sec_ptr, PTR, file_ptr, bfd_size_type));
 
   if (len <= 0)
     abort();
@@ -243,7 +284,7 @@ xfer_memory (memaddr, myaddr, len, write, target)
   xfer_fn = write? bfd_set_section_contents: bfd_get_section_contents;
   nextsectaddr = memend;
 
-  for (p = target->sections; p < target->sections_end; p++)
+  for (p = target->to_sections; p < target->to_sections_end; p++)
     {
       if (p->addr <= memaddr)
        if (p->endaddr >= memend)
@@ -289,23 +330,38 @@ xfer_memory (memaddr, myaddr, len, write, target)
 #endif                         /* REG_STACK_SEGMENT */
 #endif FIXME
 \f
-static void
-exec_files_info ()
+void
+print_section_info (t, abfd)
+  struct target_ops *t;
+  bfd *abfd;
 {
   struct section_table *p;
 
-  printf_filtered ("\t`%s', ", bfd_get_filename(exec_bfd));
+  printf_filtered ("\t`%s', ", bfd_get_filename(abfd));
   wrap_here ("        ");
-  printf_filtered ("file type %s.\n", bfd_get_target(exec_bfd));
+  printf_filtered ("file type %s.\n", bfd_get_target(abfd));
 
-  for (p = exec_ops.sections; p < exec_ops.sections_end; p++) {
+  for (p = t->to_sections; p < t->to_sections_end; p++) {
     printf_filtered ("\t%s", local_hex_string_custom (p->addr, "08"));
-    printf_filtered (" - %s is %s\n",
-       local_hex_string_custom (p->endaddr, "08"),
-       bfd_section_name (exec_bfd, p->sec_ptr));
+    printf_filtered (" - %s", local_hex_string_custom (p->endaddr, "08"));
+    if (info_verbose)
+      printf_filtered (" @ %s",
+                      local_hex_string_custom (p->sec_ptr->filepos, "08"));
+    printf_filtered (" is %s", bfd_section_name (p->bfd, p->sec_ptr));
+    if (p->bfd != abfd) {
+      printf_filtered (" in %s", bfd_get_filename (p->bfd));
+    }
+    printf_filtered ("\n");
   }
 }
 
+static void
+exec_files_info (t)
+  struct target_ops *t;
+{
+  print_section_info (t, exec_bfd);
+}
+
 static void
 set_section_command (args, from_tty)
      char *args;
@@ -328,13 +384,14 @@ set_section_command (args, from_tty)
   /* Parse out new virtual address */
   secaddr = parse_and_eval_address (args);
 
-  for (p = exec_ops.sections; p < exec_ops.sections_end; p++) {
+  for (p = exec_ops.to_sections; p < exec_ops.to_sections_end; p++) {
     if (!strncmp (secname, bfd_section_name (exec_bfd, p->sec_ptr), seclen)
        && bfd_section_name (exec_bfd, p->sec_ptr)[seclen] == '\0') {
       offset = secaddr - p->addr;
       p->addr += offset;
       p->endaddr += offset;
-      exec_files_info();
+      if (from_tty)
+       exec_files_info(&exec_ops);
       return;
     }
   } 
@@ -357,7 +414,7 @@ Specify the filename of the executable file.",
        0, 0, /* insert_breakpoint, remove_breakpoint, */
        0, 0, 0, 0, 0, /* terminal stuff */
        0, 0, /* kill, load */
-       0, 0, /* call fn, lookup sym */
+       0, /* lookup sym */
        child_create_inferior,
        0, /* mourn_inferior */
        file_stratum, 0, /* next */
index 293b4175ab3cc645e19779c7a67e5e8de019c06d..3594f8f05272393917a7efdbe9979e6e8381f958 100644 (file)
@@ -540,6 +540,9 @@ lookup_template_type PARAMS ((char *, struct type *, struct block *));
 extern struct type *
 lookup_fundamental_type PARAMS ((struct objfile *, int));
 
+extern void
+fill_in_vptr_fieldno PARAMS ((struct type *));
+
 /* printcmd.c */
 
 extern void
index 01ed270d94731d015aa13050bc69270f78cc5761..3ad413606b7709427808db8efdc99a3905e5372b 100644 (file)
@@ -992,8 +992,8 @@ set_check (ignore, from_tty)
 }
 
 static void
-show_check (arg, from_tty)
-   char *arg;
+show_check (ignore, from_tty)
+   char *ignore;
    int from_tty;
 {
    cmd_show_list(showchecklist, from_tty, "");
index c68ca6be8ca8a3ff8a05cb17182b87a69be4c10a..2657eb971e4338de395081c76b3098f23fda0de3 100644 (file)
@@ -76,8 +76,10 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
 #define        yyval   m2_val
 #define        yylloc  m2_lloc
 
+#if 0
 static char *
 make_qualname PARAMS ((char *, char *));
+#endif
 
 static int
 parse_number PARAMS ((int));
@@ -88,9 +90,6 @@ yylex PARAMS ((void));
 static void
 yyerror PARAMS ((char *));
 
-static void
-__yy_bcopy PARAMS ((char *, char *, int));
-
 int
 yyparse PARAMS ((void));
 
@@ -1141,6 +1140,7 @@ yylex ()
  }
 }
 
+#if 0          /* Unused */
 static char *
 make_qualname(mod,ident)
    char *mod, *ident;
@@ -1152,7 +1152,7 @@ make_qualname(mod,ident)
    strcat(new,ident);
    return new;
 }
-
+#endif  /* 0 */
 
 static void
 yyerror(msg)
index 2a21b88e0c4f5ab260177886284dade44e881bad..ef221018a8acca8eaa084f1a0daee66f869cf353 100644 (file)
@@ -247,7 +247,7 @@ find_proc_desc(pc, next_frame)
        /* IF this is the topmost frame AND
         * (this proc does not have debugging information OR
         * the PC is in the procedure prologue)
-        * THEN create a "hueristic" proc_desc (by analyzing
+        * THEN create a "heuristic" proc_desc (by analyzing
         * the actual code) to replace the "official" proc_desc.
         */
        proc_desc = (struct mips_extra_func_info *)sym->value.value;
@@ -289,7 +289,8 @@ FRAME_ADDR mips_frame_chain(frame)
 {
     mips_extra_func_info_t proc_desc;
     CORE_ADDR saved_pc = FRAME_SAVED_PC(frame);
-    if (current_objfile->ei.entry_file_lowpc)
+
+    if (symfile_objfile->ei.entry_file_lowpc)
       { /* has at least the __start symbol */
        if (saved_pc == 0 || inside_entry_file (saved_pc)) return 0;
       }
@@ -767,7 +768,8 @@ fill_fpregset (fpregsetp, regno)
    itself if the code at PC does not look like a function prologue,
    PC+4 if it does (our caller does not need anything more fancy). */
 
-CORE_ADDR mips_skip_prologue(pc)
+CORE_ADDR
+mips_skip_prologue(pc)
      CORE_ADDR pc;
 {
     struct symbol *f;
index 334733c4631922bf5e7c539f04b084d054c2277a..c8fc9b730598df4a54517f1e5bd77bb799614009 100644 (file)
@@ -92,7 +92,7 @@ end_arglist ()
   register struct funcall *call = funcall_chain;
   funcall_chain = call->next;
   arglist_len = call->arglist_len;
-  free (call);
+  free ((PTR)call);
   return val;
 }
 
@@ -107,7 +107,7 @@ free_funcalls ()
   for (call = funcall_chain; call; call = next)
     {
       next = call->next;
-      free (call);
+      free ((PTR)call);
     }
 }
 \f
index ba4a307e9094e8a3bd8f7c36558f8973d6737e77..554fe1a8a2a10d2105d6608e8021f3371ae17ff4 100644 (file)
@@ -234,8 +234,8 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
              psymtab_include_list = (char **)
                alloca ((includes_allocated *= 2) *
                        sizeof (char *));
-             bcopy (orig, psymtab_include_list,
-                    includes_used * sizeof (char *));
+             memcpy ((PTR)psymtab_include_list, (PTR)orig,
+                     includes_used * sizeof (char *));
            }
 
 #endif /* DBXREAD_ONLY */
@@ -278,8 +278,8 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
              psymtab_include_list = (char **)
                alloca ((includes_allocated *= 2) *
                        sizeof (char *));
-             bcopy (orig, psymtab_include_list,
-                    includes_used * sizeof (char *));
+             memcpy ((PTR)psymtab_include_list, (PTR)orig,
+                     includes_used * sizeof (char *));
            }
          continue;
 
@@ -525,7 +525,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
                      (struct partial_symtab **)
                        alloca ((dependencies_allocated *= 2)
                                * sizeof (struct partial_symtab *));
-                   bcopy (orig, dependency_list,
+                   memcpy ((PTR)dependency_list, (PTR)orig,
                           (dependencies_used
                            * sizeof (struct partial_symtab *)));
 #ifdef DEBUG_INFO
index 7ea1a864897d24481eabf91b1e042b107b67f99e..2ad0c3885ab8bbfcf8f4bd22927d1aadabf99c45 100644 (file)
@@ -190,6 +190,8 @@ suppress 70 on fatal
 /* Passing illegal enumeration value */
 suppress 70 on error 
 /* Passing illegal enumeration value */
+suppress 80 on first_link_map_member 
+/* Returning invalid pointer */
 suppress 110 in printf_filtered 
 /* Signed/unsigned memory retrieval */
 suppress 110 in fprintf_filtered 
@@ -246,6 +248,8 @@ suppress 529 in do_registers_info
 /* Statement not reached */
 suppress 529 in value_from_register 
 /* Statement not reached */
+suppress 529 in solib_create_inferior_hook 
+/* Constant in conditional */
 suppress 530 
 /* Empty body of statement */
 suppress 546 in net_quit 
@@ -262,6 +266,8 @@ suppress 546 in value_equal
 /* Function exits through bottom */
 suppress 546 in unpack_long 
 /* Function exits through bottom */
+suppress 558 in solib_create_inferior_hook 
+/* Constant in conditional */
 suppress 558 in read_range_type 
 /* Constant in conditional */
 suppress 558 in process_one_symbol 
@@ -280,6 +286,16 @@ suppress 558 in do_registers_info
 /* Constant in conditional */
 suppress 558 in value_from_register 
 /* Constant in conditional */
+suppress 558 in add_enum_psymbol 
+/* Constant in conditional */
+suppress 558 in add_partial_symbol 
+/* Constant in conditional */
+suppress 558 mfree.c
+/* Constant in conditional */
+suppress 558 mmalloc.c
+/* Constant in conditional */
+suppress 558 mrealloc.c
+/* Constant in conditional */
 suppress 560 in solib_address 
 /* Assignment within conditional */
 suppress 560 in solib_info 
@@ -396,7 +412,7 @@ suppress 590 on ignore_symbols
 /* Formal param not used */
 suppress 590 on signo
 /* Formal param not used */
-suppress 652 in ../bfd/libaout.h
+suppress 652
 /* The declaration has no effect */
 suppress 442 in ../bfd/archive.c
 /* Escape sequence in string literal has null value */
index f2f646d17f00e4fab48852a5eed1b2330f663a49..6dc657269f17c2c890d68d0fbb0790bf07bb6274 100644 (file)
@@ -26,11 +26,16 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
 #include <link.h>
 #include <sys/param.h>
 #include <fcntl.h>
-#include <a.out.h>
+
+#ifndef SVR4_SHARED_LIBS
+ /* SunOS shared libs need the nlist structure.  */
+#include <a.out.h> 
+#endif
 
 #include "symtab.h"
 #include "bfd.h"
 #include "symfile.h"
+#include "objfiles.h"
 #include "gdbcore.h"
 #include "command.h"
 #include "target.h"
@@ -124,16 +129,18 @@ first_link_map_member PARAMS ((void));
 static CORE_ADDR
 locate_base PARAMS ((void));
 
+static void
+solib_map_sections PARAMS ((struct so_list *));
+
+#ifdef SVR4_SHARED_LIBS
+
 static int
 look_for_base PARAMS ((int, CORE_ADDR));
 
 static CORE_ADDR
 bfd_lookup_symbol PARAMS ((bfd *, char *));
 
-static void
-solib_map_sections PARAMS ((struct so_list *));
-
-#ifndef SVR4_SHARED_LIBS
+#else
 
 static void
 solib_add_common_symbols PARAMS ((struct rtc_symb *, struct objfile *));
@@ -287,6 +294,8 @@ solib_add_common_symbols (rtc_symp, objfile)
 
 #endif /* SVR4_SHARED_LIBS */
 
+#ifdef SVR4_SHARED_LIBS
+
 /*
 
 LOCAL FUNCTION
@@ -329,8 +338,8 @@ bfd_lookup_symbol (abfd, symname)
 
   if (storage_needed > 0)
     {
-      symbol_table = (asymbol **) bfd_xmalloc (storage_needed);
-      back_to = make_cleanup (free, symbol_table);
+      symbol_table = (asymbol **) xmalloc (storage_needed);
+      back_to = make_cleanup (free, (PTR)symbol_table);
       number_of_symbols = bfd_canonicalize_symtab (abfd, symbol_table); 
   
       for (i = 0; i < number_of_symbols; i++)
@@ -430,6 +439,8 @@ look_for_base (fd, baseaddr)
   return (1);
 }
 
+#endif
+
 /*
 
 LOCAL FUNCTION
@@ -867,14 +878,14 @@ clear_solib()
     {
       if (so_list_head -> sections)
        {
-         free (so_list_head -> sections);
+         free ((PTR)so_list_head -> sections);
        }
       if (so_list_head -> so_bfd)
        {
          bfd_close (so_list_head -> so_bfd);
        }
       next = so_list_head -> next;
-      free(so_list_head);
+      free((PTR)so_list_head);
       so_list_head = next;
     }
   debug_base = 0;
@@ -1106,11 +1117,6 @@ FIXME
 void 
 solib_create_inferior_hook()
 {
-  CORE_ADDR debug_addr;
-  int in_debugger;
-  CORE_ADDR in_debugger_addr;
-  CORE_ADDR breakpoint_addr;
-  int i, j;
   
   if ((debug_base = locate_base ()) == 0)
     {
index 7fabdab9a02f30fb3cdd897508665772e5a85c0d..327388ebfb5ea35caf3c60b72b0c631b238580d0 100644 (file)
@@ -242,11 +242,11 @@ store_inferior_registers (regno)
 }
 \f
 void
-fetch_core_registers (core_reg_sect, core_reg_size, which, reg_addr)
+fetch_core_registers (core_reg_sect, core_reg_size, which, ignore)
   char *core_reg_sect;
   unsigned core_reg_size;
   int which;
-  unsigned int reg_addr;       /* Unused in this version */
+  unsigned int ignore; /* reg addr, unused in this version */
 {
 
   if (which == 0) {
index 974f2ce374f61d4700cb160c45e39904d1afe92d..e4e7bedab9a1280209b161b00f15528d60799530 100644 (file)
@@ -144,7 +144,7 @@ discard_cleanups (old_chain)
   while ((ptr = cleanup_chain) != old_chain)
     {
       cleanup_chain = ptr->next;
-      free (ptr);
+      free ((PTR)ptr);
     }
 }
 
index 3dc1accff4c2a6bf13221c4e31e3d034753d90b4..998c42eac847fe4f6283a72e1d23bcfb07e7be46 100644 (file)
@@ -312,9 +312,9 @@ clear_value_history ()
     {
       for (i = 0; i < VALUE_HISTORY_CHUNK; i++)
        if (val = value_history_chain->values[i])
-         free (val);
+         free ((PTR)val);
       next = value_history_chain->next;
-      free (value_history_chain);
+      free ((PTR)value_history_chain);
       value_history_chain = next;
     }
   value_history_count = 0;
@@ -450,7 +450,7 @@ set_internalvar (var, val)
     SET_TRAPPED_INTERNALVAR (var, val, 0, 0, 0);
 #endif
 
-  free (var->value);
+  free ((PTR)var->value);
   var->value = value_copy (val);
   release_value (var->value);
 }
@@ -474,9 +474,9 @@ clear_internalvars ()
     {
       var = internalvars;
       internalvars = var->next;
-      free (var->name);
-      free (var->value);
-      free (var);
+      free ((PTR)var->name);
+      free ((PTR)var->value);
+      free ((PTR)var);
     }
 }
 
This page took 0.042935 seconds and 4 git commands to generate.