yast2-core
YCPDebugger.h
Go to the documentation of this file.
1 /*---------------------------------------------------------------------\
2 | |
3 | __ __ ____ _____ ____ |
4 | \ \ / /_ _/ ___|_ _|___ \ |
5 | \ V / _` \___ \ | | __) | |
6 | | | (_| |___) || | / __/ |
7 | |_|\__,_|____/ |_| |_____| |
8 | |
9 | core system |
10 | (C) SuSE GmbH |
11 \----------------------------------------------------------------------/
12 
13  File: YCPDebugger.h
14 
15  Author: Arvin Schnell <arvin@suse.de>
16  Maintainer: Arvin Schnell <arvin@suse.de>
17 
18 /-*/
19 // -*- c++ -*-
20 
21 /*
22  * Debugger for YCP
23  */
24 
25 #ifndef YCPDebugger_h
26 #define YCPDebugger_h
27 
28 #include <string>
29 #include <vector>
30 
31 #include "ycp/y2log.h"
32 #include "ycp/YCPElement.h"
33 
35 {
36 public:
37 
43  YCPDebugger (bool);
44 
48  ~YCPDebugger ();
49 
54 
59  void debug (EntryPoint, const YCPElement &);
60 
61 private:
62 
66  string last_command;
67 
72 
73 private:
74 
78  struct Position
79  {
80  string file;
81  int line;
82 
83  void setpos (const string &, int);
84  };
85 
89  struct Breakpoint : public Position
90  {
92  };
93 
97  vector <Breakpoint> breakpoints;
98 
102  void add_breakpoint (const string &, int);
103 
108  bool delete_breakpoint (const string &, int);
109 
114  bool check_breakpoints (const string &, int);
115 
119  void list_breakpoints ();
120 
124  void list_source (const char *);
125 
129  void create_socket ();
130 
135  void check_socket (bool);
136 
140  int sock;
141 
146  int fd;
147 
152  string read_line (bool) const;
153 
157  void write_line (const char *, ...) const
158  __attribute__ ((format (printf, 2, 3)));
159 
163  void write_prompt () const;
164 
169  bool handle_command (const string &, const YCPElement &elem);
170 
175 
180 
185 
190 
195  struct Settings
196  {
197  Settings () { reset (); }
198  void reset ();
199 
200  bool ignorescr;
202  };
203 
208 
212  bool print_variable (const string &);
213 
217  void print_scope ();
218 
224  bool ignore (EntryPoint, const YCPElement &);
225 };
226 
227 #endif // YCPDebugger_h
int line
Definition: YCPDebugger.h:81
void setpos(const string &, int)
Definition: YCPDebugger.cc:799
bool single_mode
Definition: YCPDebugger.h:174
void print_scope()
Definition: YCPDebugger.cc:454
bool check_breakpoints(const string &, int)
Definition: YCPDebugger.cc:583
string last_command
Definition: YCPDebugger.h:66
Definition: YCPDebugger.h:78
int hold_level
Definition: YCPDebugger.h:179
Settings settings
Definition: YCPDebugger.h:207
std::string format(const char *format,...) __attribute__((format(printf
Definition: IniParser.cc:1030
void add_breakpoint(const string &, int)
Definition: YCPDebugger.cc:559
void debug(EntryPoint, const YCPElement &)
Definition: YCPDebugger.cc:147
Wrapper for YCPElementRep This class realizes an automatic memory management via YCPElement. Access the functionality of YCPElementRep with the arrow operator. See YCPElementRep.
Definition: YCPElement.h:317
void list_source(const char *)
Definition: YCPDebugger.cc:608
bool print_variable(const string &)
Definition: YCPDebugger.cc:431
void create_socket()
Definition: YCPDebugger.cc:630
bool ignorescr
Definition: YCPDebugger.h:200
static int variable_not_used __attribute__((unused))
string read_line(bool) const
Definition: YCPDebugger.cc:708
YCPDebugger(bool)
Definition: YCPDebugger.cc:40
int sock
Definition: YCPDebugger.h:140
bool tmpinactive
Definition: YCPDebugger.h:91
EntryPoint
Definition: YCPDebugger.h:53
Definition: YCPDebugger.h:53
void check_socket(bool)
Definition: YCPDebugger.cc:660
Definition: YCPDebugger.h:34
void list_breakpoints()
Definition: YCPDebugger.cc:596
void write_line(const char *,...) const __attribute__((format(printf
Definition: YCPDebugger.cc:754
bool ignore(EntryPoint, const YCPElement &)
Definition: YCPDebugger.cc:100
bool handle_command(const string &, const YCPElement &elem)
Definition: YCPDebugger.cc:306
~YCPDebugger()
Definition: YCPDebugger.cc:52
Definition: YCPDebugger.h:195
void void write_prompt() const
Definition: YCPDebugger.cc:783
bool delete_breakpoint(const string &, int)
Definition: YCPDebugger.cc:569
Definition: YCPDebugger.h:89
bool close_request
Definition: YCPDebugger.h:189
Settings()
Definition: YCPDebugger.h:197
vector< Breakpoint > breakpoints
Definition: YCPDebugger.h:97
int fd
Definition: YCPDebugger.h:146
bool printtoken
Definition: YCPDebugger.h:201
bool wait_for_frontend
Definition: YCPDebugger.h:71
Position leave_position
Definition: YCPDebugger.h:184
Definition: YCPDebugger.h:53
string file
Definition: YCPDebugger.h:80

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