-
-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add new interface for adjust rz reg contents in some cases #17
base: master
Are you sure you want to change the base?
Conversation
std::string r = tracereg; | ||
std::transform(r.begin(), r.end(), r.begin(), ::tolower); | ||
|
||
if (r.at(0) == 's') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest to put the the comment from the PR description here, right in the code, otherwise it would be hard to understand why it's needed
@@ -192,7 +193,8 @@ FrameCheckResult RizinEmulator::RunFrame(ut64 index, frame *f, std::optional<ut6 | |||
continue; | |||
} | |||
RzBitVector *bv = rz_bv_new_from_bytes_le((const ut8 *)o.value().data(), 0, RegOperandSizeBits(o)); | |||
adapter->AdjustRegContentsFromTrace(ro.name(), bv); | |||
RzBitVector *extra = rz_reg_get_bv(reg.get(), ri); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think it is a good idea to read register contents here. They might be undefined depending on what happened before.
What is the resolution with this? One year has passed. |
@Heersin Is it still needed? If not I would vote for closing so less changes. |
BAP-qemu frame represent register D17 as two S registers(S34, S35), while those S registers(S32/S33 ...) are not existed in rz_reg for arm32.
dn
register can be represented asconcat(S_2n, S_2n+1)
, to get the correct d register value I need both two S register value in the for-loop of rz-tracetetCurrently my solution is to modify Adapter interface to support it. It will affect other architecture's adapters, I am not sure it's a best practice.