[SOLVED]Ring3 Prob: Int XX, Solar's malloc & Durand printf

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
User avatar
Muneer
Member
Member
Posts: 104
Joined: Tue Nov 02, 2010 2:05 am
Location: India

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

Post 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
Even the smallest person could change the course of the future - Lord Of The Rings.

In the end all that matters is what you have done - Alexander.

Even after a decade oh god those still gives me the shivers.
User avatar
Muneer
Member
Member
Posts: 104
Joined: Tue Nov 02, 2010 2:05 am
Location: India

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

Post 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.
Even the smallest person could change the course of the future - Lord Of The Rings.

In the end all that matters is what you have done - Alexander.

Even after a decade oh god those still gives me the shivers.
gerryg400
Member
Member
Posts: 1801
Joined: Thu Mar 25, 2010 11:26 pm
Location: Melbourne, Australia

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

Post 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
If a trainstation is where trains stop, what is a workstation ?
User avatar
Muneer
Member
Member
Posts: 104
Joined: Tue Nov 02, 2010 2:05 am
Location: India

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

Post by Muneer »

hehe. Thanks to everyone who helped. This thread is closed
Even the smallest person could change the course of the future - Lord Of The Rings.

In the end all that matters is what you have done - Alexander.

Even after a decade oh god those still gives me the shivers.
Post Reply