aboutsummaryrefslogtreecommitdiff
path: root/src/third_party/libdisasm/x86_imm.h
diff options
context:
space:
mode:
authorcdn@chromium.org <cdn@chromium.org@4c0a9323-5329-0410-9bdc-e9ce6186880e>2010-10-01 22:38:10 +0000
committercdn@chromium.org <cdn@chromium.org@4c0a9323-5329-0410-9bdc-e9ce6186880e>2010-10-01 22:38:10 +0000
commit2b4274afc4fae883d1251a7a420e24fd526a9f16 (patch)
treed9cafcfb8d68b4c005f5cb80c15e3286c291b067 /src/third_party/libdisasm/x86_imm.h
parentAdd stack-scanning fallback to Stackwalker{AMD64,ARM}. (diff)
downloadbreakpad-2b4274afc4fae883d1251a7a420e24fd526a9f16.tar.xz
Added libdisasm to the repository. This library is no longer under development so there
is no reason not to keep it locally. Implemented a basic disassembler which can be used to scan bytecode for interesting conditions. This should be pretty easy to add to for things other than exploitability if there is a desire. This also adds several tests to the windows exploitability ranking code to take advantage of the disassembler for x86 code. BUG=None TEST=DisassemblerX86Test.* Review URL: http://breakpad.appspot.com/203001 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@705 4c0a9323-5329-0410-9bdc-e9ce6186880e
Diffstat (limited to 'src/third_party/libdisasm/x86_imm.h')
-rw-r--r--src/third_party/libdisasm/x86_imm.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/third_party/libdisasm/x86_imm.h b/src/third_party/libdisasm/x86_imm.h
new file mode 100644
index 00000000..fa35ff2d
--- /dev/null
+++ b/src/third_party/libdisasm/x86_imm.h
@@ -0,0 +1,18 @@
+#ifndef x86_IMM_H
+#define x86_IMM_H
+
+#include "./qword.h"
+#include <sys/types.h>
+
+#ifdef WIN32
+#include <windows.h>
+#endif
+
+/* these are in the global x86 namespace but are not a part of the
+ * official API */
+unsigned int x86_imm_sized( unsigned char *buf, size_t buf_len, void *dest,
+ unsigned int size );
+
+unsigned int x86_imm_signsized( unsigned char *buf, size_t buf_len, void *dest,
+ unsigned int size );
+#endif