Introduce a new type, PtrdiffT.  Replace lots of uses of OffT (all those
that are memory offsets) with PtrdiffT;  OffT should only be used for file
sizes and offsets.

Change Off64T from a ULong to a Long, as it should be.  Replace some uses
of ULong in the address space manager with Off64T to match.

Also add a comment explaining the meanings of the basic types like Addr,
OffT, SizeT, etc.

Also fix the prototype for VG_(pread) -- the last arg is an OffT, not an
Int.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8959 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/include/pub_tool_debuginfo.h b/include/pub_tool_debuginfo.h
index 30725d5..baf9981 100644
--- a/include/pub_tool_debuginfo.h
+++ b/include/pub_tool_debuginfo.h
@@ -80,7 +80,7 @@
    from the symbol start is put into *offset. */
 extern Bool VG_(get_datasym_and_offset)( Addr data_addr,
                                          /*OUT*/Char* dname, Int n_dname,
-                                         /*OUT*/OffT* offset );
+                                         /*OUT*/PtrdiffT* offset );
 
 /* Try to form some description of data_addr by looking at the DWARF3
    debug info we have.  This considers all global variables, and all
@@ -113,11 +113,11 @@
 
 typedef
    struct {
-      OffT  base;     /* offset from sp or fp */
-      SizeT szB;      /* size in bytes */
-      Bool  spRel;    /* True => sp-rel, False => fp-rel */
-      Bool  isVec;    /* does block have an array type, or not? */
-      HChar name[16]; /* first 15 chars of name (asciiz) */
+      PtrdiffT base;       /* offset from sp or fp */
+      SizeT    szB;        /* size in bytes */
+      Bool     spRel;      /* True => sp-rel, False => fp-rel */
+      Bool     isVec;      /* does block have an array type, or not? */
+      HChar    name[16];   /* first 15 chars of name (asciiz) */
    }
    StackBlock;
 
@@ -167,7 +167,7 @@
 extern       SizeT    VG_(seginfo_get_gotplt_size)( const DebugInfo *di );
 extern const UChar*   VG_(seginfo_soname)       ( const DebugInfo *di );
 extern const UChar*   VG_(seginfo_filename)     ( const DebugInfo *di );
-extern       ULong    VG_(seginfo_get_text_bias)( const DebugInfo *di );
+extern       PtrdiffT VG_(seginfo_get_text_bias)( const DebugInfo *di );
 
 /* Function for traversing the seginfo list.  When called with NULL it
    returns the first element; otherwise it returns the given element's