OLD | NEW |
1 // Copyright 2008 the V8 project authors. All rights reserved. | 1 // Copyright 2008 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 RemoteDebuggerEvent* tail_; | 91 RemoteDebuggerEvent* tail_; |
92 | 92 |
93 friend class ReceiverThread; | 93 friend class ReceiverThread; |
94 }; | 94 }; |
95 | 95 |
96 | 96 |
97 // Thread reading from debugged V8 instance. | 97 // Thread reading from debugged V8 instance. |
98 class ReceiverThread: public i::Thread { | 98 class ReceiverThread: public i::Thread { |
99 public: | 99 public: |
100 explicit ReceiverThread(RemoteDebugger* remote_debugger) | 100 explicit ReceiverThread(RemoteDebugger* remote_debugger) |
101 : remote_debugger_(remote_debugger) {} | 101 : |
| 102 #ifdef DEBUG_THREAD_NAMES |
| 103 Thread("d8:ReceiverThrd"), |
| 104 #endif |
| 105 remote_debugger_(remote_debugger) {} |
102 ~ReceiverThread() {} | 106 ~ReceiverThread() {} |
103 | 107 |
104 void Run(); | 108 void Run(); |
105 | 109 |
106 private: | 110 private: |
107 RemoteDebugger* remote_debugger_; | 111 RemoteDebugger* remote_debugger_; |
108 }; | 112 }; |
109 | 113 |
110 | 114 |
111 // Thread reading keyboard input. | 115 // Thread reading keyboard input. |
112 class KeyboardThread: public i::Thread { | 116 class KeyboardThread: public i::Thread { |
113 public: | 117 public: |
114 explicit KeyboardThread(RemoteDebugger* remote_debugger) | 118 explicit KeyboardThread(RemoteDebugger* remote_debugger) |
115 : remote_debugger_(remote_debugger) {} | 119 : |
| 120 #ifdef DEBUG_THREAD_NAMES |
| 121 Thread("d8:KeyboardThrd"), |
| 122 #endif |
| 123 remote_debugger_(remote_debugger) {} |
116 ~KeyboardThread() {} | 124 ~KeyboardThread() {} |
117 | 125 |
118 void Run(); | 126 void Run(); |
119 | 127 |
120 private: | 128 private: |
121 RemoteDebugger* remote_debugger_; | 129 RemoteDebugger* remote_debugger_; |
122 }; | 130 }; |
123 | 131 |
124 | 132 |
125 // Events processed by the main deubgger thread. | 133 // Events processed by the main deubgger thread. |
(...skipping 20 matching lines...) Expand all Loading... |
146 RemoteDebuggerEvent* next_; | 154 RemoteDebuggerEvent* next_; |
147 | 155 |
148 friend class RemoteDebugger; | 156 friend class RemoteDebugger; |
149 }; | 157 }; |
150 | 158 |
151 | 159 |
152 } // namespace v8 | 160 } // namespace v8 |
153 | 161 |
154 | 162 |
155 #endif // V8_D8_DEBUG_H_ | 163 #endif // V8_D8_DEBUG_H_ |
OLD | NEW |