Statistics: Posted by jcmvbkbc — Wed Jul 11, 2018 4:47 am
Statistics: Posted by Bernard — Fri Jun 08, 2018 11:39 pm
Code:
Fatal exception (3):
epc1=0x4026ffc4
epc2=0x00000000
epc3=0x402213bb
epcvaddr=0x401010b8
depc=0x00000000
retn_add=0x4027084c
Code:
static void ATTR_GDBINIT install_exceptions() {
//Replace the user_fatal_exception_handler by a jump to our own code
int *ufe=(int*)user_fatal_exception_handler;
//This mess encodes as a relative jump instruction to user_fatal_exception_handler
*ufe=((((int)gdbstub_user_exception_entry-(int)user_fatal_exception_handler)-4)<<6)|6;
4026ffb0: ffff41 l32r a4, 4026ffac <getaregval+0x24>
4026ffb3: fffd21 l32r a2, 4026ffa8 <getaregval+0x20>
4026ffb6: fcc222 addi a2, a2, -4
4026ffb9: c02240 sub a2, a2, a4
4026ffbc: 1122a0 slli a2, a2, 6
4026ffbf: 630c movi.n a3, 6
4026ffc1: 202230 or a2, a2, a3
4026ffc4: 005422 s16i a2, a4, 0
4026ffc7: f52020 extui a2, a2, 16, 16
4026ffca: 015422 s16i a2, a4, 2
4026ffcd: f00d ret.n
Statistics: Posted by sake402 — Sat Feb 03, 2018 11:48 pm