diff options
author | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-11-26 02:10:25 +0000 |
---|---|---|
committer | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-11-26 02:10:25 +0000 |
commit | 952a357274a9eb794aa999780c88ce7575d9cfed (patch) | |
tree | 3a141017f7cfef5f8ff5dcf6aa9291b87e1c1648 /vm_dump.c | |
parent | b96d267c7ec85ba5820bdf1a425c4b43da921335 (diff) |
* vm_dump.c (dump_thread): show the displacement from the beginning
of the symbol.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29937 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_dump.c')
-rw-r--r-- | vm_dump.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -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)); |