* symtab.c (find_pc_line): Fix comments.
authorJim Kingdon <jkingdon@engr.sgi.com>
Mon, 27 Sep 1993 16:34:29 +0000 (16:34 +0000)
committerJim Kingdon <jkingdon@engr.sgi.com>
Mon, 27 Sep 1993 16:34:29 +0000 (16:34 +0000)
gdb/ChangeLog
gdb/symtab.c

index 4c12414e3ce0d807d8f20bc13d5cd051903b02c2..8497088f8b4827bf1165af51994f29ab04778863 100644 (file)
@@ -1,5 +1,7 @@
 Mon Sep 27 10:22:37 1993  Jim Kingdon  (kingdon@lioth.cygnus.com)
 
+       * symtab.c (find_pc_line): Fix comments.
+
        * remote-udi.c (udi_mourn): Don't pop target.
 
 Fri Sep 24 17:25:41 1993  Stu Grossman  (grossman at cygnus.com)
index d43cdf88698c97b01d51d65d574a3121582c9e5b..e6cbbc61100def998586440120d92a2db896a18f 100644 (file)
@@ -382,7 +382,7 @@ find_pc_psymbol (psymtab, pc)
      struct partial_symtab *psymtab;
      CORE_ADDR pc;
 {
-  struct partial_symbol *best, *p;
+  struct partial_symbol *best = NULL, *p;
   CORE_ADDR best_pc;
   
   if (!psymtab)
@@ -430,7 +430,7 @@ lookup_symbol (name, block, namespace, is_a_field_of_this, symtab)
      struct symtab **symtab;
 {
   register struct symbol *sym;
-  register struct symtab *s;
+  register struct symtab *s = NULL;
   register struct partial_symtab *ps;
   struct blockvector *bv;
   register struct objfile *objfile;
@@ -991,15 +991,7 @@ find_pc_symtab (pc)
    code in the middle of a subroutine.  To properly find the end of a line's PC
    range, we must search all symtabs associated with this compilation unit, and
    find the one whose first PC is closer than that of the next line in this
-   symtab.
-
-   FIXME:  We used to complain here about zero length or negative length line
-   tables, but there are two problems with this: (1) some symtabs may not have
-   any line numbers due to gcc -g1 compilation, and (2) this function is called
-   during single stepping, when we don't own the terminal and thus can't
-   produce any output.  One solution might be to implement a mechanism whereby
-   complaints can be queued until we regain control of the terminal.  -fnf
- */
+   symtab.  */
 
 /* If it's worth the effort, we could be using a binary search.  */
 
@@ -1065,8 +1057,12 @@ find_pc_line (pc, notcurrent)
       if (!l)
         continue;
       len = l->nitems;
-      if (len <= 0)              /* See FIXME above. */
+      if (len <= 0)
        {
+         /* I think len can be zero if the symtab lacks line numbers
+            (e.g. gcc -g1).  (Either that or the LINETABLE is NULL;
+            I'm not sure which, and maybe it depends on the symbol
+            reader).  */
          continue;
        }
 
@@ -2775,7 +2771,7 @@ make_symbol_completion_list (text, word)
   {
     char *p;
     char quote_found;
-    char *quote_pos;
+    char *quote_pos = NULL;
 
     /* First see if this is a quoted string.  */
     quote_found = '\0';
This page took 0.029446 seconds and 4 git commands to generate.