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

Unified Diff: experimental/linux_debug_server/debugger/rsp/rsp_control_packets.cc

Issue 10928195: First round of dead file removal (Closed) Base URL: https://github.com/samclegg/nativeclient-sdk.git@master
Patch Set: Created 8 years, 3 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
Index: experimental/linux_debug_server/debugger/rsp/rsp_control_packets.cc
diff --git a/experimental/linux_debug_server/debugger/rsp/rsp_control_packets.cc b/experimental/linux_debug_server/debugger/rsp/rsp_control_packets.cc
deleted file mode 100755
index 336d77719cd9874b91e894305142b8351efe5412..0000000000000000000000000000000000000000
--- a/experimental/linux_debug_server/debugger/rsp/rsp_control_packets.cc
+++ /dev/null
@@ -1,65 +0,0 @@
-// Copyright (c) 2011 The Native Client Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-#include "debugger/rsp/rsp_control_packets.h"
-
-namespace rsp {
-ReadMemoryCommand::ReadMemoryCommand()
- : addr_(0),
- num_of_bytes_(0) {
-}
-
-// Example: "m" + "cffffff80,40"
-bool ReadMemoryCommand::FromBlob(const std::string& type,
- debug::Blob* message) {
- std::deque<debug::Blob> tokens;
- message->Split(debug::Blob().FromString(","), &tokens);
- if (tokens.size() < 2)
- return false;
-
- bool r1 = PopIntFromFront(&tokens[0], &addr_);
- bool r2 = PopIntFromFront(&tokens[1], &num_of_bytes_);
- return r1 && r2;
-}
-
-void ReadMemoryCommand::ToBlob(debug::Blob* message) const {
- Format(message, "m%I64x,%x", addr_, num_of_bytes_);
-}
-
-WriteMemoryCommand::WriteMemoryCommand()
- : addr_(0) {
-}
-
-bool WriteMemoryCommand::FromBlob(const std::string& type,
- debug::Blob* message) {
- // example: H>[Mc00020304,1:8b]
- std::deque<debug::Blob> tokens;
- message->Split(debug::Blob().FromString(","), &tokens);
- if (tokens.size() < 2)
- return false;
-
- if (!PopIntFromFront(&tokens[0], &addr_))
- return false;
- debug::Blob len_and_data = tokens[1];
- len_and_data.Split(debug::Blob().FromString(":"), &tokens);
- if (tokens.size() < 2)
- return false;
- return data_.FromHexString(tokens[1].ToString());
-}
-
-void WriteMemoryCommand::ToBlob(debug::Blob* message) const {
- std::string hex_blob = data_.ToHexStringNoLeadingZeroes();
- Format(message, "M%I64x,%x:%s", addr_, data_.size(), hex_blob.c_str());
-}
-
-bool WriteRegistersCommand::FromBlob(const std::string& type,
- debug::Blob* message) {
- return data_.FromHexString(message->ToString());
-}
-
-void WriteRegistersCommand::ToBlob(debug::Blob* message) const {
- message->FromString("G");
- message->Append(debug::Blob().FromString(data_.ToHexString()));
-}
-} // namespace rsp
-

Powered by Google App Engine
This is Rietveld 408576698