packages: gdb/gdb-6.3-test-pie-20050107.patch, gdb/gdb-6.6-buildid-locate.p...

cactus cactus at pld-linux.org
Tue Dec 8 02:53:16 CET 2009


Author: cactus                       Date: Tue Dec  8 01:53:16 2009 GMT
Module: packages                      Tag: HEAD
---- Log message:
- up to 7.0 from Fedora rel 0.5

---- Files affected:
packages/gdb:
   gdb-6.3-test-pie-20050107.patch (1.2 -> 1.3) , gdb-6.6-buildid-locate.patch (1.3 -> 1.4) , gdb-archer.patch (1.3 -> 1.4) , gdb.spec (1.115 -> 1.116) , gdb-6.3-bz182116-exec-from-pthread.patch (NONE -> 1.1)  (NEW), gdb-6.3-ia64-corefile-fix-20050127.patch (NONE -> 1.1)  (NEW), gdb-7.0-upstream.patch (NONE -> 1.1)  (NEW), gdb-archer-pie-addons.patch (NONE -> 1.1)  (NEW), gdb-archer-pie.patch (NONE -> 1.1)  (NEW), gdb-bz528668-symfile-cleanup.patch (NONE -> 1.1)  (NEW), gdb-bz528668-symfile-multi.patch (NONE -> 1.1)  (NEW), gdb-bz528668-symfile-sepcrc.patch (NONE -> 1.1)  (NEW), gdb-bz538626-bp_location-accel-bp-cond.patch (NONE -> 1.1)  (NEW), gdb-bz539590-gnu-ifunc.patch (NONE -> 1.1)  (NEW), gdb-core-open-vdso-warning.patch (NONE -> 1.1)  (NEW), gdb-readline-6.0-signal.patch (NONE -> 1.1)  (NEW), gdb-x86_64-i386-syscall-restart.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: packages/gdb/gdb-6.3-test-pie-20050107.patch
diff -u packages/gdb/gdb-6.3-test-pie-20050107.patch:1.2 packages/gdb/gdb-6.3-test-pie-20050107.patch:1.3
--- packages/gdb/gdb-6.3-test-pie-20050107.patch:1.2	Tue Dec  8 00:29:15 2009
+++ packages/gdb/gdb-6.3-test-pie-20050107.patch	Tue Dec  8 02:53:10 2009
@@ -436,7 +436,7 @@
 ===================================================================
 --- /dev/null	1970-01-01 00:00:00.000000000 +0000
 +++ gdb-6.8.50.20090909/gdb/testsuite/gdb.pie/attach.exp	2009-09-09 19:06:01.000000000 +0200
-@@ -0,0 +1,432 @@
+@@ -0,0 +1,433 @@
 +#   Copyright 1997, 1999, 2002 Free Software Foundation, Inc.
 +
 +# This program is free software; you can redistribute it and/or modify
@@ -817,7 +817,8 @@
 +      -re ".*warning: reading register.*I.*O error.*$gdb_prompt $" {
 +         fail "attach call, read register 3 error"
 +     }
-+     -re "Attaching to.*process $testpid.*libc.*$gdb_prompt $" {
++     -re "Attaching to.*process $testpid.*$gdb_prompt $" {
++         # libc is relocated, not relocated, therefore not printed.
 +         pass "attach call"
 +     }
 +      -re "$gdb_prompt $" {fail "attach call"}

================================================================
Index: packages/gdb/gdb-6.6-buildid-locate.patch
diff -u packages/gdb/gdb-6.6-buildid-locate.patch:1.3 packages/gdb/gdb-6.6-buildid-locate.patch:1.4
--- packages/gdb/gdb-6.6-buildid-locate.patch:1.3	Tue Dec  8 00:29:15 2009
+++ packages/gdb/gdb-6.6-buildid-locate.patch	Tue Dec  8 02:53:10 2009
@@ -1,7 +1,7 @@
-Index: gdb-6.8.91.20090925/gdb/corelow.c
+Index: gdb-7.0/gdb/corelow.c
 ===================================================================
---- gdb-6.8.91.20090925.orig/gdb/corelow.c	2009-07-31 17:25:21.000000000 +0200
-+++ gdb-6.8.91.20090925/gdb/corelow.c	2009-09-25 09:39:09.000000000 +0200
+--- gdb-7.0.orig/gdb/corelow.c	2009-07-31 17:25:21.000000000 +0200
++++ gdb-7.0/gdb/corelow.c	2009-10-23 00:17:29.000000000 +0200
 @@ -45,6 +45,10 @@
  #include "exceptions.h"
  #include "solib.h"
@@ -91,11 +91,11 @@
 +			   NULL, NULL, NULL,
 +			   &setlist, &showlist);
  }
-Index: gdb-6.8.91.20090925/gdb/doc/gdb.texinfo
+Index: gdb-7.0/gdb/doc/gdb.texinfo
 ===================================================================
---- gdb-6.8.91.20090925.orig/gdb/doc/gdb.texinfo	2009-09-25 09:29:58.000000000 +0200
-+++ gdb-6.8.91.20090925/gdb/doc/gdb.texinfo	2009-09-25 09:29:58.000000000 +0200
-@@ -13895,6 +13895,27 @@ information files.
+--- gdb-7.0.orig/gdb/doc/gdb.texinfo	2009-10-23 00:12:39.000000000 +0200
++++ gdb-7.0/gdb/doc/gdb.texinfo	2009-10-23 00:17:29.000000000 +0200
+@@ -13896,6 +13896,27 @@ information files.
  
  @end table
  
@@ -123,10 +123,10 @@
  @cindex @code{.gnu_debuglink} sections
  @cindex debug link sections
  A debug link is a special section of the executable file named
-Index: gdb-6.8.91.20090925/gdb/solib-svr4.c
+Index: gdb-7.0/gdb/solib-svr4.c
 ===================================================================
---- gdb-6.8.91.20090925.orig/gdb/solib-svr4.c	2009-09-25 09:29:57.000000000 +0200
-+++ gdb-6.8.91.20090925/gdb/solib-svr4.c	2009-09-25 09:43:14.000000000 +0200
+--- gdb-7.0.orig/gdb/solib-svr4.c	2009-10-23 00:12:38.000000000 +0200
++++ gdb-7.0/gdb/solib-svr4.c	2009-10-23 00:17:29.000000000 +0200
 @@ -1101,9 +1101,49 @@ svr4_current_sos (void)
  		     safe_strerror (errcode));
  	  else
@@ -180,10 +180,10 @@
  	    }
  	  xfree (buffer);
  
-Index: gdb-6.8.91.20090925/gdb/symfile.c
+Index: gdb-7.0/gdb/symfile.c
 ===================================================================
---- gdb-6.8.91.20090925.orig/gdb/symfile.c	2009-09-25 09:29:57.000000000 +0200
-+++ gdb-6.8.91.20090925/gdb/symfile.c	2009-09-25 09:29:58.000000000 +0200
+--- gdb-7.0.orig/gdb/symfile.c	2009-10-23 00:12:38.000000000 +0200
++++ gdb-7.0/gdb/symfile.c	2009-10-23 00:43:28.000000000 +0200
 @@ -56,6 +56,7 @@
  #include "elf-bfd.h"
  #include "solib.h"
@@ -618,7 +618,7 @@
  
    if (found == NULL)
      warning (_("File \"%s\" has no build-id, file skipped"), filename);
-@@ -1234,8 +1626,9 @@ build_id_verify (const char *filename, s
+@@ -1234,14 +1626,16 @@ build_id_verify (const char *filename, s
    return retval;
  }
  
@@ -628,48 +628,77 @@
 +build_id_to_filename (struct build_id *build_id, char **link_return,
 +		      int add_debug_suffix)
  {
-   char *link, *s, *retval = NULL;
-   gdb_byte *data = build_id->data;
-@@ -1243,7 +1636,9 @@ build_id_to_debug_filename (struct build
+   char *link, *debugdir, *retval = NULL;
++  char *link_all = NULL;
  
    /* DEBUG_FILE_DIRECTORY/.build-id/ab/cdef */
-   link = xmalloc (strlen (debug_file_directory) + (sizeof "/.build-id/" - 1) + 1
--		  + 2 * size + (sizeof ".debug" - 1) + 1);
-+		  + 2 * size
-+		  + (add_debug_suffix ? sizeof ".debug" - 1 : 0)
-+		  + 1);
-   s = link + sprintf (link, "%s/.build-id/", debug_file_directory);
-   if (size > 0)
-     {
-@@ -1254,12 +1649,14 @@ build_id_to_debug_filename (struct build
-     *s++ = '/';
-   while (size-- > 0)
-     s += sprintf (s, "%02x", (unsigned) *data++);
--  strcpy (s, ".debug");
-+  if (add_debug_suffix)
-+    strcpy (s, ".debug");
-+  else
-+    *s = 0;
+-  link = alloca (strlen (debug_file_directory) + (sizeof "/.build-id/" - 1) + 1
+-		 + 2 * build_id->size + (sizeof ".debug" - 1) + 1);
++  link = xmalloc (strlen (debug_file_directory) + (sizeof "/.build-id/" - 1) + 1
++		  + 2 * build_id->size + (sizeof ".debug" - 1) + 1);
+ 
+   /* Keep backward compatibility so that DEBUG_FILE_DIRECTORY being "" will
+      cause "/.build-id/..." lookups.  */
+@@ -1272,7 +1666,10 @@ build_id_to_debug_filename (struct build
+ 	*s++ = '/';
+       while (size-- > 0)
+ 	s += sprintf (s, "%02x", (unsigned) *data++);
+-      strcpy (s, ".debug");
++      if (add_debug_suffix)
++	strcpy (s, ".debug");
++      else
++	*s = 0;
+ 
+       /* lrealpath() is expensive even for the usually non-existent files.  */
+       if (access (link, F_OK) == 0)
+@@ -1285,15 +1682,185 @@ build_id_to_debug_filename (struct build
+ 	}
  
-   /* lrealpath() is expensive even for the usually non-existent files.  */
-   if (access (link, F_OK) == 0)
-     retval = lrealpath (link);
--  xfree (link);
+       if (retval != NULL)
+-	break;
++	{
++	  /* LINK_ALL is not used below in this non-NULL RETVAL case.  */
++	  break;
++	}
++
++	if (link_all == NULL)
++	  link_all = xstrdup (link);
++	else
++	  {
++	    size_t len_orig = strlen (link_all);
++
++	    link_all = xrealloc (link_all, len_orig + 1 + strlen (link) + 1);
++
++	    /* Use whitespace instead of DIRNAME_SEPARATOR to be compatible with
++	       its possible use as an argument for installation command.  */
++	    link_all[len_orig] = ' ';
++
++	    strcpy (&link_all[len_orig + 1], link);
++	  }
  
-   if (retval != NULL && !build_id_verify (retval, build_id))
-     {
-@@ -1267,9 +1664,150 @@ build_id_to_debug_filename (struct build
-       retval = NULL;
+       debugdir = debugdir_end;
      }
+   while (*debugdir != 0);
  
 +  if (link_return != NULL)
-+    *link_return = link;
-+  else
-+    xfree (link);
++    {
++      if (retval != NULL)
++       {
++         *link_return = link;
++         link = NULL;
++       }
++      else
++       {
++         *link_return = link_all;
++         link_all = NULL;
++       }
++    }
++  xfree (link);
++  xfree (link_all);
++
++  return retval;
++}
 +
-   return retval;
- }
- 
 +/* This MISSING_FILEPAIR_HASH tracker is used only for the duplicite messages
 +     Try to install the hash file ...
 +   avoidance.  */
@@ -692,9 +721,9 @@
 +
 +  retval = obstack_alloc (&missing_filepair_obstack, size);
 +  memset (retval, 0, size);
-+  return retval;
-+}
-+
+   return retval;
+ }
+ 
 +static hashval_t
 +missing_filepair_hash_func (const struct missing_filepair *elem)
 +{
@@ -809,20 +838,7 @@
  static char *
  get_debug_link_info (struct objfile *objfile, unsigned long *crc32_out)
  {
-@@ -1352,32 +1890,36 @@ static char *
- find_separate_debug_file (struct objfile *objfile)
- {
-   asection *sect;
--  char *basename;
--  char *dir;
--  char *debugfile;
-+  char *basename = NULL;
-+  char *dir = NULL;
-+  char *debugfile = NULL;
-   char *name_copy;
--  char *canon_name;
-+  char *canon_name = NULL;
-   bfd_size_type debuglink_size;
+@@ -1384,13 +1951,14 @@ find_separate_debug_file (struct objfile
    unsigned long crc32;
    int i;
    struct build_id *build_id;
@@ -839,123 +855,34 @@
        xfree (build_id);
        /* Prevent looping on a stripped .debug file.  */
        if (build_id_name != NULL && strcmp (build_id_name, objfile->name) == 0)
-         {
--	  warning (_("\"%s\": separate debug info file has no debug info"),
-+	  warning (_("\"%s\": The separate debug info file has no debug info"),
- 		   build_id_name);
+@@ -1400,7 +1968,10 @@ find_separate_debug_file (struct objfile
  	  xfree (build_id_name);
  	}
        else if (build_id_name != NULL)
 -        return build_id_name;
-+        {
++	{
 +	  xfree (build_id_filename);
 +	  return build_id_name;
 +	}
      }
  
    basename = get_debug_link_info (objfile, &crc32);
-@@ -1385,7 +1927,7 @@ find_separate_debug_file (struct objfile
-   if (basename == NULL)
-     /* There's no separate debug info, hence there's no way we could
-        load it => no warning.  */
--    return NULL;
-+    goto cleanup_return_debugfile;
- 
-   dir = xstrdup (objfile->name);
- 
-@@ -1407,24 +1949,19 @@ find_separate_debug_file (struct objfile
-   if (canon_name && strlen (canon_name) > i)
-     i = strlen (canon_name);
- 
--  debugfile = alloca (strlen (debug_file_directory) + 1
--                      + i
--                      + strlen (DEBUG_SUBDIRECTORY)
--                      + strlen ("/")
--                      + strlen (basename)
--                      + 1);
-+  debugfile = xmalloc (strlen (debug_file_directory) + 1
-+		       + i
-+		       + strlen (DEBUG_SUBDIRECTORY)
-+		       + strlen ("/")
-+		       + strlen (basename)
-+		       + 1);
- 
-   /* First try in the same directory as the original file.  */
-   strcpy (debugfile, dir);
-   strcat (debugfile, basename);
- 
-   if (separate_debug_file_exists (debugfile, crc32, objfile->name))
--    {
--      xfree (basename);
--      xfree (dir);
--      xfree (canon_name);
--      return xstrdup (debugfile);
--    }
-+    goto cleanup_return_debugfile;
- 
-   /* Then try in the subdirectory named DEBUG_SUBDIRECTORY.  */
-   strcpy (debugfile, dir);
-@@ -1433,12 +1970,7 @@ find_separate_debug_file (struct objfile
-   strcat (debugfile, basename);
- 
-   if (separate_debug_file_exists (debugfile, crc32, objfile->name))
--    {
--      xfree (basename);
--      xfree (dir);
--      xfree (canon_name);
--      return xstrdup (debugfile);
--    }
-+    goto cleanup_return_debugfile;
- 
-   /* Then try in the global debugfile directory.  */
-   strcpy (debugfile, debug_file_directory);
-@@ -1447,12 +1979,7 @@ find_separate_debug_file (struct objfile
-   strcat (debugfile, basename);
- 
-   if (separate_debug_file_exists (debugfile, crc32, objfile->name))
--    {
--      xfree (basename);
--      xfree (dir);
--      xfree (canon_name);
--      return xstrdup (debugfile);
--    }
-+    goto cleanup_return_debugfile;
- 
-   /* If the file is in the sysroot, try using its base path in the
-      global debugfile directory.  */
-@@ -1466,20 +1993,18 @@ find_separate_debug_file (struct objfile
-       strcat (debugfile, basename);
- 
-       if (separate_debug_file_exists (debugfile, crc32, objfile->name))
--	{
--	  xfree (canon_name);
--	  xfree (basename);
--	  xfree (dir);
--	  return xstrdup (debugfile);
--	}
-+	goto cleanup_return_debugfile;
-     }
+@@ -1501,8 +2072,10 @@ find_separate_debug_file (struct objfile
    
--  if (canon_name)
--    xfree (canon_name);
-+  debugfile = NULL;
+   xfree (debugfile);
+   debugfile = NULL;
 +  debug_print_missing (objfile->name, build_id_filename);
  
-+cleanup_return_debugfile:
+ cleanup_return_debugfile:
 +  xfree (build_id_filename);
-+  xfree (canon_name);
+   xfree (canon_name);
    xfree (basename);
    xfree (dir);
--  return NULL;
-+  return debugfile;
- }
- 
- 
-@@ -4229,4 +4754,16 @@ the global debug-file directory prepende
+@@ -4256,4 +4829,16 @@ each global debug-file-directory compone
  				     NULL,
  				     show_debug_file_directory,
  				     &setlist, &showlist);
-+ 
++
 +   add_setshow_zinteger_cmd ("build-id-verbose", no_class, &build_id_verbose,
 + 			    _("\
 + Set debugging level of the build-id locator."), _("\
@@ -965,13 +892,13 @@
 + 			    NULL,
 + 			    show_build_id_verbose,
 + 			    &setlist, &showlist);
-+ 
++
 +   observer_attach_executable_changed (debug_print_executable_changed);
  }
-Index: gdb-6.8.91.20090925/gdb/symfile.h
+Index: gdb-7.0/gdb/symfile.h
 ===================================================================
---- gdb-6.8.91.20090925.orig/gdb/symfile.h	2009-09-25 09:29:57.000000000 +0200
-+++ gdb-6.8.91.20090925/gdb/symfile.h	2009-09-25 09:29:58.000000000 +0200
+--- gdb-7.0.orig/gdb/symfile.h	2009-10-23 00:12:38.000000000 +0200
++++ gdb-7.0/gdb/symfile.h	2009-10-23 00:17:29.000000000 +0200
 @@ -381,6 +381,13 @@ extern int symfile_map_offsets_to_segmen
  struct symfile_segment_data *get_symfile_segment_data (bfd *abfd);
  void free_symfile_segment_data (struct symfile_segment_data *data);
@@ -986,10 +913,10 @@
  /* From dwarf2read.c */
  
  extern int dwarf2_has_info (struct objfile *);
-Index: gdb-6.8.91.20090925/gdb/testsuite/lib/gdb.exp
+Index: gdb-7.0/gdb/testsuite/lib/gdb.exp
 ===================================================================
---- gdb-6.8.91.20090925.orig/gdb/testsuite/lib/gdb.exp	2009-09-25 09:29:57.000000000 +0200
-+++ gdb-6.8.91.20090925/gdb/testsuite/lib/gdb.exp	2009-09-25 09:29:58.000000000 +0200
+--- gdb-7.0.orig/gdb/testsuite/lib/gdb.exp	2009-10-23 00:12:38.000000000 +0200
++++ gdb-7.0/gdb/testsuite/lib/gdb.exp	2009-10-23 00:17:29.000000000 +0200
 @@ -1248,6 +1248,16 @@ proc default_gdb_start { } {
  	    warning "Couldn't set the width to 0."
  	}
@@ -1007,10 +934,10 @@
      return 0;
  }
  
-Index: gdb-6.8.91.20090925/gdb/testsuite/lib/mi-support.exp
+Index: gdb-7.0/gdb/testsuite/lib/mi-support.exp
 ===================================================================
---- gdb-6.8.91.20090925.orig/gdb/testsuite/lib/mi-support.exp	2009-09-15 20:51:26.000000000 +0200
-+++ gdb-6.8.91.20090925/gdb/testsuite/lib/mi-support.exp	2009-09-25 09:29:58.000000000 +0200
+--- gdb-7.0.orig/gdb/testsuite/lib/mi-support.exp	2009-09-15 20:51:26.000000000 +0200
++++ gdb-7.0/gdb/testsuite/lib/mi-support.exp	2009-10-23 00:17:29.000000000 +0200
 @@ -221,6 +221,16 @@ proc default_mi_gdb_start { args } {
  	    }
      	}
@@ -1028,10 +955,10 @@
  
      detect_async
  
-Index: gdb-6.8.91.20090925/gdb/objfiles.h
+Index: gdb-7.0/gdb/objfiles.h
 ===================================================================
---- gdb-6.8.91.20090925.orig/gdb/objfiles.h	2009-09-25 09:29:57.000000000 +0200
-+++ gdb-6.8.91.20090925/gdb/objfiles.h	2009-09-25 09:38:27.000000000 +0200
+--- gdb-7.0.orig/gdb/objfiles.h	2009-10-23 00:12:38.000000000 +0200
++++ gdb-7.0/gdb/objfiles.h	2009-10-23 00:17:29.000000000 +0200
 @@ -428,6 +428,10 @@ struct objfile
  
  #define OBJF_MAIN (1 << 7)

================================================================
Index: packages/gdb/gdb-archer.patch
diff -u packages/gdb/gdb-archer.patch:1.3 packages/gdb/gdb-archer.patch:1.4
--- packages/gdb/gdb-archer.patch:1.3	Tue Dec  8 00:29:15 2009
+++ packages/gdb/gdb-archer.patch	Tue Dec  8 02:53:10 2009
@@ -2,7 +2,7 @@
 http://sourceware.org/gdb/wiki/ArcherBranchManagement
 
 GIT snapshot:
-commit 7cb860f03e2437c97239334ebe240d06f45723e0
+commit 16276c1aad1366b92e687c72cab30192280e1906
 
 branch `archer' - the merge of branches:
 archer-tromey-call-frame-cfa
@@ -19,12 +19,12 @@
 
 
 diff --git a/gdb/Makefile.in b/gdb/Makefile.in
-index f5e1dde..73ee55c 100644
+index 7d53205..319fac4 100644
 --- a/gdb/Makefile.in
 +++ b/gdb/Makefile.in
 @@ -169,6 +169,10 @@ TARGET_SYSTEM_ROOT_DEFINE = @TARGET_SYSTEM_ROOT_DEFINE@
  # Did the user give us a --with-gdb-datadir option?
- GDB_DATADIR_PATH = @GDB_DATADIR_PATH@
+ GDB_DATADIR = @GDB_DATADIR@
  
 +# The argument to --with-pythondir.  If not given, this is
 +# GDB_DATADIR_PATH/python.
@@ -194,10 +194,10 @@
  # Dependency tracking.  Most of this is conditional on GNU Make being
  # found by configure; if GNU Make is not found, we fall back to a
 diff --git a/gdb/NEWS b/gdb/NEWS
-index 4fc6dcd..6744b23 100644
+index 8d32c34..f7ea21b 100644
 --- a/gdb/NEWS
 +++ b/gdb/NEWS
-@@ -462,6 +462,13 @@ x86/x86_64 Darwin		i[34567]86-*-darwin*
+@@ -476,6 +476,13 @@ x86/x86_64 Darwin		i[34567]86-*-darwin*
  
  x86_64 MinGW			x86_64-*-mingw*
  
@@ -290,7 +290,7 @@
    ada_dump_subexp_body,
    ada_evaluate_subexp
 diff --git a/gdb/amd64-linux-nat.c b/gdb/amd64-linux-nat.c
-index 7d8461c..a6d35d7 100644
+index 7d8461c..fc4b3e0 100644
 --- a/gdb/amd64-linux-nat.c
 +++ b/gdb/amd64-linux-nat.c
 @@ -270,6 +270,8 @@ amd64_linux_dr_get (ptid_t ptid, int regnum)
@@ -340,7 +340,7 @@
    return amd64_linux_dr_get (inferior_ptid, DR_STATUS);
  }
  
-+/* Unset VALUE bits in DR_STATUS in all LWPs of LWP_LIST.  */
++/* Unset MASK bits in DR_STATUS in all LWPs of LWP_LIST.  */
 +
 +static void
 +amd64_linux_dr_unset_status (unsigned long mask)
@@ -463,7 +463,7 @@
 +
  #endif /* BLOCK_H */
 diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
-index 811cdfb..b0bf314 100644
+index 811cdfb..0f35101 100644
 --- a/gdb/breakpoint.c
 +++ b/gdb/breakpoint.c
 @@ -61,6 +61,7 @@
@@ -684,14 +684,14 @@
 +
 +  /* Find BC_L which is a leftmost element which may affect BUF content.  It is
 +     safe to report lower value but a failure to report higher one.  */
-+
+ 
+-  ALL_BP_LOCATIONS (b)
 +  bc_l = 0;
 +  bc_r = bp_location_count;
 +  while (bc_l + 1 < bc_r)
 +    {
 +      struct bp_location *b;
- 
--  ALL_BP_LOCATIONS (b)
++
 +      bc = (bc_l + bc_r) / 2;
 +      b = bp_location[bc];
 +
@@ -1553,7 +1553,7 @@
  /* If SHOULD_INSERT is false, do not insert any breakpoint locations
     into the inferior, only remove already-inserted locations that no
     longer should be inserted.  Functions that delete a breakpoint or
-@@ -7777,49 +7951,66 @@ static void
+@@ -7777,49 +7951,78 @@ static void
  update_global_location_list (int should_insert)
  {
    struct breakpoint *b;
@@ -1625,11 +1625,11 @@
      {
 -      /* Tells if 'loc' is found amoung the new locations.  If not, we
 +      struct bp_location *old_loc = *old_locp;
++      struct bp_location **loc2p;
 +
 +      /* Tells if 'old_loc' is found amoung the new locations.  If not, we
  	 have to free it.  */
--      int found_object = 0;
-+      int found_object;
+       int found_object = 0;
        /* Tells if the location should remain inserted in the target.  */
        int keep_in_target = 0;
        int removed = 0;
@@ -1643,13 +1643,24 @@
 +      /* Skip LOCP entries which will definitely never be needed.  Stop either
 +	 at or being the one matching OLD_LOC.  */
 +      while (locp < bp_location + bp_location_count
-+	     && bp_location_compare (*locp, old_loc) < 0)
++	     && (*locp)->address < old_loc->address)
 +	locp++;
-+      found_object = locp < bp_location + bp_location_count && *locp == old_loc;
++
++      for (loc2p = locp;
++	   (loc2p < bp_location + bp_location_count
++	    && (*loc2p)->address == old_loc->address);
++	   loc2p++)
++	{
++	  if (*loc2p == old_loc)
++	    {
++	      found_object = 1;
++	      break;
++	    }
++	}
  
        /* If this location is no longer present, and inserted, look if there's
  	 maybe a new location at the same address.  If so, mark that one 
-@@ -7827,11 +8018,11 @@ update_global_location_list (int should_insert)
+@@ -7827,11 +8030,11 @@ update_global_location_list (int should_insert)
  	 don't have a time window where a breakpoint at certain location is not
  	 inserted.  */
  
@@ -1663,7 +1674,7 @@
  	    {
  	      /* The location is still present in the location list, and still
  		 should be inserted.  Don't do anything.  */
-@@ -7842,37 +8033,46 @@ update_global_location_list (int should_insert)
+@@ -7842,37 +8045,46 @@ update_global_location_list (int should_insert)
  	      /* The location is either no longer present, or got disabled.
  		 See if there's another location at the same address, in which 
  		 case we don't need to remove this one from the target.  */
@@ -1685,24 +1696,24 @@
 +
 +	      if (breakpoint_address_is_meaningful (old_loc->owner))
 +		{
-+		  struct bp_location **loc2p;
-+
 +		  for (loc2p = locp;
-+		       loc2p < bp_location + bp_location_count
-+		       && (*loc2p)->address == old_loc->address;
++		       (loc2p < bp_location + bp_location_count
++			&& (*loc2p)->address == old_loc->address);
 +		       loc2p++)
 +		    {
 +		      struct bp_location *loc2 = *loc2p;
 +
-+		      /* For the sake of should_be_inserted.
-+			 Duplicates check below will fix up this later.  */
<<Diff was trimmed, longer than 597 lines>>

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/gdb/gdb-6.3-test-pie-20050107.patch?r1=1.2&r2=1.3&f=u
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/gdb/gdb-6.6-buildid-locate.patch?r1=1.3&r2=1.4&f=u
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/gdb/gdb-archer.patch?r1=1.3&r2=1.4&f=u
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/gdb/gdb.spec?r1=1.115&r2=1.116&f=u



More information about the pld-cvs-commit mailing list