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

Unified Diff: courgette/program_detector.h

Issue 2854113002: [Courgette] Reduce AssemblyProgram to reduce Courgette-apply RAM floor and disk churn. (Closed)
Patch Set: Sync and merge. 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 side-by-side diff with in-line comments
Download patch
Index: courgette/program_detector.h
diff --git a/courgette/program_detector.h b/courgette/program_detector.h
index a869a3f2487376b462fe6f9b520c371c81f23481..d44f37618cf590e6cbf1c2713156849256c4d310 100644
--- a/courgette/program_detector.h
+++ b/courgette/program_detector.h
@@ -14,7 +14,12 @@
namespace courgette {
-class AssemblyProgram;
+class Disassembler;
+
+// Returns a new instance of Disassembler inherited class if binary data given
+// in |buffer| and |length| match a known binary format, otherwise null.
+std::unique_ptr<Disassembler> DetectDisassembler(const uint8_t* buffer,
+ size_t length);
// Detects the type of an executable file, and it's length. The length may be
// slightly smaller than some executables (like ELF), but will include all bytes
@@ -29,24 +34,6 @@ Status DetectExecutableType(const uint8_t* buffer,
ExecutableType* type,
size_t* detected_length);
-// Attempts to detect the type of executable by parsing it with the appropriate
-// tools.
-// On success:
-// Parses the executable into a new AssemblyProgram in |*output|, and returns
-// C_OK.
-// On failure:
-// Returns an error status and assigns |*output| to null.
-Status ParseDetectedExecutable(const uint8_t* buffer,
- size_t length,
- std::unique_ptr<AssemblyProgram>* output);
-
-// ParseDetectedExecutable(), with Label annotations generated and stored in
-// |output|.
-Status ParseDetectedExecutableWithAnnotation(
- const uint8_t* buffer,
- size_t length,
- std::unique_ptr<AssemblyProgram>* output);
-
} // namespace courgette
#endif // COURGETTE_PROGRAM_DETECTOR_H_

Powered by Google App Engine
This is Rietveld 408576698