Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1199)

Unified Diff: debugger/rsp/rsp_info_packets.h

Issue 7466014: Add rsp::GetOffsets command + reply (Closed) Base URL: http://nativeclient-sdk.googlecode.com/svn/trunk/src/
Patch Set: '' Created 9 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « debugger/rsp/rsp_blob_utils_test.cc ('k') | debugger/rsp/rsp_info_packets.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: debugger/rsp/rsp_info_packets.h
===================================================================
--- debugger/rsp/rsp_info_packets.h (revision 931)
+++ debugger/rsp/rsp_info_packets.h (working copy)
@@ -100,6 +100,37 @@
bool eom_;
std::string body_;
};
+
+/// Get section offsets that the target used when relocating the image.
+/// Example: qOffsets -> Text=c00000000;Data=c00000000
+class GetOffsetsCommand : public OneWordPacket {
+ public:
+ GetOffsetsCommand() : OneWordPacket("qOffsets") {}
+ virtual Packet* Clone() const { return new GetOffsetsCommand; }
+ virtual void AcceptVisitor(PacketVisitor* vis) { vis->Visit(this); }
+};
+
+/// Reply to GetOffsetsCommand.
+/// Example: Text=c00000000;Data=c00000000
+class GetOffsetsReply : public Packet {
+ public:
+ GetOffsetsReply() : text_offset_(0), data_offset_(0) {}
+ virtual Packet* Clone() const { return new GetOffsetsReply; }
+ virtual void AcceptVisitor(PacketVisitor* vis) { vis->Visit(this); }
+ virtual bool FromBlob(const std::string& type, debug::Blob* message);
+ virtual void ToBlob(debug::Blob* message) const;
+
+ uint64_t text_offset() const { return text_offset_; }
+ uint64_t data_offset() const { return data_offset_; }
+
+ void text_offset(uint64_t offs) { text_offset_ = offs; }
+ void data_offset(uint64_t offs) { data_offset_ = offs; }
+
+ private:
+ uint64_t text_offset_;
+ uint64_t data_offset_;
+};
+
} // namespace rsp
#endif // DEBUGGER_RSP_RSP_INFO_PACKETS_H_
« no previous file with comments | « debugger/rsp/rsp_blob_utils_test.cc ('k') | debugger/rsp/rsp_info_packets.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698