58 assert(es->
code != NULL);
65 #if STACKFRAME_LEAFMETHODS_RA_REGISTER
73 uintptr_t
sp = (uintptr_t) es->
sp;
81 # if STACKFRAME_PACKED_SAVED_REGISTERS
82 basesp -= 1 * SIZEOF_VOID_P;
86 es->
ra = *((uint8_t**) basesp);
87 # if STACKFRAME_LEAFMETHODS_RA_REGISTER
93 #if STACKFRAME_RA_LINKAGE_AREA
94 # if STACKFRAME_LEAFMETHODS_RA_REGISTER
105 #if STACKFRAME_PACKED_SAVED_REGISTERS
106 basesp -= 1 * SIZEOF_VOID_P;
110 es->
intregs[reg] = *((uintptr_t*) basesp);
120 es->
fltregs[reg] = *((
double*) basesp);
125 #if STACKFRAME_RA_BETWEEN_FRAMES
126 es->
sp += SIZEOF_VOID_P;
139 *(
u8*)&(es->
fltregs[i]) = 0x33dead3333dead33ULL;
158 void* handler = NULL;
161 while (handler == NULL) {
188 es->
pc = (uint8_t*) handler;
204 #define MINIMUM_CONTEXT_SIZE (SIZEOF_VOID_P * INT_REG_CNT \
205 + sizeof(double) * FLT_REG_CNT)
250 assert(es3.
pc == es1.
pc);
251 assert(es3.
sp == es1.
sp);
252 assert(es3.
pv == es1.
pv);
256 assert(memcmp(es3.
fltregs+i, es1.
fltregs+i,
sizeof(
double)) == 0);
260 #if defined(__I386__) || defined(__X86_64__)
261 assert(es3.
ra != es1.
ra);
263 assert(es3.
ra == es1.
ra);
295 printf(
"(executionstate_t *)NULL\n");
299 printf(
"executionstate_t:\n");
305 #if defined(ENABLE_DISASSEMBLER)
311 # if SIZEOF_VOID_P == 8
325 printf(
"F%02d = %016llx",i,(
unsigned long long)es->
fltregs[i]);
331 sp = (uint64_t *) es->
sp;
338 extraslots = 1 + md->
memuse;
345 printf(
"\tstack slots(+%d) at sp:", extraslots);
346 for (i=0; i<slots+extraslots; ++
i) {
349 printf(
"M%02d%c", i, (i >= slots) ?
'(' :
' ');
350 printf(
"%016llx",(
unsigned long long)*sp++);
351 printf(
"%c", (i >= slots) ?
')' :
' ');
357 if (es->
code != NULL) {
static void * memset(void *s, int c, size_t n)
void method_print(methodinfo *m)
void executionstate_pop_stackframe(executionstate_t *es)
Restore callee-saved registers (including the RA register), set the stack pointer to the next stackfr...
#define STACKFRAME_RA_TOP_OF_FRAME
#define MINIMUM_CONTEXT_SIZE
#define STACKFRAME_LEAFMETHODS_RA_REGISTER
static int code_is_leafmethod(codeinfo *code)
#define exceptions_handle_exception
void executionstate_println(executionstate_t *es)
static codeinfo * code_get_codeinfo_for_pv(void *pv)
void executionstate_unwind_exception(executionstate_t *es, java_handle_t *e)
Performs stack unwinding in case of an exception.
#define SIZE_OF_STACKSLOT
static void * memcpy(void *dest, const void *src, size_t n)
void md_executionstate_write(executionstate_t *es, void *context)
static void * md_codegen_get_pv_from_pc(void *ra)
#define STACK_SLOTS_PER_FLOAT
const char * abi_registers_integer_name[]
void md_executionstate_read(executionstate_t *es, void *context)
static void * md_stacktrace_get_returnaddress(void *sp, int32_t stackframesize)
void executionstate_sanity_check(void *context)
uintptr_t intregs[INT_REG_CNT]
double fltregs[FLT_REG_CNT]
static int32_t md_stacktrace_get_framesize(codeinfo *code)
Returns the size (in bytes) of the current stackframe, specified by the passed codeinfo structure...