-
Notifications
You must be signed in to change notification settings - Fork 1.4k
HowTo correctly trace x86 CPU instructions? #2173
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
Comments
Small update: |
Sorry for late. First, have you tried for the dev branch? If so, could you give a reproduction? If not, you can enable Unicorn internal logging by |
Okay, I tested dev now also, with same results. But I found the issue, the entry in the LDT was wrong. So not a Unicorn issue. |
That's exactly |
Ouch, I forgot to set the ENV things correctly, sorry.
I guess, explanations can be found in QEMU docs? |
Uh oh!
There was an error while loading. Please reload this page.
Hi there,
I have a rather unusual x86 code, which needs to be run in Unicorn. The code needs protected mode (32 bit) and switches to 16 bit segments. If I execute the code, I get an "unmapped memory error", but I don't know why. So I started to single step debugging into Unicorn, but as soon as the translation block is executed, I end up with the error. Means, I can't single step into
ret = tcg_qemu_tb_exec(env, tb_ptr);
, in line 60 of cpu_exec.c.The situation is as follows:
Register Dump
so the
call far [bp]
creates the memory error:I don't know why the error occurs while accessing address 0x82068. If I look at the registers, the call should access 0x4202c, which is inside the stack and looks like that:
So theoretical it should use ffff:0037 as target for the call, but it breaks before.
Any idea how I can get deeper into that?
Maybe the GDT/LDT setup is wrong?
Can I enable some kind of trace for further debugging?
The text was updated successfully, but these errors were encountered: