| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |