X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=tools%2Fllvm-rtdyld%2Fllvm-rtdyld.cpp;h=b68f2a08d92726d4baf7fd936f2afeb6357cacc9;hb=0a230e0d985625a3909cb78fd867a3abaf434565;hp=8b71a4f364128f2c9c647661739f34f36003f076;hpb=ee7c0d2f931590ccdc53a14b1839e11bb29fc96e;p=oota-llvm.git diff --git a/tools/llvm-rtdyld/llvm-rtdyld.cpp b/tools/llvm-rtdyld/llvm-rtdyld.cpp index 8b71a4f3641..b68f2a08d92 100644 --- a/tools/llvm-rtdyld/llvm-rtdyld.cpp +++ b/tools/llvm-rtdyld/llvm-rtdyld.cpp @@ -17,7 +17,7 @@ #include "llvm/ExecutionEngine/ObjectBuffer.h" #include "llvm/ExecutionEngine/ObjectImage.h" #include "llvm/ExecutionEngine/RuntimeDyld.h" -#include "llvm/Object/MachOObject.h" +#include "llvm/Object/MachO.h" #include "llvm/Support/CommandLine.h" #include "llvm/Support/ManagedStatic.h" #include "llvm/Support/Memory.h" @@ -69,7 +69,7 @@ public: return 0; } - bool applyPermissions(std::string *ErrMsg) { return false; } + bool finalizeMemory(std::string *ErrMsg) { return false; } // Invalidate instruction cache for sections with execute permissions. // Some platforms with separate data cache and instruction cache require @@ -163,8 +163,14 @@ static int printLineInfoForInput() { outs() << "Function: " << Name << ", Size = " << Size << "\n"; - DILineInfo Result = Context->getLineInfoForAddress(Addr); - outs() << " Line info:" << Result.getFileName() << ", line:" << Result.getLine() << "\n"; + DILineInfoTable Lines = Context->getLineInfoForAddressRange(Addr, Size); + DILineInfoTable::iterator Begin = Lines.begin(); + DILineInfoTable::iterator End = Lines.end(); + for (DILineInfoTable::iterator It = Begin; It != End; ++It) { + outs() << " Line info @ " << It->first - Addr << ": " + << It->second.getFileName() + << ", line:" << It->second.getLine() << "\n"; + } } } }