File tree 9 files changed +42
-103
lines changed
9 files changed +42
-103
lines changed Original file line number Diff line number Diff line change @@ -233,7 +233,6 @@ NACL_ARCHES = nacl_ia32 nacl_x64
233
233
GYPFILES = \
234
234
common.gypi \
235
235
deps/cares/cares.gyp \
236
- deps/debugger-agent/debugger-agent.gyp \
237
236
deps/http_parser/http_parser.gyp \
238
237
deps/openssl/openssl.gyp \
239
238
deps/uv/uv.gyp \
Load Diff This file was deleted.
Load Diff This file was deleted.
File renamed without changes.
Original file line number Diff line number Diff line change 16
16
'node_v8_options%' : '' ,
17
17
'library_files' : [
18
18
'src/node.js' ,
19
+ 'lib/_debug_agent.js' ,
19
20
'lib/_debugger.js' ,
20
21
'lib/_linklist.js' ,
21
22
'lib/assert.js' ,
67
68
'lib/util.js' ,
68
69
'lib/vm.js' ,
69
70
'lib/zlib.js' ,
70
- 'deps/debugger-agent/lib/_debugger_agent.js' ,
71
71
],
72
72
},
73
73
78
78
79
79
'dependencies' : [
80
80
'node_js2c#host' ,
81
- 'deps/debugger-agent/debugger-agent.gyp:debugger-agent' ,
82
81
],
83
82
84
83
'include_dirs' : [
89
88
],
90
89
91
90
'sources' : [
91
+ 'src/debug-agent.cc' ,
92
92
'src/fs_event_wrap.cc' ,
93
93
'src/cares_wrap.cc' ,
94
94
'src/handle_wrap.cc' ,
124
124
'src/async-wrap-inl.h' ,
125
125
'src/base-object.h' ,
126
126
'src/base-object-inl.h' ,
127
+ 'src/debug-agent.h' ,
127
128
'src/env.h' ,
128
129
'src/env-inl.h' ,
129
130
'src/handle_wrap.h' ,
Original file line number Diff line number Diff line change 19
19
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
20
20
// USE OR OTHER DEALINGS IN THE SOFTWARE.
21
21
22
- #include " agent.h"
23
- #include " debugger-agent.h"
22
+ #include " debug-agent.h"
24
23
25
24
#include " node.h"
26
25
#include " node_internals.h" // ARRAY_SIZE
Original file line number Diff line number Diff line change 19
19
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
20
20
// USE OR OTHER DEALINGS IN THE SOFTWARE.
21
21
22
- #ifndef DEPS_DEBUGGER_AGENT_INCLUDE_DEBUGGER_AGENT_H_
23
- #define DEPS_DEBUGGER_AGENT_INCLUDE_DEBUGGER_AGENT_H_
22
+ #ifndef SRC_DEBUG_AGENT_H_
23
+ #define SRC_DEBUG_AGENT_H_
24
24
25
25
#include " uv.h"
26
26
#include " v8.h"
27
27
#include " v8-debug.h"
28
+ #include " queue.h"
28
29
29
- namespace node {
30
+ # include < string.h >
30
31
31
- // Forward declaration
32
+ // Forward declaration to break recursive dependency chain with src/env.h.
33
+ namespace node {
32
34
class Environment ;
35
+ } // namespace node
33
36
37
+ namespace node {
34
38
namespace debugger {
35
39
36
- // Forward declaration
37
40
class AgentMessage ;
38
41
39
42
class Agent {
@@ -97,13 +100,38 @@ class Agent {
97
100
uv_loop_t child_loop_;
98
101
v8::Persistent<v8::Object> api_;
99
102
100
- // QUEUE
101
- void * messages_[2 ];
103
+ QUEUE messages_;
102
104
103
105
DispatchHandler dispatch_handler_;
104
106
};
105
107
108
+ class AgentMessage {
109
+ public:
110
+ AgentMessage (uint16_t * val, int length) : length_(length) {
111
+ if (val == NULL ) {
112
+ data_ = val;
113
+ } else {
114
+ data_ = new uint16_t [length];
115
+ memcpy (data_, val, length * sizeof (*data_));
116
+ }
117
+ }
118
+
119
+ ~AgentMessage () {
120
+ delete[] data_;
121
+ data_ = NULL ;
122
+ }
123
+
124
+ inline const uint16_t * data () const { return data_; }
125
+ inline int length () const { return length_; }
126
+
127
+ QUEUE member;
128
+
129
+ private:
130
+ uint16_t * data_;
131
+ int length_;
132
+ };
133
+
106
134
} // namespace debugger
107
135
} // namespace node
108
136
109
- #endif // DEPS_DEBUGGER_AGENT_INCLUDE_DEBUGGER_AGENT_H_
137
+ #endif // SRC_DEBUG_AGENT_H_
Original file line number Diff line number Diff line change 23
23
#define SRC_ENV_H_
24
24
25
25
#include " ares.h"
26
+ #include " debug-agent.h"
26
27
#include " tree.h"
27
28
#include " util.h"
28
29
#include " uv.h"
29
30
#include " v8.h"
30
31
#include " queue.h"
31
- #include " debugger-agent.h"
32
32
33
33
#include < stdint.h>
34
34
Original file line number Diff line number Diff line change 85
85
86
86
} else if ( process . argv [ 1 ] == '--debug-agent' ) {
87
87
// Start the debugger agent
88
- var d = NativeModule . require ( '_debugger_agent ' ) ;
88
+ var d = NativeModule . require ( '_debug_agent ' ) ;
89
89
d . start ( ) ;
90
90
91
91
} else if ( process . _eval != null ) {
You can’t perform that action at this time.
0 commit comments