unicorn icon indicating copy to clipboard operation
unicorn copied to clipboard

aarch64: add exception syndrome (ESR) pseudo-register

Open misson20000 opened this issue 8 years ago • 8 comments

Closes #838

misson20000 avatar May 20 '17 02:05 misson20000

This is not a real register, so it is confused. I rather having a new API to read/write CPU context.

aquynh avatar May 20 '17 13:05 aquynh

Is that the sort of thing uc_query is for, and if so, would this be better off as a uc_query option?

misson20000 avatar May 21 '17 21:05 misson20000

but "query" is not supposed to write/change context, right?

aquynh avatar May 21 '17 23:05 aquynh

the exception syndrome shouldn't be set by anything other than the emulator when it encounters an exception, which is why I didn't implement reg_write for it

misson20000 avatar May 21 '17 23:05 misson20000

Unless you're emulating something with more privileges and exception handlers I guess, but then you'd want to set the exception syndrome for a specific exception level (ESR_EL1, ESR_EL2, and ESR_EL3), and those are real registers (in the cp15 struct) so it makes sense to have those in uc_reg_read and uc_reg_write.

I don't have a way of telling what exception level an exception gets taken to though, so I wouldn't know which of those specific registers to read which is what I wanted a more general exception syndrome pseudo-register for.

misson20000 avatar May 21 '17 23:05 misson20000

Any update on this?

SomeoneWeird avatar Sep 07 '17 10:09 SomeoneWeird

Closed due to inactivity.

wtdcode avatar Oct 03 '21 16:10 wtdcode

But still link this to #1449 if I have more time or some one could assist me.

wtdcode avatar Oct 03 '21 16:10 wtdcode