C# 클래스 VSNDK.DebugEngine.EventDispatcher

파일 보기 프로젝트 열기: blackberry/VSPlugin 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
countSIGINT int
inCriticalRegion bool
m_GDBRunMode bool
m_unknownCode bool

공개 메소드들

메소드 설명
EventDispatcher ( AD7Engine engine ) : System

Constructor. Starts the thread responsible for handling asynchronous GDB output.

breakpointHit ( uint ID, string threadID ) : void

Update VS when a breakpoint is hit in GDB.

continueExecution ( ) : void

Called after the debug engine has set the initial breakpoints, or to resume a process that was interrupted.

createVar ( string name, bool &hasVsNdK_ ) : string

Creates a variable object.

deleteBreakpoint ( uint GDB_ID ) : bool

Delete a breakpoint in GDB.

deleteVar ( string name, bool hasVsNdK_ ) : void

Deletes a previously created variable object and all of its children.

enableBreakpoint ( uint GDB_ID, bool fEnable ) : bool

Enable or disable a breakpoint.

endDebugSession ( uint exitCode ) : void

Ends the debug session by closing GDB, sending the appropriate events to the SDM, and breaking out of all buffer- and event-listening loops.

enterCriticalRegion ( ) : bool

Control access to a critical region, that manipulates some of the debug engine variables, like its state. This is done to avoid a race condition that can happen when user modifies a breakpoint condition at run time and the same breakpoint is hit. When that happens, only one event will be handled at a time.

getDocumentContext ( string filename, uint line ) : AD7DocumentContext

Returns the document context needed for showing the location of the current instruction pointer.

getStackDepth ( string threadID ) : int

Return the depth of the stack.

getStackFrames ( ) : string

List the frames currently on the stack.

getVariablesForFrame ( uint frameIndex, string threadID ) : string

List the names of local variables and function arguments for the selected frame.

ignoreHitCount ( uint GDB_ID, int ignore ) : bool

Ignore a given number of hit counts in GDB.

killProcess ( ) : void

Kill the child process in which your program is running under gdb.

leaveCriticalRegion ( ) : void

Leave the critical region, that manipulates some of the debug engine variables, like its state. This is done to avoid a race condition that can happen when user modifies a breakpoint condition at run time and the same breakpoint is hit. When that happens, only one event will be handled at a time.

listChildren ( string name ) : string

Return a list of the children of the specified variable object.

lockedBreakpoint ( AD7BoundBreakpoint bbp, bool hit, bool cond ) : bool

Lock a breakpoint before updating its hit counts and/or condition. This is done to avoid a race condition that can happen when user modifies a breakpoint condition at run time and the same breakpoint is hit. When that happens, only one event will be handled at a time.

prepareToModifyBreakpoint ( ) : void

Interrupt the debugged process if necessary before changing a breakpoint.

resetHitCount ( AD7BoundBreakpoint bbp, bool resetCondition ) : bool

Reset current hit count in GDB. There is no way to reset hit counts in GDB. To implement this functionality, the specified GDB breakpoint is deleted and a new one is created with the same conditions, substituting the GDB_ID of the VS breakpoint.

resumeFromInterrupt ( ) : void

If the process was running when the breakpoint was changed, resume the process.

selectThread ( string id ) : void

Make "id" the current thread.

setBreakpoint ( string func, uint &GDB_ID, uint &GDB_line, string &GDB_filename, string &GDB_address ) : bool

Set a breakpoint given a function name.

setBreakpoint ( string filename, uint line, uint &GDB_ID, uint &GDB_line, string &GDB_filename, string &GDB_address ) : bool

Set a breakpoint given a filename and line number.

setBreakpointCondition ( uint GDB_ID, string condition ) : bool

Set breakpoint condition in GDB.

unlockBreakpoint ( AD7BoundBreakpoint bbp, bool hit, bool cond ) : void

Unlock a breakpoint after updating its hit counts and/or condition. This is done to avoid a race condition that can happen when user modifies a breakpoint condition at run time and the same breakpoint is hit. When that happens, only one event will be handled at a time.

updateHitCount ( uint ID, uint hitCount ) : void

Update hit count.

비공개 메소드들

메소드 설명
setBreakpointImpl ( string command, string command2, uint &GDB_ID, uint &GDB_line, string &GDB_filename, string &GDB_address ) : bool

Code to set the breakpoint in GDB and then confirm and set in Visual Studio

메소드 상세

EventDispatcher() 공개 메소드

Constructor. Starts the thread responsible for handling asynchronous GDB output.
public EventDispatcher ( AD7Engine engine ) : System
engine AD7Engine The AD7Engine object that represents the DE.
리턴 System

breakpointHit() 공개 메소드

Update VS when a breakpoint is hit in GDB.
public breakpointHit ( uint ID, string threadID ) : void
ID uint Breakpoint ID from GDB.
threadID string Thread ID.
리턴 void

continueExecution() 공개 메소드

Called after the debug engine has set the initial breakpoints, or to resume a process that was interrupted.
public continueExecution ( ) : void
리턴 void

createVar() 공개 메소드

Creates a variable object.
public createVar ( string name, bool &hasVsNdK_ ) : string
name string Name of the variable.
hasVsNdK_ bool Boolean value that indicates if the variable name has the prefix VsNdK_.
리턴 string

deleteBreakpoint() 공개 메소드

Delete a breakpoint in GDB.
public deleteBreakpoint ( uint GDB_ID ) : bool
GDB_ID uint Breakpoint ID in GDB.
리턴 bool

deleteVar() 공개 메소드

Deletes a previously created variable object and all of its children.
public deleteVar ( string name, bool hasVsNdK_ ) : void
name string Name of the variable.
hasVsNdK_ bool Boolean value that indicates if the variable name has the prefix VsNdK_.
리턴 void

enableBreakpoint() 공개 메소드

Enable or disable a breakpoint.
public enableBreakpoint ( uint GDB_ID, bool fEnable ) : bool
GDB_ID uint Breakpoint ID in GDB.
fEnable bool If true, enable the breakpoint. If false, disable it.
리턴 bool

endDebugSession() 공개 메소드

Ends the debug session by closing GDB, sending the appropriate events to the SDM, and breaking out of all buffer- and event-listening loops.
public endDebugSession ( uint exitCode ) : void
exitCode uint The exit code.
리턴 void

enterCriticalRegion() 공개 메소드

Control access to a critical region, that manipulates some of the debug engine variables, like its state. This is done to avoid a race condition that can happen when user modifies a breakpoint condition at run time and the same breakpoint is hit. When that happens, only one event will be handled at a time.
public enterCriticalRegion ( ) : bool
리턴 bool

getDocumentContext() 공개 메소드

Returns the document context needed for showing the location of the current instruction pointer.
public getDocumentContext ( string filename, uint line ) : AD7DocumentContext
filename string File name.
line uint Line number.
리턴 AD7DocumentContext

getStackDepth() 공개 메소드

Return the depth of the stack.
public getStackDepth ( string threadID ) : int
threadID string Thread ID.
리턴 int

getStackFrames() 공개 메소드

List the frames currently on the stack.
public getStackFrames ( ) : string
리턴 string

getVariablesForFrame() 공개 메소드

List the names of local variables and function arguments for the selected frame.
public getVariablesForFrame ( uint frameIndex, string threadID ) : string
frameIndex uint Frame number.
threadID string Thread ID.
리턴 string

ignoreHitCount() 공개 메소드

Ignore a given number of hit counts in GDB.
public ignoreHitCount ( uint GDB_ID, int ignore ) : bool
GDB_ID uint Breakpoint ID in GDB.
ignore int Number of hit counts to ignore.
리턴 bool

killProcess() 공개 메소드

Kill the child process in which your program is running under gdb.
public killProcess ( ) : void
리턴 void

leaveCriticalRegion() 공개 메소드

Leave the critical region, that manipulates some of the debug engine variables, like its state. This is done to avoid a race condition that can happen when user modifies a breakpoint condition at run time and the same breakpoint is hit. When that happens, only one event will be handled at a time.
public leaveCriticalRegion ( ) : void
리턴 void

listChildren() 공개 메소드

Return a list of the children of the specified variable object.
public listChildren ( string name ) : string
name string Variable name.
리턴 string

lockedBreakpoint() 공개 메소드

Lock a breakpoint before updating its hit counts and/or condition. This is done to avoid a race condition that can happen when user modifies a breakpoint condition at run time and the same breakpoint is hit. When that happens, only one event will be handled at a time.
public lockedBreakpoint ( AD7BoundBreakpoint bbp, bool hit, bool cond ) : bool
bbp AD7BoundBreakpoint Breakpoint to be locked.
hit bool True if user is adding/modifying count and conditions upon which a breakpoint is fired. It is also true /// when event dispatcher is handling a breakpoint hit.
cond bool True if user is adding/modifying conditions under which a conditional breakpoint fires. It is also true /// when event dispatcher is handling a breakpoint hit.
리턴 bool

prepareToModifyBreakpoint() 공개 메소드

Interrupt the debugged process if necessary before changing a breakpoint.
public prepareToModifyBreakpoint ( ) : void
리턴 void

resetHitCount() 공개 메소드

Reset current hit count in GDB. There is no way to reset hit counts in GDB. To implement this functionality, the specified GDB breakpoint is deleted and a new one is created with the same conditions, substituting the GDB_ID of the VS breakpoint.
public resetHitCount ( AD7BoundBreakpoint bbp, bool resetCondition ) : bool
bbp AD7BoundBreakpoint The VS breakpoint.
resetCondition bool Is false when this method is called by SetCondition, true if not. Used to avoid setting /// breakpoint conditions again in case it is called by SetCondition method.
리턴 bool

resumeFromInterrupt() 공개 메소드

If the process was running when the breakpoint was changed, resume the process.
public resumeFromInterrupt ( ) : void
리턴 void

selectThread() 공개 메소드

Make "id" the current thread.
public selectThread ( string id ) : void
id string Thread ID.
리턴 void

setBreakpoint() 공개 메소드

Set a breakpoint given a function name.
public setBreakpoint ( string func, uint &GDB_ID, uint &GDB_line, string &GDB_filename, string &GDB_address ) : bool
func string Function name.
GDB_ID uint Returns the breakpoint ID in GDB.
GDB_line uint Returns the breakpoint Line Number.
GDB_filename string Returns the breakpoint File Name.
GDB_address string Returns the Breakpoint Address.
리턴 bool

setBreakpoint() 공개 메소드

Set a breakpoint given a filename and line number.
public setBreakpoint ( string filename, uint line, uint &GDB_ID, uint &GDB_line, string &GDB_filename, string &GDB_address ) : bool
filename string Full path and filename for the code source.
line uint The line number for the breakpoint.
GDB_ID uint Returns the breakpoint ID in GDB.
GDB_line uint Returns the breakpoint Line Number.
GDB_filename string Returns the breakpoint File Name.
GDB_address string Returns the Breakpoint Address.
리턴 bool

setBreakpointCondition() 공개 메소드

Set breakpoint condition in GDB.
public setBreakpointCondition ( uint GDB_ID, string condition ) : bool
GDB_ID uint Breakpoint ID in GDB.
condition string Condition to be set. When empty (""), means to remove any previous condition.
리턴 bool

unlockBreakpoint() 공개 메소드

Unlock a breakpoint after updating its hit counts and/or condition. This is done to avoid a race condition that can happen when user modifies a breakpoint condition at run time and the same breakpoint is hit. When that happens, only one event will be handled at a time.
public unlockBreakpoint ( AD7BoundBreakpoint bbp, bool hit, bool cond ) : void
bbp AD7BoundBreakpoint Breakpoint to be locked.
hit bool True if user is adding/modifying count and conditions upon which a breakpoint is fired. It is also true /// when event dispatcher is handling a breakpoint hit.
cond bool True if user is adding/modifying conditions under which a conditional breakpoint fires. It is also true /// when event dispatcher is handling a breakpoint hit.
리턴 void

updateHitCount() 공개 메소드

Update hit count.
public updateHitCount ( uint ID, uint hitCount ) : void
ID uint Breakpoint ID in GDB.
hitCount uint Hit count.
리턴 void

프로퍼티 상세

countSIGINT 공개적으로 프로퍼티

There is a GDB bug that causes a message "Quit (expect signal SIGINT when the program is resumed)". If this message occurs 5 times, VSNDK will end the debug session. That's why this variable is needed, to count the amount of this kind of message that is received in a sequence.
public int countSIGINT
리턴 int

inCriticalRegion 공개적으로 프로퍼티

Variable that is manipulated only in methods enterCriticalRegion and leaveCriticalRegion
public bool inCriticalRegion
리턴 bool

m_GDBRunMode 공개적으로 정적으로 프로퍼티

Boolean variable that indicates the GDB state: TRUE -> run mode; FALSE -> break mode.
public static bool m_GDBRunMode
리턴 bool

m_unknownCode 공개적으로 정적으로 프로퍼티

Boolean variable that indicates if the current code is known or unknown, i.e., if there is a source code file associated.
public static bool m_unknownCode
리턴 bool