[memprof: 20/76] binfile: Use gsize for the address...



commit 7ad7ae7a4f58066e8c8956b64fb9dbc620b2f43f
Author: Holger Hans Peter Freyther <zecke selfish org>
Date:   Thu Jun 4 13:10:59 2009 +0200

    binfile: Use gsize for the address...
    
    Use gsize for the address and glib pointer cast to make
    the compiler happy about what we do.

 src/binfile.c |    2 +-
 src/binfile.h |    2 +-
 src/process.c |    4 ++--
 3 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/src/binfile.c b/src/binfile.c
index 7df4a7a..f328618 100644
--- a/src/binfile.c
+++ b/src/binfile.c
@@ -353,7 +353,7 @@ bin_file_free (BinFile *bin_file)
 
 const BinSymbol *
 bin_file_lookup_symbol (BinFile    *bin_file,
-			gulong      address)
+			gsize      address)
 {
     if (bin_file->elf)
     {
diff --git a/src/binfile.h b/src/binfile.h
index 713b225..5aa7e6b 100644
--- a/src/binfile.h
+++ b/src/binfile.h
@@ -35,7 +35,7 @@ typedef struct BinSymbol BinSymbol;
 BinFile *        bin_file_new           (const char      *filename);
 void             bin_file_free          (BinFile         *bin_file);
 const BinSymbol *bin_file_lookup_symbol (BinFile         *bin_file,
-					 gulong           address);
+					 gsize           address);
 gboolean         bin_file_check_inode   (BinFile         *bin_file,
 					 ino_t		  inode);
 const char *     bin_symbol_get_name    (BinFile         *bin_file,
diff --git a/src/process.c b/src/process.c
index 4fefd1e..9128931 100644
--- a/src/process.c
+++ b/src/process.c
@@ -227,7 +227,7 @@ locate_map (MPProcess *process, guint addr)
 }
 
 const char *
-process_locate_symbol (MPProcess *process, guint addr)
+process_locate_symbol (MPProcess *process, gsize addr)
 {
 	Map *map = locate_map (process, addr);
 	const BinSymbol *symbol;
@@ -248,7 +248,7 @@ process_find_line (MPProcess *process, void *address,
 		   const char **filename, char **functionname,
 		   unsigned int *line)
 {
-	const char *s = process_locate_symbol (process, address);
+	const char *s = process_locate_symbol (process, GPOINTER_TO_SIZE (address));
 
 	if (s)
 	{



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