Page 2 of 2

Re: Ring3 Prob: Int XX, Solar's malloc & Durand printf dont

Posted: Sun Nov 06, 2011 12:57 am
by Muneer
gerryg400 wrote:It seems that you have solved 2 problems in your code and there is one more to solve ?
Yes.
gerryg400 wrote:What does "hooks to" mean in this context ?
Quote:
I can execute my own version of puts(which hooks to Durand's printf).
Where can I find Durand's printf ?
By "hooks" I meant that Durand's printf calls an external putchar function. I have made the putchar function to call my self-made puts.
Durand's printf can be found at http://code.google.com/p/auroraos/sourc ... ntf.c?r=10

Re: Ring3 Prob: Int XX, Solar's malloc & Durand printf dont

Posted: Sun Nov 06, 2011 4:44 am
by Muneer
Yeah I solved the problem. The putchar function (implemented by me) calls malloc which in turn calls k_map which calls invalidate_page which contains the privileged instruction.
This thread helped me to find the invalidate_page problem as well as forced me to incorporate gdb with qemu with which I could step and find the malloc call.


Combuster wrote:HardCoder wrote:
Combuster wrote:
as well as the faulting CS:IP:FLAGS:SS:SP;

How to get that in qemu. Cant get it from "info registers".
Then how on earth did you get the error code? :wink:

Sorry my bad. I was thinking of something else. I already knew that we can get that from "info registers". I thought you were asking something else. should have known. Thanks though. Now the problem is solved.

Re: Ring3 Prob: Int XX, Solar's malloc & Durand printf dont

Posted: Sun Nov 06, 2011 4:56 am
by gerryg400
Well done. Perhaps in retrospect the thread subject should have been
Re: Ring3 Prob: Int XX, Solar's malloc & Durand printf do work

Re: Ring3 Prob: Int XX, Solar's malloc & Durand printf dont

Posted: Sun Nov 06, 2011 11:26 am
by Muneer
hehe. Thanks to everyone who helped. This thread is closed