| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2012 The Native Client Authors. All rights reserved. | 2 * Copyright (c) 2012 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 /* | 7 /* |
| 8 * ncvalidate_iter.c | 8 * ncvalidate_iter.c |
| 9 * Validate x86 instructions for Native Client | 9 * Validate x86 instructions for Native Client |
| 10 * | 10 * |
| (...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 401 } | 401 } |
| 402 if (vstate->do_stub_out && (level <= LOG_ERROR)) { | 402 if (vstate->do_stub_out && (level <= LOG_ERROR)) { |
| 403 NaClStubOutInst(vstate, inst2); | 403 NaClStubOutInst(vstate, inst2); |
| 404 } | 404 } |
| 405 } | 405 } |
| 406 | 406 |
| 407 Bool NaClValidatorQuit(NaClValidatorState *vstate) { | 407 Bool NaClValidatorQuit(NaClValidatorState *vstate) { |
| 408 return !vstate->validates_ok && (vstate->quit_after_error_count == 0); | 408 return !vstate->validates_ok && (vstate->quit_after_error_count == 0); |
| 409 } | 409 } |
| 410 | 410 |
| 411 Bool NaClValidatorDidStubOut(NaClValidatorState *vstate) { |
| 412 return vstate->did_stub_out; |
| 413 } |
| 414 |
| 411 static void NaClNullErrorPrintInst(NaClErrorReporter* self, | 415 static void NaClNullErrorPrintInst(NaClErrorReporter* self, |
| 412 struct NaClInstState* inst) {} | 416 struct NaClInstState* inst) {} |
| 413 | 417 |
| 414 NaClErrorReporter kNaClNullErrorReporter = { | 418 NaClErrorReporter kNaClNullErrorReporter = { |
| 415 NaClNullErrorReporter, | 419 NaClNullErrorReporter, |
| 416 NaClNullErrorPrintf, | 420 NaClNullErrorPrintf, |
| 417 NaClNullErrorPrintfV, | 421 NaClNullErrorPrintfV, |
| 418 (NaClPrintInst) NaClNullErrorPrintInst | 422 (NaClPrintInst) NaClNullErrorPrintInst |
| 419 }; | 423 }; |
| 420 | 424 |
| (...skipping 460 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 881 "Code modification: code segments have different " | 885 "Code modification: code segments have different " |
| 882 "number of instructions\n"); | 886 "number of instructions\n"); |
| 883 } | 887 } |
| 884 } while (0); | 888 } while (0); |
| 885 NaClValidatorStateIterFinish(vstate); | 889 NaClValidatorStateIterFinish(vstate); |
| 886 NaClApplyPostValidators(vstate); | 890 NaClApplyPostValidators(vstate); |
| 887 vstate->cur_iter = NULL; | 891 vstate->cur_iter = NULL; |
| 888 NaClInstIterDestroy(iter_old); | 892 NaClInstIterDestroy(iter_old); |
| 889 NaClInstIterDestroy(iter_new); | 893 NaClInstIterDestroy(iter_new); |
| 890 } | 894 } |
| OLD | NEW |