Add support for reading Windows PDB debug info (symbols and line
numbers) when Valgrind is running Wine.  Modified version of a
patch by John Reiser (vgsvn+wine-load-pdb-debuginfo.patch) with
extensions to read a second format of line number tables.

Wine uses a new client request, VG_USERREQ__LOAD_PDB_DEBUGINFO,
to tell Valgrind when to read PDB info.  Wine's implementation
of module loading is vastly different from that used by
ld-linux.so, and it is too difficult to recognize what is going
on just by observing the calls to mmap and mprotect.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9580 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/coregrind/m_stacktrace.c b/coregrind/m_stacktrace.c
index 86decb5..aeb98ad 100644
--- a/coregrind/m_stacktrace.c
+++ b/coregrind/m_stacktrace.c
@@ -184,6 +184,17 @@
          continue;
       }
 
+      /* And, similarly, try for MSVC FPO unwind info. */
+      if ( VG_(use_FPO_info)( &ip, &sp, &fp, fp_min, fp_max ) ) {
+         if (sps) sps[i] = sp;
+         if (fps) fps[i] = fp;
+         ips[i++] = ip;
+         if (debug)
+            VG_(printf)("     ipsC[%d]=0x%08lx\n", i-1, ips[i-1]);
+         ip = ip - 1;
+         continue;
+      }
+
       /* No luck.  We have to give up. */
       break;
    }