YCPDebugger Class Reference

#include <YCPDebugger.h>

List of all members.

Classes

struct  Breakpoint
struct  Position
struct  Settings

Public Types

enum  EntryPoint { Interpreter, Block }

Public Member Functions

 YCPDebugger (bool)
 ~YCPDebugger ()
void debug (EntryPoint, const YCPElement &)

Private Member Functions

void add_breakpoint (const string &, int)
bool delete_breakpoint (const string &, int)
bool check_breakpoints (const string &, int)
void list_breakpoints ()
void list_source (const char *)
void create_socket ()
void check_socket (bool)
string read_line (bool) const
void write_line (const char *,...) const __attribute__((format(printf
void void write_prompt () const
bool handle_command (const string &, const YCPElement &elem)
bool print_variable (const string &)
void print_scope ()
bool ignore (EntryPoint, const YCPElement &)

Private Attributes

string last_command
bool wait_for_frontend
vector< Breakpointbreakpoints
int sock
int fd
bool single_mode
int hold_level
Position leave_position
bool close_request
Settings settings

Member Enumeration Documentation

Enum of entrypoints for the function debug.

Enumerator:
Interpreter 
Block 

Constructor & Destructor Documentation

YCPDebugger::YCPDebugger ( bool   ) 

Constructor for debugger. The parameter determines whether to block (in the first debug call) until the frontend connects or not.

YCPDebugger::~YCPDebugger (  ) 

Destructor for debugger.


Member Function Documentation

void YCPDebugger::add_breakpoint ( const string &  ,
int   
) [private]

Adds a breakpoint to the list of breakpoints.

bool YCPDebugger::check_breakpoints ( const string &  ,
int   
) [private]

Checks if the given position does matches a breakpoint and returns true if so.

void YCPDebugger::check_socket ( bool   )  [private]

Checks if data arrived on our socket. The parameter determines whether to block until data arrives or not.

void YCPDebugger::create_socket (  )  [private]

Creates the socket we are listening on.

void YCPDebugger::debug ( EntryPoint  ,
const YCPElement  
)

Main debug function. It is called in YCode::evaluate and YBlock::evaluate.

bool YCPDebugger::delete_breakpoint ( const string &  ,
int   
) [private]

Deletes a breakpoint from the list of breakpoints. Return false if no matching breakpoint was found.

bool YCPDebugger::handle_command ( const string &  ,
const YCPElement elem 
) [private]

Handles a command from the frontend. The return value specifies whether the execution should continue or not.

bool YCPDebugger::ignore ( EntryPoint  ,
const YCPElement  
) [private]

Used to ignore the calls to "_fullname", which the user does not want to debug and most important the filename is wrong during these calls.

void YCPDebugger::list_breakpoints (  )  [private]

Prints a list of all breakpoints.

void YCPDebugger::list_source ( const char *   )  [private]

Prints the current source file.

void YCPDebugger::print_scope (  )  [private]

Prints the entire variable scope.

bool YCPDebugger::print_variable ( const string &   )  [private]

Prints a single variable.

string YCPDebugger::read_line ( bool   )  const [private]

Reads a line from the file descriptor. The parameter determines whether to block or not.

void YCPDebugger::write_line ( const char *  ,
  ... 
) const [private]

Writes a line to the file descriptor.

void void YCPDebugger::write_prompt (  )  const [private]

Writes the prompt to the file descriptor.


Member Data Documentation

List of breakpoints.

The frontend wants to detach from the debugger.

int YCPDebugger::fd [private]

The file descriptor we are communication on. Note: We only allow one debugger to be connected.

int YCPDebugger::hold_level [private]

Stop execution if the level is smaller than or equal to the hold_level.

string YCPDebugger::last_command [private]

The command received last.

Stop execution if execution leaves this position.

The user settings.

bool YCPDebugger::single_mode [private]

Stop execution at the next possible point.

int YCPDebugger::sock [private]

The socket we are listening on.

Block (in the first debug call) until the frontend connects.


The documentation for this class was generated from the following file:

Generated on a sunny day for yast2-core by doxygen 1.6.3