LLVM API Documentation

Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

UnixLocalInferiorProcess.cpp File Reference

#include "llvm/Debugger/InferiorProcess.h"
#include "llvm/Constant.h"
#include "llvm/Instructions.h"
#include "llvm/Module.h"
#include "llvm/ModuleProvider.h"
#include "llvm/Type.h"
#include "llvm/CodeGen/IntrinsicLowering.h"
#include "llvm/ExecutionEngine/GenericValue.h"
#include "llvm/ExecutionEngine/ExecutionEngine.h"
#include "llvm/Support/FileUtilities.h"
#include "llvm/ADT/StringExtras.h"
#include <cerrno>
#include <csignal>
#include <unistd.h>
#include <sys/types.h>
#include <sys/wait.h>

Include dependency graph for UnixLocalInferiorProcess.cpp:

Go to the source code of this file.

Functions

static void runChild (Module *M, const std::vector< std::string > &Arguments, const char *const *envp, FDHandle ReadFD, FDHandle WriteFD)
void * llvm_debugger_stop (void *Dummy, unsigned Line, unsigned Col, void *SourceDescriptor)
void * llvm_dbg_region_start (void *Dummy)
void * llvm_dbg_subprogram (void *FuncDesc)
void llvm_dbg_region_end (void *Dummy)

Variables

Child * TheChild = 0


Function Documentation

void llvm_dbg_region_end void *  Dummy  ) 
 

llvm_dbg_region_end - This function is invoked every time a source-language region (started with llvm.dbg.region.start or llvm.dbg.func.start) is terminated.

Definition at line 851 of file UnixLocalInferiorProcess.cpp.

References TheChild.

void* llvm_dbg_region_start void *  Dummy  ) 
 

llvm_dbg_region_start - This function is invoked every time an anonymous region of the source program is entered.

Definition at line 832 of file UnixLocalInferiorProcess.cpp.

References TheChild.

void* llvm_dbg_subprogram void *  FuncDesc  ) 
 

llvm_dbg_subprogram - This function is invoked every time a source-language subprogram has been entered.

Definition at line 841 of file UnixLocalInferiorProcess.cpp.

References TheChild.

void* llvm_debugger_stop void *  Dummy,
unsigned  Line,
unsigned  Col,
void *  SourceDescriptor
 

llvm_debugger_stop - Every time the program reaches a new source line, it will call back to this function. If the debugger has a breakpoint or otherwise wants us to stop on this line, we do so, and notify the debugger over the pipe.

Definition at line 821 of file UnixLocalInferiorProcess.cpp.

References TheChild.

static void runChild Module M,
const std::vector< std::string > &  Arguments,
const char *const *  envp,
FDHandle  ReadFD,
FDHandle  WriteFD
[static]
 

Definition at line 896 of file UnixLocalInferiorProcess.cpp.

References abort(), EE, llvm::GenericValue::IntVal, llvm::ExecutionEngine::runFunction(), llvm::ExecutionEngine::runFunctionAsMain(), and TheChild.


Variable Documentation

std::vector<std::pair<unsigned, LocationToken> > Breakpoints
 

Breakpoints - This contains a list of active breakpoints and their IDs.

Definition at line 576 of file UnixLocalInferiorProcess.cpp.

unsigned CurBreakpoint
 

CurBreakpoint - The last assigned breakpoint.

Definition at line 580 of file UnixLocalInferiorProcess.cpp.

unsigned CurCol
 

CurLine, CurCol, CurFile - The last location visited by this region. This is used for getting the source location of callers in stack frames.

Definition at line 499 of file UnixLocalInferiorProcess.cpp.

void* CurFileDesc
 

Definition at line 500 of file UnixLocalInferiorProcess.cpp.

unsigned CurLine
 

CurLine, CurCol, CurFile - The last location visited by this region. This is used for getting the source location of callers in stack frames.

Definition at line 499 of file UnixLocalInferiorProcess.cpp.

SourceSubprogram* CurSubprogram
 

CurSubprogram - The subprogram that contains this region. This allows efficient stack traversals.

Definition at line 495 of file UnixLocalInferiorProcess.cpp.

void* Desc
 

Desc - A pointer to the descriptor for the subprogram that this frame represents.

Definition at line 538 of file UnixLocalInferiorProcess.cpp.

Referenced by getTypeDescription().

ExecutionEngine* EE
 

EE - The execution engine that we are using to run the program.

Definition at line 556 of file UnixLocalInferiorProcess.cpp.

Referenced by llvm::ExecutionEngine::create(), llvm::Graph::getNumberOfIncomingEdges(), llvm::Graph::getPredNodes(), runChild(), and llvm::GraphWriter< GraphType >::writeNode().

Module* M
 

M - The module for the program currently being debugged.

Definition at line 552 of file UnixLocalInferiorProcess.cpp.

Referenced by CheckVarargs(), llvm::ExecutionEngine::create(), llvm::Archive::getAllModules(), llvm::ProfileInfoLoader::getBlockCounts(), llvm::GetBytecodeDependentLibraries(), llvm::GetBytecodeSymbols(), getCaption(), llvm::ProfileInfoLoader::getEdgeCounts(), llvm::ProfileInfoLoader::getFunctionCounts(), getModuleFromVal(), getPointerToNamedFunction(), llvm::ProgramInfo::getSourceFiles(), llvm::ProgramInfo::getSourceFunctions(), InsertInstrumentationCall(), llvm::InsertProfilingInitCall(), LinkInFile(), llvm::Mangler::Mangler(), llvm::DSNode::mergeTypeInfo(), llvm::ProgramInfo::ProgramInfo(), llvm::BytecodeReader::releaseModule(), ReplaceCallWith(), llvm::BasicBlockPass::runPass(), llvm::SimplifyCFG(), and SolveQuadraticEquation().

SourceRegion* Parent
 

Parent - A pointer to the region that encloses the current one.

Definition at line 491 of file UnixLocalInferiorProcess.cpp.

Referenced by llvm::Argument::Argument(), llvm::Instruction::getParent(), llvm::Argument::getParent(), llvm::Interpreter::visitCallSite(), and llvm::Instruction::~Instruction().

FDHandle ReadFD
 

ReadFD, WriteFD - The file descriptor handles for this side of the debugger pipe.

Definition at line 560 of file UnixLocalInferiorProcess.cpp.

SourceRegion* RegionStack
 

RegionStack - A linked list of all of the regions dynamically active.

Definition at line 564 of file UnixLocalInferiorProcess.cpp.

volatile bool StopAtNextOpportunity
 

StopAtNextOpportunity - If this flag is set, the child process will stop and report to the debugger at the next possible chance it gets.

Definition at line 568 of file UnixLocalInferiorProcess.cpp.

SourceSubprogram* StopWhenSubprogramReturns
 

StopWhenSubprogramReturns - If this is non-null, the debugger requests that the program stops when the specified function frame is destroyed.

Definition at line 572 of file UnixLocalInferiorProcess.cpp.

Child* TheChild = 0 [static]
 

TheChild - The single instance of the Child class, which only gets created in the child process.

Definition at line 628 of file UnixLocalInferiorProcess.cpp.

Referenced by llvm_dbg_region_end(), llvm_dbg_region_start(), llvm_dbg_subprogram(), llvm_debugger_stop(), and runChild().

FDHandle WriteFD
 

ReadFD, WriteFD - The file descriptor handles for this side of the debugger pipe.

Definition at line 560 of file UnixLocalInferiorProcess.cpp.