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

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

Issue 10365028: Debug stub: associate NaClAppThread with IThread (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: rebased 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
« no previous file with comments | « src/trusted/gdb_rsp/target_test.cc ('k') | src/trusted/port/thread.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <stdarg.h> 7 #include <stdarg.h>
8 #include <stdio.h> 8 #include <stdio.h>
9 #include <stdlib.h> 9 #include <stdlib.h>
10 #include <string.h> 10 #include <string.h>
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 bool Suspend() { return true; } 92 bool Suspend() { return true; }
93 bool Resume() { return true; } 93 bool Resume() { return true; }
94 94
95 virtual void *GetContext() { return ctx_; } 95 virtual void *GetContext() { return ctx_; }
96 96
97 private: 97 private:
98 uint8_t *ctx_; 98 uint8_t *ctx_;
99 uint32_t id_; 99 uint32_t id_;
100 }; 100 };
101 101
102 IThread* IThread::Acquire(uint32_t id, bool create) { 102 IThread* IThread::Create(uint32_t id, struct NaClAppThread *) {
103 if (create) return new ThreadMock(id); 103 return new ThreadMock(id);
104 return NULL;
105 } 104 }
106 105
107 106
108 bool port::IPlatform::GetMemory(uint64_t addr, uint32_t len, void *dst) { 107 bool port::IPlatform::GetMemory(uint64_t addr, uint32_t len, void *dst) {
109 intptr_t iptr = static_cast<intptr_t>(addr); 108 intptr_t iptr = static_cast<intptr_t>(addr);
110 void *src = reinterpret_cast<void*>(iptr); 109 void *src = reinterpret_cast<void*>(iptr);
111 memcpy(dst, src, len); 110 memcpy(dst, src, len);
112 return true; 111 return true;
113 } 112 }
114 113
(...skipping 28 matching lines...) Expand all
143 printf("Testing Host.\n"); 142 printf("Testing Host.\n");
144 errs += TestHost(); 143 errs += TestHost();
145 144
146 printf("Testing Target.\n"); 145 printf("Testing Target.\n");
147 errs += TestTarget(); 146 errs += TestTarget();
148 147
149 if (errs) printf("FAILED with %d errors.\n", errs); 148 if (errs) printf("FAILED with %d errors.\n", errs);
150 return errs; 149 return errs;
151 } 150 }
152 151
OLDNEW
« no previous file with comments | « src/trusted/gdb_rsp/target_test.cc ('k') | src/trusted/port/thread.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698