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

Unified Diff: experimental/linux_debug_server/debugger/rsp/rsp_threads_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_threads_packets.cc
diff --git a/experimental/linux_debug_server/debugger/rsp/rsp_threads_packets.cc b/experimental/linux_debug_server/debugger/rsp/rsp_threads_packets.cc
deleted file mode 100755
index c2842130b96d68e911eb8c05cd73d2fc64211257..0000000000000000000000000000000000000000
--- a/experimental/linux_debug_server/debugger/rsp/rsp_threads_packets.cc
+++ /dev/null
@@ -1,83 +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_threads_packets.h"
-
-namespace rsp {
-bool SetCurrentThreadCommand::FromBlob(const std::string& type,
- debug::Blob* message) {
- if ((message->size() > 0) &&
- ('-' == message->GetAt(0)) &&
- ('1' == message->GetAt(1))) {
- thread_id_ = -1; // all threads
- return true;
- }
- return PopIntFromFront(message, &thread_id_);
-}
-
-void SetCurrentThreadCommand::ToBlob(debug::Blob* message) const {
- if (FOR_READ == subtype_)
- message->FromString("Hg");
- else
- message->FromString("Hc");
-
- if (0 == thread_id_) {
- message->PushBack('0');
- } else if ((unsigned int)(-1) == thread_id_) {
- message->PushBack('-');
- message->PushBack('1');
- } else {
- debug::Blob tmp;
- Format(&tmp, "%x", thread_id_);
- message->Append(tmp);
- }
-}
-
-bool GetThreadInfoCommand::FromBlob(const std::string& type,
- debug::Blob* message) {
- get_more_ = ("qsThreadInfo" == type);
- return true;
-}
-
-void GetThreadInfoCommand::ToBlob(debug::Blob* message) const {
- if (get_more_)
- message->FromString("qsThreadInfo");
- else
- message->FromString("qfThreadInfo");
-}
-
-bool GetThreadInfoReply::FromBlob(const std::string& type,
- debug::Blob* message) {
- if (message->size() < 1)
- return false;
- char cmd = message->PopFront();
- eom_ = ('l' == cmd);
-
- std::deque<debug::Blob> tokens;
- message->Split(debug::Blob().FromString(","), &tokens);
-
- for (size_t i = 0; i < tokens.size(); i++) {
- uint32_t id = 0;
- if (!PopIntFromFront(&tokens[i], &id))
- return false;
- threads_ids_.push_back(id);
- }
- return true;
-}
-
-void GetThreadInfoReply::ToBlob(debug::Blob* message) const {
- if (eom_ || (0 == threads_ids_.size()))
- message->FromString("l");
- else
- message->FromString("m");
- size_t num = threads_ids_.size();
- for (size_t i = 0; i < num; i++) {
- debug::Blob tmp;
- Format(&tmp, "%x", threads_ids_[i]);
- message->Append(tmp);
- if ((i + 1) != num)
- message->PushBack(',');
- }
-}
-} // namespace rsp
-
« no previous file with comments | « experimental/linux_debug_server/debugger/rsp/rsp_threads_packets.h ('k') | experimental/linux_oop_debugger/deb_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698