Index: helgrind/hg_main.c
===================================================================
--- helgrind/hg_main.c	(revision 6605)
+++ helgrind/hg_main.c	(working copy)
@@ -2749,7 +2749,7 @@
 		      unpackTLS(extra->lasttouched.tls)->tid);
 	 
 	 if (VG_(get_filename_linenum)(ip, file, sizeof(file), 
-                                           NULL, 0, NULL, &line)) {
+                                           NULL, 0, NULL, &line, NULL)) {
 	    VG_(message)(Vg_UserMsg, "   at %p: %y (%s:%u)",
 			 ip, ip, file, line);
 	 } else if (VG_(get_objname)(ip, file, sizeof(file))) {
Index: callgrind/fn.c
===================================================================
--- callgrind/fn.c	(revision 6605)
+++ callgrind/fn.c	(working copy)
@@ -382,7 +382,7 @@
    found1 = VG_(get_filename_linenum)(instr_addr,
 				      filename, FILENAME_LEN,
 				      NULL, 0, NULL, // FIXME: add dirnames!
-				      &line);
+				      &line, NULL);
    found2 = VG_(get_fnname)(instr_addr, 
 			    fn_name, FN_NAME_LEN);
 
Index: callgrind/dump.c
===================================================================
--- callgrind/dump.c	(revision 6605)
+++ callgrind/dump.c	(working copy)
@@ -451,7 +451,7 @@
 	res = VG_(get_filename_linenum)(addr,
 					file, FILENAME_LEN,
 					NULL, 0, NULL, //FIXME
-					&(p->line));
+					&(p->line), NULL);
 	if (!res) {
 	    VG_(strcpy)(file, "???");
 	    p->line = 0;
Index: include/pub_tool_debuginfo.h
===================================================================
--- include/pub_tool_debuginfo.h	(revision 6605)
+++ include/pub_tool_debuginfo.h	(working copy)
@@ -63,7 +63,8 @@
                                 /*OUT*/Char* filename, Int n_filename,
                                 /*OUT*/Char* dirname,  Int n_dirname,
                                 /*OUT*/Bool* dirname_available,
-                                /*OUT*/UInt* linenum );
+                                /*OUT*/UInt* linenum,
+				/*OUT*/Addr* offset);
 
 /* Succeeds only if we find from debug info that 'a' is the address of the
    first instruction in a function -- as opposed to VG_(get_fnname) which
Index: cachegrind/cg_main.c
===================================================================
--- cachegrind/cg_main.c	(revision 6605)
+++ cachegrind/cg_main.c	(working copy)
@@ -194,7 +194,7 @@
                              instr_addr, 
                              file, FILE_LEN,
                              NULL, 0, NULL,
-                             line
+                             line, NULL
                           );
    Bool found_fn        = VG_(get_fnname)(instr_addr, fn, FN_LEN);
 
Index: coregrind/m_debuginfo/debuginfo.c
===================================================================
--- coregrind/m_debuginfo/debuginfo.c	(revision 6605)
+++ coregrind/m_debuginfo/debuginfo.c	(working copy)
@@ -729,7 +729,8 @@
                                  /*OUT*/Char* filename, Int n_filename,
                                  /*OUT*/Char* dirname,  Int n_dirname,
                                  /*OUT*/Bool* dirname_available,
-                                 /*OUT*/UInt* lineno )
+                                 /*OUT*/UInt* lineno,
+				 /*OUT*/Addr* offset)
 {
    SegInfo* si;
    Int      locno;
@@ -743,6 +744,8 @@
       return False;
    VG_(strncpy_safely)(filename, si->loctab[locno].filename, n_filename);
    *lineno = si->loctab[locno].lineno;
+   if ( offset )
+	   *offset = si->text_bias;
 
    if (dirname) {
       /* caller wants directory info too .. */
@@ -869,6 +872,7 @@
       n = putStrEsc(n, n_buf, (_count), buf, (_str))
 #  define BUF_LEN    4096
 
+   Addr  offset;
    UInt  lineno; 
    UChar ibuf[50];
    Int   n = 0;
@@ -885,7 +889,7 @@
                            eip, 
                            buf_srcloc,  BUF_LEN, 
                            buf_dirname, BUF_LEN, &know_dirinfo,
-                           &lineno 
+                           &lineno, &offset 
                         );
    if (VG_(clo_xml)) {
 
@@ -908,6 +912,9 @@
          APPEND("<obj>");
          APPEND_ESC(1*BUF_LEN/10, buf_obj);
          APPEND("</obj>");
+	 VG_(sprintf)(ibuf,"<offset>0x%llX</offset>", (ULong)eip-offset);
+	 APPEND(maybe_newline);
+	 APPEND(ibuf);
       }
       if (know_fnname) {
          APPEND(maybe_newline);
