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

Unified Diff: courgette/courgette.h

Issue 8166013: Further refactoring, move ImageInfo into Disassembler/DisassemblerWin32X86. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Rebase over other changes, fix nit. Created 9 years, 2 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
« no previous file with comments | « courgette/assembly_program.h ('k') | courgette/courgette.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: courgette/courgette.h
diff --git a/courgette/courgette.h b/courgette/courgette.h
index 127a150353845a62e10f8bdc9df92ae5b9037528..2970a3f803f8b70fcfc1f560b749de2dc68343ec 100644
--- a/courgette/courgette.h
+++ b/courgette/courgette.h
@@ -87,9 +87,17 @@ Status ApplyEnsemblePatch(const FilePath::CharType* old_file_name,
Status GenerateEnsemblePatch(SourceStream* old, SourceStream* target,
SinkStream* patch);
-// Detects the type of an executable, and returns UNKNOWN if it cannot
-// be parsed.
-ExecutableType DetectExecutableType(const void* 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 the courgette algorithm has special benefit for.
+// On sucess:
+// Fill in type and detected_length, and return C_OK.
+// On failure:
+// Fill in type with UNKNOWN, detected_length with 0, and
+// return C_INPUT_NOT_RECOGNIZED
+Status DetectExecutableType(const void* buffer, size_t length,
+ ExecutableType* type,
+ size_t* detected_length);
// Attempts to detect the type of executable, and parse it with the
// appropriate tools, storing the pointer to the AssemblyProgram in |*output|.
« no previous file with comments | « courgette/assembly_program.h ('k') | courgette/courgette.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698