#include "x86_emulate/x86_emulate.h"
#include "blowfish.h"
+#define verbose false /* Switch to true for far more logging. */
+
static const struct {
const void *code;
size_t size;
unsigned int bytes,
struct x86_emulate_ctxt *ctxt)
{
+ if ( verbose )
+ printf("** %s(%u, %p,, %u,)\n", __func__, seg, (void *)offset, bytes);
+
bytes_read += bytes;
memcpy(p_data, (void *)offset, bytes);
return X86EMUL_OKAY;
unsigned int bytes,
struct x86_emulate_ctxt *ctxt)
{
+ if ( verbose )
+ printf("** %s(%u, %p,, %u,)\n", __func__, seg, (void *)offset, bytes);
+
memcpy(p_data, (void *)offset, bytes);
return X86EMUL_OKAY;
}
unsigned int bytes,
struct x86_emulate_ctxt *ctxt)
{
+ if ( verbose )
+ printf("** %s(%u, %p,, %u,)\n", __func__, seg, (void *)offset, bytes);
+
memcpy((void *)offset, p_data, bytes);
return X86EMUL_OKAY;
}
unsigned int bytes,
struct x86_emulate_ctxt *ctxt)
{
+ if ( verbose )
+ printf("** %s(%u, %p,, %u,)\n", __func__, seg, (void *)offset, bytes);
+
memcpy((void *)offset, new, bytes);
return X86EMUL_OKAY;
}
unsigned int bcdres_native, bcdres_emul;
#endif
+ /* Disable output buffering. */
+ setbuf(stdout, NULL);
+
ctxt.regs = ®s;
ctxt.force_writeback = 0;
ctxt.addr_size = 8 * sizeof(void *);