Index: include/pub_tool_debuginfo.h
===================================================================
--- include/pub_tool_debuginfo.h	(revision 6605)
+++ include/pub_tool_debuginfo.h	(working copy)
@@ -77,6 +77,8 @@
 /* Succeeds if the address is within a shared object or the main executable.
    It doesn't matter if debug info is present or not. */
 extern Bool VG_(get_objname)  ( Addr a, Char* objname,  Int n_objname  );
+/* Returns the mapped base of the object for a given eip */
+extern Bool VG_(get_objbase)  ( Addr a, Addr* base);
 
 /* Puts into 'buf' info about the code address %eip:  the address, function
    name (if known) and filename/line number (if known), like this:
Index: coregrind/m_debuginfo/debuginfo.c
===================================================================
--- coregrind/m_debuginfo/debuginfo.c	(revision 6605)
+++ coregrind/m_debuginfo/debuginfo.c	(working copy)
@@ -682,6 +682,22 @@
    return False;
 }
 
+/* As VG_(get_objname) but returns the mapped base of the object */
+Bool VG_(get_objbase) ( Addr a, Addr* offset )
+{
+   SegInfo* si;
+
+   for (si = segInfo_list; si != NULL; si = si->next) {
+      if (si->text_start_avma <= a 
+          && a < si->text_start_avma + si->text_size) {
+         *offset = si->text_bias;
+         return True;
+      }
+   }
+   return False;
+}
+
+
 /* Map a code address to its SegInfo.  Returns NULL if not found.  Doesn't
    require debug info. */
 SegInfo* VG_(find_seginfo) ( Addr a )
@@ -869,6 +885,7 @@
       n = putStrEsc(n, n_buf, (_count), buf, (_str))
 #  define BUF_LEN    4096
 
+   Addr  base;
    UInt  lineno; 
    UChar ibuf[50];
    Int   n = 0;
@@ -881,6 +898,7 @@
                         ? VG_(get_fnname_w_offset) (eip, buf_fn, BUF_LEN)
                         : VG_(get_fnname) (eip, buf_fn, BUF_LEN);
    Bool  know_objname = VG_(get_objname)(eip, buf_obj, BUF_LEN);
+   Bool  know_objoff  = VG_(get_objbase)(eip,&base);
    Bool  know_srcloc  = VG_(get_filename_linenum)(
                            eip, 
                            buf_srcloc,  BUF_LEN, 
@@ -908,6 +926,11 @@
          APPEND("<obj>");
          APPEND_ESC(1*BUF_LEN/10, buf_obj);
          APPEND("</obj>");
+         if (know_objoff) {
+            VG_(sprintf)(ibuf,"<offset>0x%llX</offset>", (ULong)eip-(ULong)base);
+            APPEND(maybe_newline);
+            APPEND(ibuf);
+         }
       }
       if (know_fnname) {
          APPEND(maybe_newline);
