summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--vm_dump.c6
2 files changed, 9 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 6fa8074..9ac85cb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Fri Nov 26 11:09:07 2010 NAKAMURA Usaku <usa@ruby-lang.org>
+
+ * vm_dump.c (dump_thread): show the displacement from the beginning
+ of the symbol.
+
Fri Nov 26 10:48:23 2010 NAKAMURA Usaku <usa@ruby-lang.org>
* vm_dump.c (dump_thread): follow the output of glibc.
diff --git a/vm_dump.c b/vm_dump.c
index 757bf7e..60fce89 100644
--- a/vm_dump.c
+++ b/vm_dump.c
@@ -727,6 +727,7 @@ dump_thread(void *arg)
NULL, NULL, NULL)) {
DWORD64 addr = frame.AddrPC.Offset;
IMAGEHLP_LINE64 line;
+ DWORD64 displacement;
DWORD tmp;
if (addr == frame.AddrReturn.Offset || addr == 0 ||
@@ -736,10 +737,11 @@ dump_thread(void *arg)
memset(buf, 0, sizeof(buf));
info->SizeOfStruct = sizeof(SYMBOL_INFO);
info->MaxNameLen = MAX_SYM_NAME;
- if (pSymFromAddr(ph, addr, NULL, info)) {
+ if (pSymFromAddr(ph, addr, &displacement, info)) {
if (GetModuleFileName((HANDLE)(uintptr_t)pSymGetModuleBase64(ph, addr), libpath, sizeof(libpath)))
fprintf(stderr, "%s", libpath);
- fprintf(stderr, "(%s)", info->Name);
+ fprintf(stderr, "(%s+0x%I64x)",
+ info->Name, displacement);
}
fprintf(stderr, " [0x%p]", (void *)(VALUE)addr);
memset(&line, 0, sizeof(line));