diff options
author | Chris Lattner <sabre@nondot.org> | 2009-10-05 02:29:51 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-10-05 02:29:51 +0000 |
commit | cb08fb7b8301ebaf1d91207644f6b45e3ff1c27e (patch) | |
tree | 70dbd001b44a08252e580badf2077dd625054b32 /llvm/lib/Debugger/RuntimeInfo.cpp | |
parent | 4002c8eeaa7d8d44408089bd64904d2e0d5cb28a (diff) | |
download | bcm5719-llvm-cb08fb7b8301ebaf1d91207644f6b45e3ff1c27e.tar.gz bcm5719-llvm-cb08fb7b8301ebaf1d91207644f6b45e3ff1c27e.zip |
remove llvm-db: it is completely broken and if anyone wants to do a debugger,
they should not base it on llvm-db (which not following almost any "best practices").
llvm-svn: 83288
Diffstat (limited to 'llvm/lib/Debugger/RuntimeInfo.cpp')
-rw-r--r-- | llvm/lib/Debugger/RuntimeInfo.cpp | 69 |
1 files changed, 0 insertions, 69 deletions
diff --git a/llvm/lib/Debugger/RuntimeInfo.cpp b/llvm/lib/Debugger/RuntimeInfo.cpp deleted file mode 100644 index 2f0ff72a771..00000000000 --- a/llvm/lib/Debugger/RuntimeInfo.cpp +++ /dev/null @@ -1,69 +0,0 @@ -//===-- RuntimeInfo.cpp - Compute and cache info about running program ----===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file implements the RuntimeInfo and related classes, by querying and -// cachine information from the running inferior process. -// -//===----------------------------------------------------------------------===// - -#include "llvm/Debugger/InferiorProcess.h" -#include "llvm/Debugger/ProgramInfo.h" -#include "llvm/Debugger/RuntimeInfo.h" -using namespace llvm; - -//===----------------------------------------------------------------------===// -// StackFrame class implementation - -StackFrame::StackFrame(RuntimeInfo &ri, void *ParentFrameID) - : RI(ri), SourceInfo(0) { - FrameID = RI.getInferiorProcess().getPreviousFrame(ParentFrameID); - if (FrameID == 0) throw "Stack frame does not exist!"; - - // Compute lazily as needed. - FunctionDesc = 0; -} - -const GlobalVariable *StackFrame::getFunctionDesc() { - if (FunctionDesc == 0) - FunctionDesc = RI.getInferiorProcess().getSubprogramDesc(FrameID); - return FunctionDesc; -} - -/// getSourceLocation - Return the source location that this stack frame is -/// sitting at. -void StackFrame::getSourceLocation(unsigned &lineNo, unsigned &colNo, - const SourceFileInfo *&sourceInfo) { - if (SourceInfo == 0) { - const GlobalVariable *SourceDesc = 0; - RI.getInferiorProcess().getFrameLocation(FrameID, LineNo,ColNo, SourceDesc); - SourceInfo = &RI.getProgramInfo().getSourceFile(SourceDesc); - } - - lineNo = LineNo; - colNo = ColNo; - sourceInfo = SourceInfo; -} - -//===----------------------------------------------------------------------===// -// RuntimeInfo class implementation - -/// materializeFrame - Create and process all frames up to and including the -/// specified frame number. This throws an exception if the specified frame -/// ID is nonexistant. -void RuntimeInfo::materializeFrame(unsigned ID) { - assert(ID >= CallStack.size() && "no need to materialize this frame!"); - void *CurFrame = 0; - if (!CallStack.empty()) - CurFrame = CallStack.back().getFrameID(); - - while (CallStack.size() <= ID) { - CallStack.push_back(StackFrame(*this, CurFrame)); - CurFrame = CallStack.back().getFrameID(); - } -} |