Page 1 of 1

Software to visualise memory and system layout.

Posted: Mon Aug 03, 2009 8:54 am
by Bert
I'am looking for tools helping to develop my own operating system more precisely something where I can look in the machinery, so I can see the GDT table as just a table and I can click at some descriptor to be load. So that I can run applications step by step and without restarting real hardware.

Where can I find this software? Thanks at lot.

Re: Software to visualise memory and system layout.

Posted: Mon Aug 03, 2009 10:35 am
by stlw

Re: Software to visualise memory and system layout.

Posted: Mon Aug 03, 2009 12:08 pm
by salil_bhagurkar
The way you are imagining it, is not possible. As stlw said, bochs is something that will allow you to view the cpu registers and memory areas. But it doesn't know where your GDT is. You could use kdb to get all that information. But loading custom values the way you say, is something that will require you to work on it which would be an overkill IMHO.

This is the reason why OSDEV is tough. You don't get it that simple.. :)

Re: Software to visualise memory and system layout.

Posted: Mon Aug 03, 2009 12:56 pm
by gravaera
Interesting. I like the idea, but the actual implementation of something like that is near impossible. At the memory level, everything fades away into a sequence of bytes. There is no such thing as a 'data structure'. There are only bytes. The CPU is told to interpret the bytes at so-and-so location this way, or that way. Therefore, without first analyzing all of the programs in memory and finding out exactly how they intended for their instructions to modify and reference each individual memory location, it's pretty much impossible to map out all of memory on a running PC diagrammatically.

For example, you could try just dumping every four bytes as an integer value, but what if te program that wrote those bytes there intended to store a pointer? Or what if the sequence of bytes you find starting at a random address, and extending to about 5 pages from there was really a vector image? How would you determine that? To the program you'd have to create, they're all just bytes.

See here. Illusions of grandeur are sometimes really amusing though. Did you really think memory managers would be that difficult to create, and that OSDev would be so difficult if you could just have a GUI point and click program to show you everything with Vista-like sweetness?

Re: Software to visualise memory and system layout.

Posted: Mon Aug 03, 2009 1:51 pm
by Bert
Thanks for replying.

Re: Software to visualise memory and system layout.

Posted: Wed Aug 05, 2009 3:34 am
by Bert
I find something wonderful maybe I can visualize with this software:
http://www-jpc.physics.ox.ac.uk/downloa ... ation.html

the debugger application so I download and then try a fdd from menuetos but then I see nothing? Someone experience with this software?

Thanks.

Re: Software to visualise memory and system layout.

Posted: Wed Aug 05, 2009 5:40 am
by -m32
Bert wrote:I find something wonderful maybe I can visualize with this software:
http://www-jpc.physics.ox.ac.uk/downloa ... ation.html

the debugger application so I download and then try a fdd from menuetos but then I see nothing? Someone experience with this software?

Thanks.
Gave it a try because it looks like it could be helpful... but damn, it's a memory & cpu hog! Its so, very slow... anyway, I just started it with:

java -jar JPCDebugger.jar -boot fda -fda ../floppy.img

Then, Run -> Start

Works, but apparently thinks ram is delicious...

Re: Software to visualise memory and system layout.

Posted: Wed Aug 05, 2009 5:49 am
by Bert
java -jar JPCDebugger.jar -boot fda -fda ../floppy.img
Where do you need to give in this information? just in a dos box? I try with FDD bottom and select my image then start but it don't works.

Re: Software to visualise memory and system layout.

Posted: Wed Aug 05, 2009 6:31 am
by -m32
Yep, in a DOS box (in my case a bash shell)..

Re: Software to visualise memory and system layout.

Posted: Wed Aug 05, 2009 9:35 am
by alethiophile
I would probably just use bochs and get a memory dump of the location of gdtr. What you do is you use the sreg command to get the gdtr value, then use x or xp (depending on whether you want to look at virtual or physical memory) to read out the bytes.

Re: Software to visualise memory and system layout.

Posted: Wed Aug 05, 2009 10:05 am
by Bert
I think I try to do the same and the program start but now output.
Then I get in dos the faults:

Code: Select all

Exception in thread "main" java.lang.IllegalArgumentException: No enum const cla
ss org.jpc.support.DriveSet$Devices.C
        at java.lang.Enum.valueOf(Unknown Source)
        at org.jpc.support.DriveSet$Devices.valueOf(DriveSet.java:22)
        at org.jpc.support.DriveSet.createDevice(DriveSet.java:185)
        at org.jpc.support.DriveSet.createFloppyBlockDevice(DriveSet.java:208)
        at org.jpc.support.DriveSet.buildFromArgs(DriveSet.java:272)
        at org.jpc.emulator.PC.<init>(PC.java:113)
        at org.jpc.debugger.JPC.createPC(JPC.java:658)
        at org.jpc.debugger.JPC.main(JPC.java:777)
Is this a java problem?