Software to visualise memory and system layout.

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.
Post Reply
Bert
Posts: 9
Joined: Mon Aug 03, 2009 8:45 am

Software to visualise memory and system layout.

Post 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.
stlw
Member
Member
Posts: 357
Joined: Fri Apr 04, 2008 6:43 am
Contact:

Re: Software to visualise memory and system layout.

Post by stlw »

User avatar
salil_bhagurkar
Member
Member
Posts: 261
Joined: Mon Feb 19, 2007 10:40 am
Location: India

Re: Software to visualise memory and system layout.

Post 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.. :)
User avatar
gravaera
Member
Member
Posts: 737
Joined: Tue Jun 02, 2009 4:35 pm
Location: Supporting the cause: Use \tabs to indent code. NOT \x20 spaces.

Re: Software to visualise memory and system layout.

Post 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?
17:56 < sortie> Paging is called paging because you need to draw it on pages in your notebook to succeed at it.
Bert
Posts: 9
Joined: Mon Aug 03, 2009 8:45 am

Re: Software to visualise memory and system layout.

Post by Bert »

Thanks for replying.
Bert
Posts: 9
Joined: Mon Aug 03, 2009 8:45 am

Re: Software to visualise memory and system layout.

Post 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.
User avatar
-m32
Member
Member
Posts: 120
Joined: Thu Feb 21, 2008 5:59 am
Location: Ottawa, Canada

Re: Software to visualise memory and system layout.

Post 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...
Bert
Posts: 9
Joined: Mon Aug 03, 2009 8:45 am

Re: Software to visualise memory and system layout.

Post 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.
User avatar
-m32
Member
Member
Posts: 120
Joined: Thu Feb 21, 2008 5:59 am
Location: Ottawa, Canada

Re: Software to visualise memory and system layout.

Post by -m32 »

Yep, in a DOS box (in my case a bash shell)..
User avatar
alethiophile
Member
Member
Posts: 90
Joined: Sat May 30, 2009 10:28 am

Re: Software to visualise memory and system layout.

Post 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.
If I had an OS, there would be a link here.
Bert
Posts: 9
Joined: Mon Aug 03, 2009 8:45 am

Re: Software to visualise memory and system layout.

Post 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?
Post Reply