ruby-changes:17921
From: usa <ko1@a...>
Date: Fri, 26 Nov 2010 11:10:31 +0900 (JST)
Subject: [ruby-changes:17921] Ruby:r29937 (trunk): * vm_dump.c (dump_thread): show the displacement from the beginning
usa 2010-11-26 11:10:25 +0900 (Fri, 26 Nov 2010) New Revision: 29937 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=29937 Log: * vm_dump.c (dump_thread): show the displacement from the beginning of the symbol. Modified files: trunk/ChangeLog trunk/vm_dump.c Index: ChangeLog =================================================================== --- ChangeLog (revision 29936) +++ ChangeLog (revision 29937) @@ -1,3 +1,8 @@ +Fri Nov 26 11:09:07 2010 NAKAMURA Usaku <usa@r...> + + * vm_dump.c (dump_thread): show the displacement from the beginning + of the symbol. + Fri Nov 26 10:48:23 2010 NAKAMURA Usaku <usa@r...> * vm_dump.c (dump_thread): follow the output of glibc. Index: vm_dump.c =================================================================== --- vm_dump.c (revision 29936) +++ vm_dump.c (revision 29937) @@ -727,6 +727,7 @@ 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 @@ 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)); -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/