Sophie

Sophie

distrib > Mandriva > 2010.2 > i586 > media > main-release-src > by-pkgid > cda2a0a45e5467015ff884fbfb52ed51 > files > 94

gdb-7.1-1mdv2010.1.src.rpm

diff -p -up gdb-7.1/gdb/elfread.c.orig gdb-7.1/gdb/elfread.c
--- gdb-7.1/gdb/elfread.c.orig	2010-04-15 20:25:33.795858379 -0300
+++ gdb-7.1/gdb/elfread.c	2010-04-15 20:40:22.637928915 -0300
@@ -1257,7 +1257,7 @@ missing_rpm_enlist (const char *filename
 	  char *debuginfo, **slot, *s, *s2;
 	  errmsg_t err;
 	  size_t srcrpmlen = sizeof (".src.rpm") - 1;
-	  size_t debuginfolen = sizeof ("-debuginfo") - 1;
+	  size_t debuginfolen = sizeof ("-debug") - 1;
 	  rpmdbMatchIterator mi_debuginfo;
 
 	  h = rpmdbNextIterator_p (mi);
@@ -1266,7 +1266,7 @@ missing_rpm_enlist (const char *filename
 
 	  /* Verify the debuginfo file is not already installed.  */
 
-	  debuginfo = headerFormat_p (h, "%{sourcerpm}-debuginfo.%{arch}",
+	  debuginfo = headerFormat_p (h, "%{sourcerpm}-debug.%{arch}",
 				      &err);
 	  if (!debuginfo)
 	    {
@@ -1274,17 +1274,17 @@ missing_rpm_enlist (const char *filename
 	               err);
 	      continue;
 	    }
-	  /* s = `.src.rpm-debuginfo.%{arch}' */
+	  /* s = `.src.rpm-debug.%{arch}' */
 	  s = strrchr (debuginfo, '-') - srcrpmlen;
 	  s2 = NULL;
 	  if (s > debuginfo && memcmp (s, ".src.rpm", srcrpmlen) == 0)
 	    {
-	      /* s2 = `-%{release}.src.rpm-debuginfo.%{arch}' */
+	      /* s2 = `-%{release}.src.rpm-debug.%{arch}' */
 	      s2 = memrchr (debuginfo, '-', s - debuginfo);
 	    }
 	  if (s2)
 	    {
-	      /* s2 = `-%{version}-%{release}.src.rpm-debuginfo.%{arch}' */
+	      /* s2 = `-%{version}-%{release}.src.rpm-debug.%{arch}' */
 	      s2 = memrchr (debuginfo, '-', s2 - debuginfo);
 	    }
 	  if (!s2)
@@ -1294,31 +1294,31 @@ missing_rpm_enlist (const char *filename
 	      xfree (debuginfo);
 	      continue;
 	    }
-	  /* s = `.src.rpm-debuginfo.%{arch}' */
-	  /* s2 = `-%{version}-%{release}.src.rpm-debuginfo.%{arch}' */
+	  /* s = `.src.rpm-debug.%{arch}' */
+	  /* s2 = `-%{version}-%{release}.src.rpm-debug.%{arch}' */
 	  memmove (s2 + debuginfolen, s2, s - s2);
-	  memcpy (s2, "-debuginfo", debuginfolen);
+	  memcpy (s2, "-debug", debuginfolen);
 	  /* s = `XXXX.%{arch}' */
 	  /* strlen ("XXXX") == srcrpmlen + debuginfolen */
-	  /* s2 = `-debuginfo-%{version}-%{release}XX.%{arch}' */
+	  /* s2 = `-debug-%{version}-%{release}XX.%{arch}' */
 	  /* strlen ("XX") == srcrpmlen */
 	  memmove (s + debuginfolen, s + srcrpmlen + debuginfolen,
 		   strlen (s + srcrpmlen + debuginfolen) + 1);
-	  /* s = `-debuginfo-%{version}-%{release}.%{arch}' */
+	  /* s = `-debug-%{version}-%{release}.%{arch}' */
 
 	  /* RPMDBI_PACKAGES requires keylen == sizeof (int).  */
 	  /* RPMDBI_LABEL is an interface for NVR-based dbiFindByLabel().  */
 	  mi_debuginfo = rpmtsInitIterator_p (ts, RPMDBI_LABEL, debuginfo, 0);
-	  xfree (debuginfo);
 	  if (mi_debuginfo)
 	    {
 	      rpmdbFreeIterator_p (mi_debuginfo);
+	      xfree (debuginfo);
 	      count = 0;
 	      break;
 	    }
 
 	  /* The allocated memory gets utilized below for MISSING_RPM_HASH.  */
-	  debuginfo = headerFormat_p (h,
+	  /*debuginfo = headerFormat_p (h,
 				      "%{name}-%{version}-%{release}.%{arch}",
 				      &err);
 	  if (!debuginfo)
@@ -1326,7 +1326,7 @@ missing_rpm_enlist (const char *filename
 	      warning (_("Error querying the rpm file `%s': %s"), filename,
 	               err);
 	      continue;
-	    }
+	    }*/
 
 	  /* Base package name for `debuginfo-install'.  We do not use the
 	     `yum' command directly as the line
@@ -1412,8 +1412,7 @@ missing_rpm_list_print (void)
   qsort (array, missing_rpm_list_entries, sizeof (*array),
 	 (int (*) (const void *, const void *)) missing_rpm_list_compar);
 
-  printf_unfiltered (_("Missing separate debuginfos, use: %s"),
-		     "debuginfo-install");
+  printf_unfiltered (_("Missing debug package(s), you should install:"));
   for (array_iter = array; array_iter < array + missing_rpm_list_entries;
        array_iter++)
     {
@@ -1623,11 +1622,11 @@ debug_print_missing (const char *binary,
 	   already requires its own separate lines.  */
 
 	fprintf_unfiltered (gdb_stdlog,
-			    _("Missing separate debuginfo for %s\n"), binary);
-        if (debug != NULL)
+			    _("Missing separate debug info for %s\n"), binary);
+        /*if (debug != NULL)
 	  fprintf_unfiltered (gdb_stdlog, _("Try: %s %s\n"),
 			      "yum --disablerepo='*' --enablerepo='*-debuginfo'"
-			      " install", debug);
+			      " install", debug);*/
       }
 }