This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA] unexpected multiple location for breakpoint


> For the record, attached is the patch that I used.
[attached, this time]

-- 
Joel
diff --git a/gdb/symtab.c b/gdb/symtab.c
index 9eb3784..23707d6 100644
--- a/gdb/symtab.c
+++ b/gdb/symtab.c
@@ -4536,6 +4536,10 @@ append_exact_match_to_sals (char *filename, char *fullname, int lineno,
 		  exact = 1;
 		  append_expanded_sal (ret, objfile->pspace,
 				       symtab, lineno, item->pc);
+
+		  if (j + 1 < len
+		      && l->item[j + 1].line == lineno)
+		    j++;
 		}
 	      else if (!exact && item->line > lineno
 		       && (*best_item == NULL
@@ -4660,15 +4664,15 @@ expand_line_sal (struct symtab_and_line sal)
      at the first instruction of that line, hence we want to eliminate
      the highest address.  */
 
-  for (i = ret.nelts - 1; i >= 0; i--)
-    if (blocks[i] != NULL)
-      for (j = 0; j < ret.nelts; ++j)
-	if (j != i && filter[j] && contained_in (blocks[i], blocks[j]))
-	  {
-	    filter[i] = 0;
-	    ++deleted;
-	    break;
-	  }
+//  for (i = ret.nelts - 1; i >= 0; i--)
+//    if (blocks[i] != NULL)
+//      for (j = 0; j < ret.nelts; ++j)
+//	if (j != i && filter[j] && contained_in (blocks[i], blocks[j]))
+//	  {
+//	    filter[i] = 0;
+//	    ++deleted;
+//	    break;
+//	  }
 
   {
     struct symtab_and_line *final =

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]