* 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
This commit is contained in:
parent
b96d267c7e
commit
952a357274
@ -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>
|
Fri Nov 26 10:48:23 2010 NAKAMURA Usaku <usa@ruby-lang.org>
|
||||||
|
|
||||||
* vm_dump.c (dump_thread): follow the output of glibc.
|
* vm_dump.c (dump_thread): follow the output of glibc.
|
||||||
|
@ -727,6 +727,7 @@ dump_thread(void *arg)
|
|||||||
NULL, NULL, NULL)) {
|
NULL, NULL, NULL)) {
|
||||||
DWORD64 addr = frame.AddrPC.Offset;
|
DWORD64 addr = frame.AddrPC.Offset;
|
||||||
IMAGEHLP_LINE64 line;
|
IMAGEHLP_LINE64 line;
|
||||||
|
DWORD64 displacement;
|
||||||
DWORD tmp;
|
DWORD tmp;
|
||||||
|
|
||||||
if (addr == frame.AddrReturn.Offset || addr == 0 ||
|
if (addr == frame.AddrReturn.Offset || addr == 0 ||
|
||||||
@ -736,10 +737,11 @@ dump_thread(void *arg)
|
|||||||
memset(buf, 0, sizeof(buf));
|
memset(buf, 0, sizeof(buf));
|
||||||
info->SizeOfStruct = sizeof(SYMBOL_INFO);
|
info->SizeOfStruct = sizeof(SYMBOL_INFO);
|
||||||
info->MaxNameLen = MAX_SYM_NAME;
|
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)))
|
if (GetModuleFileName((HANDLE)(uintptr_t)pSymGetModuleBase64(ph, addr), libpath, sizeof(libpath)))
|
||||||
fprintf(stderr, "%s", 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);
|
fprintf(stderr, " [0x%p]", (void *)(VALUE)addr);
|
||||||
memset(&line, 0, sizeof(line));
|
memset(&line, 0, sizeof(line));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user