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

Side by Side Diff: src/trusted/debug_stub/session.cc

Issue 11881048: Change debug stub log message verbosity level to 1. (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client/
Patch Set: Created 7 years, 11 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 | « no previous file | tests/debug_stub/nacl.scons » ('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 (c) 2010 The Native Client Authors. All rights reserved. 2 * Copyright (c) 2010 The Native Client Authors. All rights reserved.
3 * Use of this source code is governed by a BSD-style license that can be 3 * Use of this source code is governed by a BSD-style license that can be
4 * found in the LICENSE file. 4 * 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 10
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 } 116 }
117 117
118 // Send the main payload 118 // Send the main payload
119 int offs = 0; 119 int offs = 0;
120 while ((ch = ptr[offs++]) != 0) { 120 while ((ch = ptr[offs++]) != 0) {
121 outstr << ch; 121 outstr << ch;
122 run_xsum += ch; 122 run_xsum += ch;
123 } 123 }
124 124
125 if (GetFlags() & DEBUG_SEND) { 125 if (GetFlags() & DEBUG_SEND) {
126 NaClLog(LOG_INFO, "TX %s\n", outstr.str().c_str()); 126 NaClLog(1, "TX %s\n", outstr.str().c_str());
127 } 127 }
128 128
129 // Send XSUM as two nible 8bit value preceeded by '#' 129 // Send XSUM as two nible 8bit value preceeded by '#'
130 outstr << '#'; 130 outstr << '#';
131 IntToNibble((run_xsum >> 4) & 0xF, &ch); 131 IntToNibble((run_xsum >> 4) & 0xF, &ch);
132 outstr << ch; 132 outstr << ch;
133 IntToNibble(run_xsum & 0xF, &ch); 133 IntToNibble(run_xsum & 0xF, &ch);
134 outstr << ch; 134 outstr << ch;
135 135
136 return io_->Write(outstr.str().data(), 136 return io_->Write(outstr.str().data(),
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 if (!GetChar(&ch)) return false; 180 if (!GetChar(&ch)) return false;
181 181
182 int val; 182 int val;
183 NibbleToInt(ch, & val); 183 NibbleToInt(ch, & val);
184 fin_xsum = val << 4; 184 fin_xsum = val << 4;
185 185
186 if (!GetChar(&ch)) return false; 186 if (!GetChar(&ch)) return false;
187 NibbleToInt(ch, &val); 187 NibbleToInt(ch, &val);
188 fin_xsum |= val; 188 fin_xsum |= val;
189 189
190 if (GetFlags() & DEBUG_RECV) NaClLog(LOG_INFO, "RX %s\n", in.c_str()); 190 if (GetFlags() & DEBUG_RECV) NaClLog(1, "RX %s\n", in.c_str());
191 191
192 pkt->ParseSequence(); 192 pkt->ParseSequence();
193 193
194 // If ACKs are off, we are done. 194 // If ACKs are off, we are done.
195 if (GetFlags() & IGNORE_ACK) return true; 195 if (GetFlags() & IGNORE_ACK) return true;
196 196
197 // If the XSUMs don't match, signal bad packet 197 // If the XSUMs don't match, signal bad packet
198 if (fin_xsum == run_xsum) { 198 if (fin_xsum == run_xsum) {
199 char out[3] = { '+', 0, 0 }; 199 char out[3] = { '+', 0, 0 };
200 int32_t seq; 200 int32_t seq;
(...skipping 12 matching lines...) Expand all
213 213
214 NaClLog(LOG_INFO, "RX Bad XSUM, retry\n"); 214 NaClLog(LOG_INFO, "RX Bad XSUM, retry\n");
215 goto retry; 215 goto retry;
216 } 216 }
217 217
218 return true; 218 return true;
219 } 219 }
220 220
221 } // End of namespace gdb_rsp 221 } // End of namespace gdb_rsp
222 222
OLDNEW
« no previous file with comments | « no previous file | tests/debug_stub/nacl.scons » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698