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

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

Issue 10365028: Debug stub: associate NaClAppThread with IThread (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: Created 8 years, 7 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 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 <stdio.h> 9 #include <stdio.h>
10 #include <stdlib.h> 10 #include <stdlib.h>
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 "m1234"); 136 "m1234");
137 ses->AddTransaction( 137 ses->AddTransaction(
138 "qsThreadInfo", 138 "qsThreadInfo",
139 "l"); 139 "l");
140 ses->AddTransaction( 140 ses->AddTransaction(
141 "Hg1234", 141 "Hg1234",
142 "OK"); 142 "OK");
143 143
144 // Setup Register Query 144 // Setup Register Query
145 std::string str = ""; 145 std::string str = "";
146 port::IThread *thread = port::IThread::Acquire(0x1234, true); 146 port::IThread *thread = port::IThread::Create(0x1234, NULL);
147 for (uint32_t a = 0; a < abi->GetRegisterCount(); a++) { 147 for (uint32_t a = 0; a < abi->GetRegisterCount(); a++) {
148 char tmp[8]; 148 char tmp[8];
149 const Abi::RegDef* def = abi->GetRegisterDef(a); 149 const Abi::RegDef* def = abi->GetRegisterDef(a);
150 uint64_t val = static_cast<uint64_t>(a); 150 uint64_t val = static_cast<uint64_t>(a);
151 uint8_t *pval = reinterpret_cast<uint8_t*>(&val); 151 uint8_t *pval = reinterpret_cast<uint8_t*>(&val);
152 152
153 // Create a hex version of the register number of 153 // Create a hex version of the register number of
154 // the specified zero padded to the correct size 154 // the specified zero padded to the correct size
155 for (uint32_t b = 0; b < def->bytes_; b++) { 155 for (uint32_t b = 0; b < def->bytes_; b++) {
156 snprintf(tmp, sizeof(tmp), "%02x", pval[b]); 156 snprintf(tmp, sizeof(tmp), "%02x", pval[b]);
(...skipping 26 matching lines...) Expand all
183 if (debug) ses->SetFlags(Session::DEBUG_RECV | Session::DEBUG_SEND); 183 if (debug) ses->SetFlags(Session::DEBUG_RECV | Session::DEBUG_SEND);
184 184
185 AddMockInit(ses); 185 AddMockInit(ses);
186 AddMockUpdate(ses, 5); 186 AddMockUpdate(ses, 5);
187 187
188 ses->AddAction(SessionMock::DISCONNECT, ""); 188 ses->AddAction(SessionMock::DISCONNECT, "");
189 return ses; 189 return ses;
190 } 190 }
191 191
192 } // namespace gdb_rsp 192 } // namespace gdb_rsp
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698