sysprof r418 - trunk



Author: ssp
Date: Thu May  8 00:17:13 2008
New Revision: 418
URL: http://svn.gnome.org/viewvc/sysprof?rev=418&view=rev

Log:
2008-05-07  Soren Sandmann Pedersen  <sandmann daimi au dk>

	* binfile.c (get_build_id_file): Fix bug where the build id name
	was generated incorrectly. 

	Make a copy of the debug name, not the input name.



Modified:
   trunk/ChangeLog
   trunk/TODO
   trunk/binfile.c
   trunk/elfparser.c

Modified: trunk/TODO
==============================================================================
--- trunk/TODO	(original)
+++ trunk/TODO	Thu May  8 00:17:13 2008
@@ -57,6 +57,9 @@
 
 * Find out why the samples label won't right adjust
 
+* If we end up believing the kernel's own stacktraces, maybe
+  /proc/kallsyms shouldn't be parsed until the user hits profile.
+
 * Elf bugs:
 	- error handling for bin_parser is necessary.
 

Modified: trunk/binfile.c
==============================================================================
--- trunk/binfile.c	(original)
+++ trunk/binfile.c	Thu May  8 00:17:13 2008
@@ -172,7 +172,7 @@
 	return NULL;
 
     init = g_strndup (build_id, 2);
-    rest = g_strdup_printf (build_id + 2, ".debug");
+    rest = g_strdup_printf ("%s%s", build_id + 2, ".debug");
 
     tries = g_list_append (tries, g_build_filename ("/usr", "lib", "debug", ".build-id", init, rest, NULL));
     tries = g_list_append (tries, g_build_filename (debug_file_directory, ".build-id", init, rest, NULL));
@@ -188,7 +188,7 @@
 
 	    if (file_id && strcmp (build_id, file_id) == 0)
 	    {
-		*new_name = g_strdup (filename);
+		*new_name = g_strdup (name);
 		result = parser;
 		break;
 	    }
@@ -406,7 +406,7 @@
 #endif
 
 #if 0
-    g_print ("%lx undefined in %s (textoffset %d)\n", address + bin_file->text_offset, bin_file->filename, bin_file->text_offset);
+    g_print ("%lx undefined in %s (textoffset %x)\n", address + bin_file->text_offset, bin_file->filename, bin_file->text_offset);
 #endif
     
     return (const BinSymbol *)bin_file->undefined_name;

Modified: trunk/elfparser.c
==============================================================================
--- trunk/elfparser.c	(original)
+++ trunk/elfparser.c	Thu May  8 00:17:13 2008
@@ -618,7 +618,13 @@
 	    parser->parser, parser->sym_format, "st_size");
 
 	if (size > 0 && result->address + size <= address)
+	{
+#if 0
+	    g_print ("  elf: ends at %lx, so rejecting\n",
+		     result->address + size);
+#endif
 	    result = NULL;
+	}
     }
     
     if (result)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]