OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include <stddef.h> | 5 #include <stddef.h> |
6 #include <stdint.h> | 6 #include <stdint.h> |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
12 #include "base/at_exit.h" | 12 #include "base/at_exit.h" |
13 #include "base/command_line.h" | 13 #include "base/command_line.h" |
14 #include "base/files/file_path.h" | 14 #include "base/files/file_path.h" |
15 #include "base/files/file_util.h" | 15 #include "base/files/file_util.h" |
16 #include "base/logging.h" | 16 #include "base/logging.h" |
17 #include "base/strings/string_number_conversions.h" | 17 #include "base/strings/string_number_conversions.h" |
18 #include "base/strings/string_util.h" | 18 #include "base/strings/string_util.h" |
19 #include "base/strings/utf_string_conversions.h" | 19 #include "base/strings/utf_string_conversions.h" |
20 #include "courgette/assembly_program.h" | 20 #include "courgette/assembly_program.h" |
21 #include "courgette/courgette.h" | 21 #include "courgette/courgette.h" |
22 #include "courgette/encoded_program.h" | 22 #include "courgette/encoded_program.h" |
23 #include "courgette/program_detector.h" | 23 #include "courgette/program_detector.h" |
24 #include "courgette/streams.h" | 24 #include "courgette/streams.h" |
25 #include "courgette/third_party/bsdiff.h" | 25 #include "courgette/third_party/bsdiff/bsdiff.h" |
26 | |
27 | 26 |
28 void PrintHelp() { | 27 void PrintHelp() { |
29 fprintf(stderr, | 28 fprintf(stderr, |
30 "Usage:\n" | 29 "Usage:\n" |
31 " courgette -supported <executable_file>\n" | 30 " courgette -supported <executable_file>\n" |
32 " courgette -dis <executable_file> <binary_assembly_file>\n" | 31 " courgette -dis <executable_file> <binary_assembly_file>\n" |
33 " courgette -asm <binary_assembly_file> <executable_file>\n" | 32 " courgette -asm <binary_assembly_file> <executable_file>\n" |
34 " courgette -disadj <executable_file> <reference> <binary_assembly_file>\n" | 33 " courgette -disadj <executable_file> <reference> <binary_assembly_file>\n" |
35 " courgette -gen <v1> <v2> <patch>\n" | 34 " courgette -gen <v1> <v2> <patch>\n" |
36 " courgette -apply <v1> <patch> <v2>\n" | 35 " courgette -apply <v1> <patch> <v2>\n" |
(...skipping 480 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
517 UsageProblem("-gen1[au] <old_file> <new_file> <patch_files_root>"); | 516 UsageProblem("-gen1[au] <old_file> <new_file> <patch_files_root>"); |
518 DisassembleAdjustDiff(values[0], values[1], values[2], | 517 DisassembleAdjustDiff(values[0], values[1], values[2], |
519 cmd_spread_1_adjusted); | 518 cmd_spread_1_adjusted); |
520 } else { | 519 } else { |
521 UsageProblem("No operation specified"); | 520 UsageProblem("No operation specified"); |
522 } | 521 } |
523 } | 522 } |
524 | 523 |
525 return 0; | 524 return 0; |
526 } | 525 } |
OLD | NEW |