mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2026-02-10 15:10:53 +00:00
Fix some warnings.
Mon Aug 15 20:39:11 2005 Soeren Sandmann <sandmann@redhat.com> * binfile.c, process.c, profile.c: Fix some warnings.
This commit is contained in:
committed by
Søren Sandmann Pedersen
parent
fbc7b471d2
commit
509d5f07ed
@ -1,3 +1,7 @@
|
|||||||
|
Mon Aug 15 20:39:11 2005 Soeren Sandmann <sandmann@redhat.com>
|
||||||
|
|
||||||
|
* binfile.c, process.c, profile.c: Fix some warnings.
|
||||||
|
|
||||||
Mon Aug 1 23:49:51 2005 Soeren Sandmann <sandmann@redhat.com>
|
Mon Aug 1 23:49:51 2005 Soeren Sandmann <sandmann@redhat.com>
|
||||||
|
|
||||||
* module/sysprof-module.c (REG_INS_PTR): Add support for
|
* module/sysprof-module.c (REG_INS_PTR): Add support for
|
||||||
|
|||||||
14
binfile.c
14
binfile.c
@ -357,26 +357,12 @@ read_symbols (BinFile *bf)
|
|||||||
if ((bfd_symbols[i]->flags & BSF_FUNCTION) &&
|
if ((bfd_symbols[i]->flags & BSF_FUNCTION) &&
|
||||||
(bfd_symbols[i]->section == text_section))
|
(bfd_symbols[i]->section == text_section))
|
||||||
{
|
{
|
||||||
char *name;
|
|
||||||
|
|
||||||
/* Store the address in file coordinates:
|
/* Store the address in file coordinates:
|
||||||
* - all addresses are already offset by section->vma
|
* - all addresses are already offset by section->vma
|
||||||
* - the section is positioned at section->filepos
|
* - the section is positioned at section->filepos
|
||||||
*/
|
*/
|
||||||
#if 0
|
|
||||||
g_print ("file: %s\n", bf->filename);
|
|
||||||
g_print ("vma: %p\n", text_section->vma);
|
|
||||||
g_print ("vma: %p\n", text_section->filepos);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
symbol.address = bfd_asymbol_value (bfd_symbols[i]) - load_address;
|
symbol.address = bfd_asymbol_value (bfd_symbols[i]) - load_address;
|
||||||
symbol.name = demangle (bfd, bfd_asymbol_name (bfd_symbols[i]));
|
symbol.name = demangle (bfd, bfd_asymbol_name (bfd_symbols[i]));
|
||||||
#if 0
|
|
||||||
symbol.name = g_strdup_printf ("%s (%s)", name, bf->filename);
|
|
||||||
symbol.name = g_strdup (name);
|
|
||||||
g_print ("symbol: %s (%s) %p\n", name, bf->filename, symbol.address);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
g_array_append_vals (symbols, &symbol, 1);
|
g_array_append_vals (symbols, &symbol, 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -296,7 +296,7 @@ static char *
|
|||||||
get_pidname (int pid)
|
get_pidname (int pid)
|
||||||
{
|
{
|
||||||
if (pid == -1)
|
if (pid == -1)
|
||||||
return g_strdup_printf ("kernel", pid);
|
return g_strdup_printf ("kernel");
|
||||||
else
|
else
|
||||||
return g_strdup_printf ("pid %d", pid);
|
return g_strdup_printf ("pid %d", pid);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -222,8 +222,8 @@ profile_load (const char *filename, GError **err)
|
|||||||
sfile_begin_get_record (input, "object");
|
sfile_begin_get_record (input, "object");
|
||||||
|
|
||||||
sfile_get_string (input, "name", &obj->name);
|
sfile_get_string (input, "name", &obj->name);
|
||||||
sfile_get_integer (input, "total", &obj->total);
|
sfile_get_integer (input, "total", (gint32 *)&obj->total);
|
||||||
sfile_get_integer (input, "self", &obj->self);
|
sfile_get_integer (input, "self", (gint32 *)&obj->self);
|
||||||
|
|
||||||
sfile_end_get (input, "object", obj);
|
sfile_end_get (input, "object", obj);
|
||||||
}
|
}
|
||||||
@ -241,8 +241,8 @@ profile_load (const char *filename, GError **err)
|
|||||||
sfile_get_pointer (input, "siblings", (gpointer *)&node->siblings);
|
sfile_get_pointer (input, "siblings", (gpointer *)&node->siblings);
|
||||||
sfile_get_pointer (input, "children", (gpointer *)&node->children);
|
sfile_get_pointer (input, "children", (gpointer *)&node->children);
|
||||||
sfile_get_pointer (input, "parent", (gpointer *)&node->parent);
|
sfile_get_pointer (input, "parent", (gpointer *)&node->parent);
|
||||||
sfile_get_integer (input, "total", &node->total);
|
sfile_get_integer (input, "total", (gint32 *)&node->total);
|
||||||
sfile_get_integer (input, "self", &node->self);
|
sfile_get_integer (input, "self", (gint32 *)&node->self);
|
||||||
sfile_get_integer (input, "toplevel", &node->toplevel);
|
sfile_get_integer (input, "toplevel", &node->toplevel);
|
||||||
|
|
||||||
sfile_end_get (input, "node", node);
|
sfile_end_get (input, "node", node);
|
||||||
|
|||||||
2
sfile.c
2
sfile.c
@ -720,7 +720,7 @@ sfile_get_pointer (SFileInput *file,
|
|||||||
void
|
void
|
||||||
sfile_get_integer (SFileInput *file,
|
sfile_get_integer (SFileInput *file,
|
||||||
const char *name,
|
const char *name,
|
||||||
int *integer)
|
gint32 *integer)
|
||||||
{
|
{
|
||||||
Instruction *instruction;
|
Instruction *instruction;
|
||||||
|
|
||||||
|
|||||||
4
sfile.h
4
sfile.h
@ -89,9 +89,9 @@ int sfile_begin_get_list (SFileInput *file,
|
|||||||
void sfile_get_pointer (SFileInput *file,
|
void sfile_get_pointer (SFileInput *file,
|
||||||
const char *name,
|
const char *name,
|
||||||
gpointer *pointer);
|
gpointer *pointer);
|
||||||
void sfile_get_integer (SFileInput *file,
|
void sfile_get_integer (SFileInput *file,
|
||||||
const char *name,
|
const char *name,
|
||||||
int *integer);
|
gint32 *integer);
|
||||||
void sfile_get_string (SFileInput *file,
|
void sfile_get_string (SFileInput *file,
|
||||||
const char *name,
|
const char *name,
|
||||||
char **string);
|
char **string);
|
||||||
|
|||||||
Reference in New Issue
Block a user