OLD | NEW |
1 // Copyright (c) 2011 The Native Client Authors. All rights reserved. | 1 // Copyright (c) 2011 The Native Client Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 #ifndef DEBUGGER_RSP_RSP_INFO_PACKETS_H_ | 4 #ifndef DEBUGGER_RSP_RSP_INFO_PACKETS_H_ |
5 #define DEBUGGER_RSP_RSP_INFO_PACKETS_H_ | 5 #define DEBUGGER_RSP_RSP_INFO_PACKETS_H_ |
6 #include <deque> | 6 #include <deque> |
7 #include <string> | 7 #include <string> |
8 #include <utility> | 8 #include <utility> |
9 #include "debugger/rsp/rsp_packets.h" | 9 #include "debugger/rsp/rsp_packets.h" |
10 | 10 |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 bool eom() const { return eom_; } | 93 bool eom() const { return eom_; } |
94 std::string body() const { return body_; } | 94 std::string body() const { return body_; } |
95 | 95 |
96 void set_eom(bool eom) { eom_ = eom; } | 96 void set_eom(bool eom) { eom_ = eom; } |
97 void set_body(const std::string& body) { body_ = body; } | 97 void set_body(const std::string& body) { body_ = body; } |
98 | 98 |
99 protected: | 99 protected: |
100 bool eom_; | 100 bool eom_; |
101 std::string body_; | 101 std::string body_; |
102 }; | 102 }; |
| 103 |
| 104 /// Get section offsets that the target used when relocating the image. |
| 105 /// Example: qOffsets -> Text=c00000000;Data=c00000000 |
| 106 class GetOffsetsCommand : public OneWordPacket { |
| 107 public: |
| 108 GetOffsetsCommand() : OneWordPacket("qOffsets") {} |
| 109 virtual Packet* Clone() const { return new GetOffsetsCommand; } |
| 110 virtual void AcceptVisitor(PacketVisitor* vis) { vis->Visit(this); } |
| 111 }; |
| 112 |
| 113 /// Reply to GetOffsetsCommand. |
| 114 /// Example: Text=c00000000;Data=c00000000 |
| 115 class GetOffsetsReply : public Packet { |
| 116 public: |
| 117 GetOffsetsReply() : text_offset_(0), data_offset_(0) {} |
| 118 virtual Packet* Clone() const { return new GetOffsetsReply; } |
| 119 virtual void AcceptVisitor(PacketVisitor* vis) { vis->Visit(this); } |
| 120 virtual bool FromBlob(const std::string& type, debug::Blob* message); |
| 121 virtual void ToBlob(debug::Blob* message) const; |
| 122 |
| 123 uint64_t text_offset() const { return text_offset_; } |
| 124 uint64_t data_offset() const { return data_offset_; } |
| 125 |
| 126 void text_offset(uint64_t offs) { text_offset_ = offs; } |
| 127 void data_offset(uint64_t offs) { data_offset_ = offs; } |
| 128 |
| 129 private: |
| 130 uint64_t text_offset_; |
| 131 uint64_t data_offset_; |
| 132 }; |
| 133 |
103 } // namespace rsp | 134 } // namespace rsp |
104 | 135 |
105 #endif // DEBUGGER_RSP_RSP_INFO_PACKETS_H_ | 136 #endif // DEBUGGER_RSP_RSP_INFO_PACKETS_H_ |
106 | 137 |
OLD | NEW |