GPUOcelot
Classes | Public Types | Public Member Functions | Public Attributes

trace::InteractiveDebugger Class Reference

A heavy-weight tool for debugging the emulator. More...

#include <InteractiveDebugger.h>

Inheritance diagram for trace::InteractiveDebugger:
Inheritance graph
[legend]
Collaboration diagram for trace::InteractiveDebugger:
Collaboration graph
[legend]

List of all members.

Classes

class  Watchpoint
 watchpoint datastructure More...

Public Types

typedef std::list< WatchpointWatchpointList

Public Member Functions

 InteractiveDebugger ()
void initialize (const executive::ExecutableKernel &kernel)
 called when a traced kernel is launched to retrieve some parameters from the kernel
void event (const TraceEvent &event)
 Called whenever an event takes place.
void finish ()
 Called when a kernel is finished. There will be no more events for this kernel.
ir::PTXU64 _getRegister (unsigned int thread, ir::PTXOperand::RegisterType reg) const
 gets the value of a register
void _printRegister (unsigned int thread, ir::PTXOperand::RegisterType reg) const
 View the value of a register.
void _listWatchpoints (const std::string &command) const
 prints watchpoints according to formatting information from command
void _printWatchpoint (const Watchpoint &watch) const
 print the value of the region specified in a watchpoint
void _clearWatchpoint (const std::string &command)
 clears indicated watchpoints
void _setWatchpoint (const std::string &command)
 sets a watchpoint
void _testWatchpoints (const trace::TraceEvent &event)
 finds the watch points triggered by the event and prints their values
void _printMemory (ir::PTXU64 address) const
 View values in memory near the specified device address.
void _printAssembly (unsigned int pc, unsigned int count) const
 View the kernel assembly code near the specified address.
void _printWarpState () const
 Print the internal state of the currently executing warp.
void _printPC () const
 Print the PC of the currently executing warp.
void _printLocation (unsigned int pc) const
 Print the location of the nearest source code line.

Public Attributes

std::string filter
bool alwaysAttach

Detailed Description

A heavy-weight tool for debugging the emulator.

This should provide an interface similar to the gdb command line for the emulator, or anything else that exports the trace generator interface.


Member Typedef Documentation


Constructor & Destructor Documentation

trace::InteractiveDebugger::InteractiveDebugger ( )

Member Function Documentation

void trace::InteractiveDebugger::_clearWatchpoint ( const std::string &  command)

clears indicated watchpoints

ir::PTXU64 trace::InteractiveDebugger::_getRegister ( unsigned int  thread,
ir::PTXOperand::RegisterType  reg 
) const

gets the value of a register

void trace::InteractiveDebugger::_listWatchpoints ( const std::string &  command) const

prints watchpoints according to formatting information from command

void trace::InteractiveDebugger::_printAssembly ( unsigned int  pc,
unsigned int  count 
) const

View the kernel assembly code near the specified address.

void trace::InteractiveDebugger::_printLocation ( unsigned int  pc) const

Print the location of the nearest source code line.

void trace::InteractiveDebugger::_printMemory ( ir::PTXU64  address) const

View values in memory near the specified device address.

void trace::InteractiveDebugger::_printPC ( ) const

Print the PC of the currently executing warp.

void trace::InteractiveDebugger::_printRegister ( unsigned int  thread,
ir::PTXOperand::RegisterType  reg 
) const

View the value of a register.

void trace::InteractiveDebugger::_printWarpState ( ) const

Print the internal state of the currently executing warp.

void trace::InteractiveDebugger::_printWatchpoint ( const Watchpoint watch) const

print the value of the region specified in a watchpoint

void trace::InteractiveDebugger::_setWatchpoint ( const std::string &  command)

sets a watchpoint

void trace::InteractiveDebugger::_testWatchpoints ( const trace::TraceEvent event)

finds the watch points triggered by the event and prints their values

void trace::InteractiveDebugger::event ( const TraceEvent event) [virtual]

Called whenever an event takes place.

Note, the const reference 'event' is only valid until event() returns

Reimplemented from trace::TraceGenerator.

void trace::InteractiveDebugger::finish ( ) [virtual]

Called when a kernel is finished. There will be no more events for this kernel.

Reimplemented from trace::TraceGenerator.

void trace::InteractiveDebugger::initialize ( const executive::ExecutableKernel kernel) [virtual]

called when a traced kernel is launched to retrieve some parameters from the kernel

Reimplemented from trace::TraceGenerator.


Member Data Documentation


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines