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

Side by Side Diff: courgette/program_detector.h

Issue 2793153003: [Courgette] Refactor: Store Label Annotation in AssemblyProgram for patch generation. (Closed)
Patch Set: Rename *_label_annotation to *_label_annotations. Created 3 years, 8 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
« no previous file with comments | « courgette/patch_generator_x86_32.h ('k') | courgette/program_detector.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 #ifndef COURGETTE_PROGRAM_DETECTOR_H_ 5 #ifndef COURGETTE_PROGRAM_DETECTOR_H_
6 #define COURGETTE_PROGRAM_DETECTOR_H_ 6 #define COURGETTE_PROGRAM_DETECTOR_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 11 matching lines...) Expand all
22 // On success: 22 // On success:
23 // Fills in |type| and |detected_length|, and returns C_OK. 23 // Fills in |type| and |detected_length|, and returns C_OK.
24 // On failure: 24 // On failure:
25 // Fills in |type| with UNKNOWN, |detected_length| with 0, and returns 25 // Fills in |type| with UNKNOWN, |detected_length| with 0, and returns
26 // C_INPUT_NOT_RECOGNIZED. 26 // C_INPUT_NOT_RECOGNIZED.
27 Status DetectExecutableType(const uint8_t* buffer, 27 Status DetectExecutableType(const uint8_t* buffer,
28 size_t length, 28 size_t length,
29 ExecutableType* type, 29 ExecutableType* type,
30 size_t* detected_length); 30 size_t* detected_length);
31 31
32 // Attempts to detect the type of executable, and parse it with the appropriate 32 // Attempts to detect the type of executable by parsing it with the appropriate
33 // tools. 33 // tools.
34 // On success: 34 // On success:
35 // Parses the executable into a new AssemblyProgram in |*output|, and returns 35 // Parses the executable into a new AssemblyProgram in |*output|, and returns
36 // C_OK. 36 // C_OK.
37 // On failure: 37 // On failure:
38 // Returns an error status and assigns |*output| to null. 38 // Returns an error status and assigns |*output| to null.
39 Status ParseDetectedExecutable(const uint8_t* buffer, 39 Status ParseDetectedExecutable(const uint8_t* buffer,
40 size_t length, 40 size_t length,
41 std::unique_ptr<AssemblyProgram>* output); 41 std::unique_ptr<AssemblyProgram>* output);
42 42
43 // ParseDetectedExecutable(), with Label annotations generated and stored in
44 // |output|.
45 Status ParseDetectedExecutableWithAnnotation(
46 const uint8_t* buffer,
47 size_t length,
48 std::unique_ptr<AssemblyProgram>* output);
49
43 } // namespace courgette 50 } // namespace courgette
44 51
45 #endif // COURGETTE_PROGRAM_DETECTOR_H_ 52 #endif // COURGETTE_PROGRAM_DETECTOR_H_
OLDNEW
« no previous file with comments | « courgette/patch_generator_x86_32.h ('k') | courgette/program_detector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698