| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef BIN_DBG_MESSAGE_H_ | 5 #ifndef BIN_DBG_MESSAGE_H_ |
| 6 #define BIN_DBG_MESSAGE_H_ | 6 #define BIN_DBG_MESSAGE_H_ |
| 7 | 7 |
| 8 #include "bin/builtin.h" | 8 #include "bin/builtin.h" |
| 9 #include "bin/utils.h" | 9 #include "bin/utils.h" |
| 10 | 10 |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 } | 36 } |
| 37 ~MessageParser() { } | 37 ~MessageParser() { } |
| 38 | 38 |
| 39 // Accessors. | 39 // Accessors. |
| 40 const char* buf() const { return buf_; } | 40 const char* buf() const { return buf_; } |
| 41 | 41 |
| 42 bool IsValidMessage() const; | 42 bool IsValidMessage() const; |
| 43 int MessageId() const; | 43 int MessageId() const; |
| 44 | 44 |
| 45 const char* Params() const; | 45 const char* Params() const; |
| 46 bool HasParam(const char* name) const; |
| 46 intptr_t GetIntParam(const char* name) const; | 47 intptr_t GetIntParam(const char* name) const; |
| 47 intptr_t GetOptIntParam(const char* name, intptr_t default_val) const; | 48 intptr_t GetOptIntParam(const char* name, intptr_t default_val) const; |
| 48 | 49 |
| 49 // GetStringParam mallocs the buffer that it returns. Caller must free. | 50 // GetStringParam mallocs the buffer that it returns. Caller must free. |
| 50 char* GetStringParam(const char* name) const; | 51 char* GetStringParam(const char* name) const; |
| 51 | 52 |
| 52 private: | 53 private: |
| 53 const char* buf_; | 54 const char* buf_; |
| 54 int buf_length_; | 55 int buf_length_; |
| 55 | 56 |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 // functions are populated as function pointers into a dispatch table. | 97 // functions are populated as function pointers into a dispatch table. |
| 97 static bool HandleResumeCmd(DbgMessage* msg); | 98 static bool HandleResumeCmd(DbgMessage* msg); |
| 98 static bool HandleStepIntoCmd(DbgMessage* msg); | 99 static bool HandleStepIntoCmd(DbgMessage* msg); |
| 99 static bool HandleStepOverCmd(DbgMessage* msg); | 100 static bool HandleStepOverCmd(DbgMessage* msg); |
| 100 static bool HandleStepOutCmd(DbgMessage* msg); | 101 static bool HandleStepOutCmd(DbgMessage* msg); |
| 101 static bool HandleGetLibrariesCmd(DbgMessage* msg); | 102 static bool HandleGetLibrariesCmd(DbgMessage* msg); |
| 102 static bool HandleGetClassPropsCmd(DbgMessage* msg); | 103 static bool HandleGetClassPropsCmd(DbgMessage* msg); |
| 103 static bool HandleGetLibPropsCmd(DbgMessage* msg); | 104 static bool HandleGetLibPropsCmd(DbgMessage* msg); |
| 104 static bool HandleSetLibPropsCmd(DbgMessage* msg); | 105 static bool HandleSetLibPropsCmd(DbgMessage* msg); |
| 105 static bool HandleGetGlobalsCmd(DbgMessage* msg); | 106 static bool HandleGetGlobalsCmd(DbgMessage* msg); |
| 107 static bool HandleEvaluateExprCmd(DbgMessage* msg); |
| 106 static bool HandleGetObjPropsCmd(DbgMessage* msg); | 108 static bool HandleGetObjPropsCmd(DbgMessage* msg); |
| 107 static bool HandleGetListCmd(DbgMessage* msg); | 109 static bool HandleGetListCmd(DbgMessage* msg); |
| 108 static bool HandleGetScriptURLsCmd(DbgMessage* msg); | 110 static bool HandleGetScriptURLsCmd(DbgMessage* msg); |
| 109 static bool HandleGetSourceCmd(DbgMessage* msg); | 111 static bool HandleGetSourceCmd(DbgMessage* msg); |
| 110 static bool HandleGetLineNumbersCmd(DbgMessage* msg); | 112 static bool HandleGetLineNumbersCmd(DbgMessage* msg); |
| 111 static bool HandleGetStackTraceCmd(DbgMessage* msg); | 113 static bool HandleGetStackTraceCmd(DbgMessage* msg); |
| 112 static bool HandlePauseOnExcCmd(DbgMessage* msg); | 114 static bool HandlePauseOnExcCmd(DbgMessage* msg); |
| 113 static bool HandleSetBpCmd(DbgMessage* msg); | 115 static bool HandleSetBpCmd(DbgMessage* msg); |
| 114 static bool HandleRemBpCmd(DbgMessage* msg); | 116 static bool HandleRemBpCmd(DbgMessage* msg); |
| 115 | 117 |
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 258 static dart::Mutex* msg_queue_list_lock_; | 260 static dart::Mutex* msg_queue_list_lock_; |
| 259 | 261 |
| 260 DISALLOW_ALLOCATION(); | 262 DISALLOW_ALLOCATION(); |
| 261 DISALLOW_IMPLICIT_CONSTRUCTORS(DbgMsgQueueList); | 263 DISALLOW_IMPLICIT_CONSTRUCTORS(DbgMsgQueueList); |
| 262 }; | 264 }; |
| 263 | 265 |
| 264 } // namespace bin | 266 } // namespace bin |
| 265 } // namespace dart | 267 } // namespace dart |
| 266 | 268 |
| 267 #endif // BIN_DBG_MESSAGE_H_ | 269 #endif // BIN_DBG_MESSAGE_H_ |
| OLD | NEW |