* breakpoint.c, breakpoint.h (breakpoint_init_inferior): New function
[deliverable/binutils-gdb.git] / gdb / buildsym.c
index be13a9cd8ace47cadd13e968b210bedcc19a8198..256d2cecb39d479e68ebfd8898b44b490b13421f 100644 (file)
@@ -62,7 +62,7 @@ struct complaint innerblock_anon_complaint =
   {"inner block not inside outer block", 0, 0};
 
 struct complaint blockvector_complaint = 
-  {"block at 0x%x out of order", 0, 0};
+  {"block at 0x%lx out of order", 0, 0};
 
 \f
 /* maintain the lists of symbols and blocks */
@@ -348,7 +348,7 @@ make_blockvector (objfile)
              > BLOCK_START(BLOCKVECTOR_BLOCK (blockvector, i)))
            {
              complain (&blockvector_complaint, 
-                       BLOCK_START(BLOCKVECTOR_BLOCK (blockvector, i)));
+                       (unsigned long) BLOCK_START(BLOCKVECTOR_BLOCK (blockvector, i)));
            }
        }
     }
@@ -422,18 +422,15 @@ start_subfile (name, dirname)
      directives which specify a file name ending in .C.
 
      So if the filename of this subfile ends in .C, then change the language
-     of any pending subfiles from C to C++.  .cc is also accepted, even
-     though I don't think cfront allows it.  */
+     of any pending subfiles from C to C++.  We also accept any other C++
+     suffixes accepted by deduce_language_from_filename (in particular,
+     some people use .cxx with cfront).  */
 
   if (subfile->name)
     {
-      char *p;
       struct subfile *s;
 
-      p = strrchr (subfile->name, '.');
-      if (p != NULL
-         && (p[1] == 'C' && p[2] == '\0'
-             || p[1] == 'c' && p[2] == 'c' && p[3] == '\0'))
+      if (deduce_language_from_filename (subfile->name) == language_cplus)
        for (s = subfiles; s != NULL; s = s->next)
          if (s->language == language_c)
            s->language = language_cplus;
@@ -529,7 +526,8 @@ pop_subfile ()
 }
 
 \f
-/* Manage the vector of line numbers for each subfile.  */
+/* Add a linetable entry for line number LINE and address PC to the line
+   vector for SUBFILE.  */
 
 void
 record_line (subfile, line, pc)
@@ -652,7 +650,7 @@ end_symtab (end_addr, sort_pending, sort_linevec, objfile, section)
      struct objfile *objfile;
      int section;
 {
-  register struct symtab *symtab;
+  register struct symtab *symtab = NULL;
   register struct blockvector *blockvector;
   register struct subfile *subfile;
   register struct context_stack *cstk;
@@ -750,7 +748,7 @@ end_symtab (end_addr, sort_pending, sort_linevec, objfile, section)
 
   for (subfile = subfiles; subfile; subfile = nextsub)
     {
-      int linetablesize;
+      int linetablesize = 0;
       /* If we have blocks of symbols, make a symtab.
         Otherwise, just ignore this file and any line number info in it.  */
       symtab = NULL;
This page took 0.023221 seconds and 4 git commands to generate.