mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2026-02-12 16:10:54 +00:00
Fix bug where the build id name was generated incorrectly.
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. svn path=/trunk/; revision=418
This commit is contained in:
committed by
Søren Sandmann Pedersen
parent
1d1d5dd945
commit
282783bf2b
@ -1,3 +1,10 @@
|
|||||||
|
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.
|
||||||
|
|
||||||
2008-04-26 Soren Sandmann <sandmann@daimi.au.dk>
|
2008-04-26 Soren Sandmann <sandmann@daimi.au.dk>
|
||||||
|
|
||||||
* process.c (get_kernel_symbols): Don't leak kallsyms
|
* process.c (get_kernel_symbols): Don't leak kallsyms
|
||||||
|
|||||||
3
TODO
3
TODO
@ -57,6 +57,9 @@ Before 1.2:
|
|||||||
|
|
||||||
* Find out why the samples label won't right adjust
|
* 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:
|
* Elf bugs:
|
||||||
- error handling for bin_parser is necessary.
|
- error handling for bin_parser is necessary.
|
||||||
|
|
||||||
|
|||||||
@ -172,7 +172,7 @@ get_build_id_file (ElfParser *elf,
|
|||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
init = g_strndup (build_id, 2);
|
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 ("/usr", "lib", "debug", ".build-id", init, rest, NULL));
|
||||||
tries = g_list_append (tries, g_build_filename (debug_file_directory, ".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 @@ get_build_id_file (ElfParser *elf,
|
|||||||
|
|
||||||
if (file_id && strcmp (build_id, file_id) == 0)
|
if (file_id && strcmp (build_id, file_id) == 0)
|
||||||
{
|
{
|
||||||
*new_name = g_strdup (filename);
|
*new_name = g_strdup (name);
|
||||||
result = parser;
|
result = parser;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -406,7 +406,7 @@ bin_file_lookup_symbol (BinFile *bin_file,
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if 0
|
#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
|
#endif
|
||||||
|
|
||||||
return (const BinSymbol *)bin_file->undefined_name;
|
return (const BinSymbol *)bin_file->undefined_name;
|
||||||
|
|||||||
@ -618,7 +618,13 @@ elf_parser_lookup_symbol (ElfParser *parser,
|
|||||||
parser->parser, parser->sym_format, "st_size");
|
parser->parser, parser->sym_format, "st_size");
|
||||||
|
|
||||||
if (size > 0 && result->address + size <= address)
|
if (size > 0 && result->address + size <= address)
|
||||||
|
{
|
||||||
|
#if 0
|
||||||
|
g_print (" elf: ends at %lx, so rejecting\n",
|
||||||
|
result->address + size);
|
||||||
|
#endif
|
||||||
result = NULL;
|
result = NULL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (result)
|
if (result)
|
||||||
|
|||||||
Reference in New Issue
Block a user