[vmkit-commits] [vmkit] r108825 - /vmkit/trunk/lib/Mvm/Runtime/MethodInfo.cpp
Nicolas Geoffray
nicolas.geoffray at lip6.fr
Tue Jul 20 05:03:18 PDT 2010
Author: geoffray
Date: Tue Jul 20 07:03:18 2010
New Revision: 108825
URL: http://llvm.org/viewvc/llvm-project?rev=108825&view=rev
Log:
Do not create a frame for methods that start just when an ending label of the previous function begins.
Modified:
vmkit/trunk/lib/Mvm/Runtime/MethodInfo.cpp
Modified: vmkit/trunk/lib/Mvm/Runtime/MethodInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/Mvm/Runtime/MethodInfo.cpp?rev=108825&r1=108824&r2=108825&view=diff
==============================================================================
--- vmkit/trunk/lib/Mvm/Runtime/MethodInfo.cpp (original)
+++ vmkit/trunk/lib/Mvm/Runtime/MethodInfo.cpp Tue Jul 20 07:03:18 2010
@@ -41,14 +41,14 @@
}
void StaticCamlMethodInfo::print(void* ip, void* addr) {
- fprintf(stderr, "; %p in %s static method\n", ip, name);
+ fprintf(stderr, "; %p (%p) in %s static method\n", ip, addr, name);
}
void DefaultMethodInfo::print(void* ip, void* addr) {
Dl_info info;
int res = dladdr(ip, &info);
if (res != 0) {
- fprintf(stderr, "; %p in %s\n", ip, info.dli_sname);
+ fprintf(stderr, "; %p (%p) in %s\n", ip, addr, info.dli_sname);
} else {
fprintf(stderr, "; %p in Unknown method\n", ip);
}
@@ -124,7 +124,10 @@
for (uint16_t i = 0; i < frames->NumDescriptors; i++) {
int res = dladdr(currentFrame->ReturnAddress, &info);
if (res != 0) {
- if (previousPtr && info.dli_saddr != previousPtr) {
+ if (previousPtr && info.dli_saddr != previousPtr &&
+ previousFrame->ReturnAddress != previousPtr) { // This test is to avoid adding a frame to a method
+ // that does not have one but starts just where the previous
+ // method ends.
StaticCamlMethodInfo* MI =
new(*StaticAllocator, "StaticCamlMethodInfo")
StaticCamlMethodInfo(previousFrame, previousPtr, previousName);
More information about the vmkit-commits
mailing list