Qore DebugProgramControl Module Reference  0.1.1
DebugProgramControl.qm.dox.h
1 // -*- mode: c++; indent-tabs-mode: nil -*-
3 
4 /* DebugProgramControl.qm Copyright 2013 - 2018 Qore Technologies, s.r.o.
5 
6  Permission is hereby granted, free of charge, to any person obtaining a
7  copy of this software and associated documentation files (the "Software"),
8  to deal in the Software without restriction, including without limitation
9  the rights to use, copy, modify, merge, publish, distribute, sublicense,
10  and/or sell copies of the Software, and to permit persons to whom the
11  Software is furnished to do so, subject to the following conditions:
12 
13  The above copyright notice and this permission notice shall be included in
14  all copies or substantial portions of the Software.
15 
16  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21  FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22  DEALINGS IN THE SOFTWARE.
23 */
24 
25 // minimum required Qore version
26 
27 // child program won't inherit parent program options (including %allow-debugger)
28 
29 
46 namespace DebugProgramControl {
49 class DebugProgramControl : public DebugProgram,public AbstractDebugControl {
50 
51 public:
52  private :
58  Qore::Thread::RWLock rwlThread();
60  Qore::Thread::RWLock rwlConnection();
62  string serverName;
63 
64  const frameOffset = 2;
65 
66 public:
67 
69  constructor(string serverName) ;
70 
71 
73  destructor();
74 
75 
77  shutdown();
78 
79 
81  registerConnection(hash cx);
82 
84  connectionRegistered(hash cx);
85 
87  unregisterConnection(hash cx);
88 
89 
90 private:
91  updateConnectionContext(hash cx, auto cx_data);
92 public:
93 
94 
96  abstract sendDataImpl(hash cx, auto data);
97  abstract broadcastDataImpl(auto data);
99  Program createProgram(string fileName, *hash opts, list args, *string script);
100 
102  *hash processCommand(hash cx, hash receiveData);
103 
104 
105 private:
106  auto resolveValue(string name, *string val, hash strings, auto defVal);
107 public:
108 
109 
110 
111 private:
112  string encodeValue(string name, auto val, hash strings);
113 public:
114 
115 
116 
117 private:
118  int resolveStatement(ProgramControl pgm, *hash value);
119 public:
120 
121 
122 
123 private:
124  hash getBreakpointInfo(Breakpoint b);
125 public:
126 
127 
128 
129 private:
130  *hash serializeLocal(string name, hash val);
131 public:
132 
133 
134 
135 private:
136  *hash serializeLocals(*hash vals);
137 public:
138 
139 
140 
141 private:
142  list adjustStack(list stack, *hash ctx);
143 public:
144 
145 
146 
147 private:
148  *hash handleInterrupt(string func, ProgramControl pgm, reference runState, *int statementId, *string refName, *reference refValue, *hash except);
149 public:
150 
151 
152  onAttach(ProgramControl pgm, reference rs);
153 
154 
155  onDetach(ProgramControl pgm, reference rs);
156 
157 
158  onStep(ProgramControl pgm, int blockStatementId, *int statementId, reference flow, reference rs);
159 
160 
161  onFunctionEnter(ProgramControl pgm, int statementId, reference rs);
162 
163 
164  onFunctionExit(ProgramControl pgm, int statementId, reference result, reference rs);
165 
166 
167  onException(ProgramControl pgm, int statementId, hash ex, reference dismiss, reference rs);
168 
169  };
170 };
hash ctxThread
data pool related to suspended thread, key is threadId
Definition: DebugProgramControl.qm.dox.h:54
list list(...)
hash ctxConnection
data pool for data related to cx.id
Definition: DebugProgramControl.qm.dox.h:56
the DebugProgramControl namespace contains all the definitions in the DebugProgramControl module ...
Definition: DebugProgramControl.qm.dox.h:47
hash hash(object obj)
string serverName
server name
Definition: DebugProgramControl.qm.dox.h:62