summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Haberman <joshua@reverberate.org>2011-07-19 11:31:57 -0700
committerJoshua Haberman <joshua@reverberate.org>2011-07-19 11:31:57 -0700
commit92b4c38fa5f137cbcf835ad359bed8711c1c9c51 (patch)
treeb460877a34ff722b1bf0f5742ef5e893e8884b49
parentdaf36f07473b627ef634f8f66379a45ac99d32fc (diff)
Added comment about how to disassemble JIT output.
-rw-r--r--upb/pb/decoder_x86.dasc2
-rw-r--r--upb/upb.h1
2 files changed, 3 insertions, 0 deletions
diff --git a/upb/pb/decoder_x86.dasc b/upb/pb/decoder_x86.dasc
index 19043c6..20c20d7 100644
--- a/upb/pb/decoder_x86.dasc
+++ b/upb/pb/decoder_x86.dasc
@@ -682,6 +682,8 @@ void upb_decoder_makejit(upb_decoder *d) {
mprotect(d->jit_code, d->jit_size, PROT_EXEC | PROT_READ);
+ // View with: objdump -M intel -D -b binary -mi386 -Mx86-64 /tmp/machine-code
+ // Or: ndisasm -b 64 /tmp/machine-code
FILE *f = fopen("/tmp/machine-code", "wb");
fwrite(d->jit_code, d->jit_size, 1, f);
fclose(f);
diff --git a/upb/upb.h b/upb/upb.h
index 153057d..0c49597 100644
--- a/upb/upb.h
+++ b/upb/upb.h
@@ -14,6 +14,7 @@
#include <stdint.h>
#include <stdio.h> // only for size_t.
#include <assert.h>
+#include <stdarg.h>
#include "descriptor_const.h"
#include "atomic.h"
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback