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

Unified Diff: courgette/disassembler_elf_32_x86.h

Issue 2055343002: Courgette: Add static method QuickDetect() to optimize program detection. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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/disassembler_elf_32_x86.h
diff --git a/courgette/disassembler_elf_32_x86.h b/courgette/disassembler_elf_32_x86.h
index 706e6fee33b101e354727ab037ee90942613d43f..9664cb051631092add4f1a79955b2f21b9df77c6 100644
--- a/courgette/disassembler_elf_32_x86.h
+++ b/courgette/disassembler_elf_32_x86.h
@@ -20,6 +20,11 @@ class AssemblyProgram;
class DisassemblerElf32X86 : public DisassemblerElf32 {
public:
+ static bool QuickDetects(const void* start, size_t length) {
+ return DisassemblerElf32::QuickDetects(
+ reinterpret_cast<const uint8_t*>(start), length, EM_386);
+ }
+
class TypedRVAX86 : public TypedRVA {
public:
explicit TypedRVAX86(RVA rva) : TypedRVA(rva) { }

Powered by Google App Engine
This is Rietveld 408576698