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

Unified Diff: experimental/linux_debug_server/debugger/rsp/rsp_common_replies.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_common_replies.cc
diff --git a/experimental/linux_debug_server/debugger/rsp/rsp_common_replies.cc b/experimental/linux_debug_server/debugger/rsp/rsp_common_replies.cc
deleted file mode 100755
index 46a24e211beb4ccc91a1c891f9d9afe5b01aec4a..0000000000000000000000000000000000000000
--- a/experimental/linux_debug_server/debugger/rsp/rsp_common_replies.cc
+++ /dev/null
@@ -1,82 +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_common_replies.h"
-
-namespace rsp {
-StopReply::StopReply()
- : stop_reason_(STILL_RUNNING),
- signal_number_(0),
- exit_code_(0),
- pid_(0) {
-}
-
-StopReply :: StopReply(StopReason stop_reason)
- : stop_reason_(stop_reason),
- signal_number_(0),
- exit_code_(0),
- pid_(0) {
-}
-
-bool StopReply::FromBlob(const std::string& type, debug::Blob* message) {
- if ("S" == type) {
- stop_reason_ = SIGNALED;
- return PopIntFromFront(message, &signal_number_);
- } else if ("W" == type) {
- stop_reason_ = StopReply::EXITED;
- if (!PopIntFromFront(message, &exit_code_))
- return false;
- } else if ("X" == type) {
- stop_reason_ = StopReply::TERMINATED;
- if (!PopIntFromFront(message, &signal_number_))
- return false;
- } else if ("O" == type) {
- stop_reason_ = StopReply::STILL_RUNNING;
- return true;
- } else {
- return false;
- }
- if (("W" == type) || ("X" == type)) {
- message->PopMatchingBytesFromFront(debug::Blob().FromString(";"));
- std::deque<debug::Blob> tokens;
- message->Split(debug::Blob().FromString(":"), &tokens);
- if ((tokens.size() >= 2) &&
- (tokens[0] == debug::Blob().FromString("process"))) {
- std::string s = tokens[1].ToString();
- return PopIntFromFront(&tokens[1], &pid_);
- }
- }
- return false;
-}
-
-void StopReply::ToBlob(debug::Blob* message) const {
- message->Clear();
- switch (stop_reason_) {
- case SIGNALED: {
- Format(message, "S%0.2x", signal_number_);
- break;
- }
- case TERMINATED: {
- Format(message, "X%0.2x;process:%x", signal_number_, pid_);
- break;
- }
- case EXITED: {
- Format(message, "W%0.2x;process:%x", exit_code_, pid_);
- break;
- }
- case STILL_RUNNING: {
- message->FromString("O");
- break;
- }
- }
-}
-
-bool BlobReply::FromBlob(const std::string& type, debug::Blob* message) {
- return data_.FromHexString(message->ToString());
-}
-
-void BlobReply::ToBlob(debug::Blob* message) const {
- message->FromString(data_.ToHexString());
-}
-} // namespace rsp
-

Powered by Google App Engine
This is Rietveld 408576698