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

Side by Side Diff: src/trusted/gdb_rsp/host.cc

Issue 5633007: This change contains changes that were made on a separate copy of this code,... (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client/
Patch Set: Created 10 years 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright 2010 The Native Client Authors. All rights reserved. 2 * Copyright 2010 The Native Client Authors. All rights reserved.
3 * Use of this source code is governed by a BSD-style license that can 3 * Use of this source code is governed by a BSD-style license that can
4 * be found in the LICENSE file. 4 * be found in the LICENSE file.
5 */ 5 */
6 6
7 #include <assert.h> 7 #include <assert.h>
8 #include <string.h> 8 #include <string.h>
9 #include <stdlib.h> 9 #include <stdlib.h>
10 #include <stdio.h> 10 #include <stdio.h>
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 if (SendOnly(&out)) { 232 if (SendOnly(&out)) {
233 // We are running again 233 // We are running again
234 status_ = HS_RUNNING; 234 status_ = HS_RUNNING;
235 return true; 235 return true;
236 } 236 }
237 237
238 return false; 238 return false;
239 } 239 }
240 240
241 // Wait to see if we receive a break 241 // Wait to see if we receive a break
242 bool Host::WaitForBreak() { 242 bool Host::WaitForBreak() {
noelallen_use_chromium 2010/12/07 23:04:44 Should we kill HS_STOPPING?
mlinck 2010/12/10 21:10:27 A break request results in the "stopping" state. T
243 // We can not wait if we are not running 243 // We can not wait if we are already stopped
244 if (HS_RUNNING != status_) return false; 244 if (HS_RUNNING != status_
245 && HS_STOPPING != status_) return false;
245 246
246 Packet rx; 247 Packet rx;
247 std::string str; 248 std::string str;
248 if (session_->GetPacket(&rx) == false) return false; 249 if (session_->GetPacket(&rx) == false) return false;
249 250
250 rx.GetString(&str); 251 rx.GetString(&str);
251 if (ParseStopPacket(str.data())) return Update(); 252 if (ParseStopPacket(str.data())) return Update();
252 return false; 253 return false;
253 } 254 }
254 255
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
515 } 516 }
516 517
517 bool Host::Send(Packet *tx, Packet *rx) { 518 bool Host::Send(Packet *tx, Packet *rx) {
518 if (!session_->SendPacket(tx)) return false; 519 if (!session_->SendPacket(tx)) return false;
519 return session_->GetPacket(rx); 520 return session_->GetPacket(rx);
520 } 521 }
521 522
522 } // namespace gdb_rsp 523 } // namespace gdb_rsp
523 524
524 525
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698