9 if (
c &&
c->iob.read_at && !
c->iob.read_at(
c->iob.io,
c->eip,
buf, 4)) {
27 memset(
c->input_buf,
'\0',
c->input_size);
28 memset(
c->screen_buf,
'\0',
c->screen_size);
50 c->circular = circular;
58 memset(
c->screen_buf,
'\0',
c->screen_size);
70 memcpy(&
c->iob, iob,
sizeof(
c->iob));
86 }
else if (at >=
c->size) {
87 at =
c->circular ? 0 :
c->size - 1;
99 return ptr ? *ptr : 0;
117 char *ptr = strchr(
str,
' ');
121 if (strstr(
str,
"eip")) {
123 }
else if (strstr(
str,
"esp")) {
125 }
else if (strstr(
str,
"ptr")) {
133 int idx =
c->input_idx;
136 if (
idx >=
c->input_size) {
141 *ptr =
c->input_buf[
idx];
142 c->input_idx =
idx + 1;
147 int idx =
c->screen_idx;
149 c->screen_idx =
idx + 1;
178 #define T if (c->trace)
215 if (
c->eip < (
c->eip - 1)) {
228 }
while (over &&
op == op2);
235 while (!
c->breaked) {
243 eprintf(
"contsc: read from input trap\n");
247 eprintf(
"contsc: print to screen trap\n");
257 while (!
c->breaked &&
c->eip != until) {
285 eprintf(
" ptr 0x%08x [ptr] %d = 0x%02x '%c'\n",
293 eprintf(
"e cmd.vprompt=px@screen\n");
RZ_API BfvmCPU * bfvm_new(RzIOBind *iob)
RZ_API void bfvm_show_regs(BfvmCPU *c, int rad)
RZ_API int bfvm_in_trap(BfvmCPU *c)
RZ_API void bfvm_reset(BfvmCPU *c)
RZ_API void bfvm_inc(BfvmCPU *c)
RZ_API ut8 * bfvm_get_ptr_at(BfvmCPU *c, ut64 at)
RZ_API BfvmCPU * bfvm_free(BfvmCPU *c)
RZ_API void bfvm_peek(BfvmCPU *c)
RZ_API void bfvm_maps(BfvmCPU *c, int rad)
RZ_API int bfvm_reg_set(BfvmCPU *c, const char *str)
RZ_API int bfvm_cont(BfvmCPU *c, ut64 until)
static ut8 bfvm_op(BfvmCPU *c)
RZ_API int bfvm_contsc(BfvmCPU *c)
RZ_API int bfvm_step(BfvmCPU *c, int over)
RZ_API int bfvm_trace(BfvmCPU *c, ut64 until)
RZ_API void bfvm_poke(BfvmCPU *c)
RZ_API void bfvm_dec(BfvmCPU *c)
RZ_API int bfvm_init(BfvmCPU *c, ut32 size, int circular)
RZ_API ut8 bfvm_get(BfvmCPU *c)
RZ_API int bfvm_trace_op(BfvmCPU *c, ut8 op)
RZ_API ut8 * bfvm_get_ptr(BfvmCPU *c)
RZ_API void Ht_() free(HtName_(Ht) *ht)
return memset(p, 0, total)
memcpy(mem, inblock.get(), min(CONTAINING_RECORD(inblock.get(), MEMBLOCK, data) ->size, size))
void * malloc(size_t size)
RZ_API ut64 rz_num_math(RzNum *num, const char *str)
ut64(WINAPI *w32_GetEnabledXStateFeatures)()